Commit 846088a7 authored by 盖献康's avatar 盖献康

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

# Conflicts:
#	src/store/modules/user.js
parents 38fb4af0 eb79f00a
...@@ -79,7 +79,12 @@ ...@@ -79,7 +79,12 @@
.orange { .orange {
color: #f9a221; color: #f9a221;
} }
.taskLeader {
width:120px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.standard-box { .standard-box {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
......
...@@ -133,6 +133,7 @@ export default { ...@@ -133,6 +133,7 @@ export default {
// const regex = /[\s~`!@#$%^&*()\-_=+[\]{}|;:'",<>/?]/ // const regex = /[\s~`!@#$%^&*()\-_=+[\]{}|;:'",<>/?]/
const regex = /[~`!@#$%^&*=[\]{}|;:'",<>/?]/ const regex = /[~`!@#$%^&*=[\]{}|;:'",<>/?]/
const result = regex.test(file.name) const result = regex.test(file.name)
if (result === true) { if (result === true) {
this.fileList = [] this.fileList = []
// this.$refs.imageUpload.clearFiles() // this.$refs.imageUpload.clearFiles()
...@@ -141,6 +142,7 @@ export default { ...@@ -141,6 +142,7 @@ export default {
let isImg = false let isImg = false
if (this.fileType.length) { if (this.fileType.length) {
let fileExtension = '' let fileExtension = ''
if (file.name.lastIndexOf('.') > -1) { if (file.name.lastIndexOf('.') > -1) {
fileExtension = file.name.slice(file.name.lastIndexOf('.') + 1) fileExtension = file.name.slice(file.name.lastIndexOf('.') + 1)
} }
...@@ -149,6 +151,7 @@ export default { ...@@ -149,6 +151,7 @@ export default {
if (fileExtension && fileExtension.indexOf(type) > -1) return true if (fileExtension && fileExtension.indexOf(type) > -1) return true
return false return false
}) })
console.log(isImg)
} else { } else {
isImg = file.type.indexOf('image') > -1 isImg = file.type.indexOf('image') > -1
} }
......
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
> >
<div class="avatar-wrapper"> <div class="avatar-wrapper">
<img :src="avatar" class="user-avatar" /> <img :src="avatar" class="user-avatar" />
<div class="user-name">{{ name }}</div>
<i class="el-icon-caret-bottom" /> <i class="el-icon-caret-bottom" />
</div> </div>
<el-dropdown-menu slot="dropdown"> <el-dropdown-menu slot="dropdown">
...@@ -50,7 +51,7 @@ import Breadcrumb from '@/components/Breadcrumb' ...@@ -50,7 +51,7 @@ import Breadcrumb from '@/components/Breadcrumb'
import TopNav from '@/components/TopNav' import TopNav from '@/components/TopNav'
import Hamburger from '@/components/Hamburger' import Hamburger from '@/components/Hamburger'
import QuickNew from '@/components/QuickNew' import QuickNew from '@/components/QuickNew'
import avatar from '@/assets/images/touxiang.png' // import avatar from '@/assets/images/touxiang.png'
// import QuickNew from '@/components/QuickNew' // import QuickNew from '@/components/QuickNew'
// import MessageWaring from '@/components/MessageWaring' // import MessageWaring from '@/components/MessageWaring'
export default { export default {
...@@ -63,11 +64,10 @@ export default { ...@@ -63,11 +64,10 @@ export default {
}, },
data() { data() {
return { return {
avatar
} }
}, },
computed: { computed: {
...mapGetters(['sidebar', 'device']), ...mapGetters(['sidebar', 'device', 'name','avatar']),
setting: { setting: {
get() { get() {
return this.$store.state.settings.showSettings return this.$store.state.settings.showSettings
...@@ -177,7 +177,19 @@ export default { ...@@ -177,7 +177,19 @@ export default {
.avatar-wrapper { .avatar-wrapper {
margin-top: 5px; margin-top: 5px;
position: relative; position: relative;
display: flex;
align-items: flex;
.user-name {
line-height: 40px;
font-size: 14px;
font-weight: bold;
max-width: 100px;
margin: 0 10px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.user-avatar { .user-avatar {
cursor: pointer; cursor: pointer;
width: 40px; width: 40px;
......
...@@ -75,7 +75,7 @@ const user = { ...@@ -75,7 +75,7 @@ const user = {
commit('SET_ROLES', ['ROLE_DEFAULT']) commit('SET_ROLES', ['ROLE_DEFAULT'])
} }
commit('SET_ID', user.userId) commit('SET_ID', user.userId)
commit('SET_NAME', user.userName) commit('SET_NAME', user.nickName)
commit('SET_AVATAR', avatar) commit('SET_AVATAR', avatar)
commit('SET_DEPT', res.user.dept) commit('SET_DEPT', res.user.dept)
resolve(res) resolve(res)
......
...@@ -136,7 +136,9 @@ ...@@ -136,7 +136,9 @@
style="margin-right: 5px" style="margin-right: 5px"
fill="#999999" fill="#999999"
/> />
{{ item.leader ? item.leader : '---' }} <span class="taskLeader">{{
item.leader ? item.leader : '---'
}}</span>
</div> </div>
</div> </div>
</div> </div>
......
...@@ -15,25 +15,27 @@ ...@@ -15,25 +15,27 @@
<div class="task-item"> <div class="task-item">
<span class="task-label">任务编号:</span> <span class="task-label">任务编号:</span>
<span class="task-content"> <span class="task-content">
{{ task.taskNo }} {{ taskDetail.taskNo }}
</span> </span>
</div> </div>
<div class="task-item"> <div class="task-item">
<span class="task-label">任务名称:</span> <span class="task-label">任务名称:</span>
<span class="task-content"> <span class="task-content">
{{ task.taskName }} {{ taskDetail.taskName }}
</span> </span>
</div> </div>
<div class="task-item"> <div class="task-item">
<span class="task-label">委托单位:</span> <span class="task-label">委托单位:</span>
<span class="task-content"> <span class="task-content">
{{ task.entrustedUnit }} {{ taskDetail.entrustedUnit }}
</span> </span>
</div> </div>
<div class="task-item"> <div class="task-item">
<span class="task-label">任务状态:</span> <span class="task-label">任务状态:</span>
<span class="task-content"> <span class="task-content">
{{ getDictData(dict.type.task_test_status, task.taskStatus) }} {{
getDictData(dict.type.task_test_status, taskDetail.taskStatus)
}}
</span> </span>
</div> </div>
</div> </div>
...@@ -268,6 +270,7 @@ export default { ...@@ -268,6 +270,7 @@ export default {
reviewSceneChangeTasks: {}, reviewSceneChangeTasks: {},
detailsList: [] detailsList: []
}, },
taskDetail: {},
ruleForm: { ruleForm: {
enterpriseLeader: '', enterpriseLeader: '',
inspectionLeader: '', inspectionLeader: '',
...@@ -338,7 +341,8 @@ export default { ...@@ -338,7 +341,8 @@ export default {
getTestDetail() { getTestDetail() {
this.loading = true this.loading = true
testDetail({ taskId: this.$route.query.id }).then(res => { testDetail({ taskId: this.$route.query.id }).then(res => {
this.tableData = res.data this.taskDetail = res.data
this.tableData = res.data.modelTestTaskViewResponseList
this.loading = false this.loading = false
this.openAll() this.openAll()
}) })
......
...@@ -229,7 +229,8 @@ export default { ...@@ -229,7 +229,8 @@ export default {
async getTestDetail(id) { async getTestDetail(id) {
this.loading = true this.loading = true
const res = await testDetail({ taskId: id }) const res = await testDetail({ taskId: id })
this.model = res.data
this.model = res.data.modelTestTaskViewResponseList
this.loading = false this.loading = false
}, },
/** 全部展开 */ /** 全部展开 */
......
...@@ -19,25 +19,25 @@ ...@@ -19,25 +19,25 @@
<div class="task-item"> <div class="task-item">
<span class="task-label">任务编号:</span> <span class="task-label">任务编号:</span>
<span class="task-content"> <span class="task-content">
{{ task.taskNo }} {{ taskDetail.taskNo }}
</span> </span>
</div> </div>
<div class="task-item"> <div class="task-item">
<span class="task-label">任务名称:</span> <span class="task-label">任务名称:</span>
<span class="task-content"> <span class="task-content">
{{ task.taskName }} {{ taskDetail.taskName }}
</span> </span>
</div> </div>
<div class="task-item"> <div class="task-item">
<span class="task-label">委托单位:</span> <span class="task-label">委托单位:</span>
<span class="task-content"> <span class="task-content">
{{ task.entrustedUnit }} {{ taskDetail.entrustedUnit }}
</span> </span>
</div> </div>
<div class="task-item"> <div class="task-item">
<span class="task-label">任务状态:</span> <span class="task-label">任务状态:</span>
<span class="task-content"> <span class="task-content">
{{ getDictData(dict.type.task_test_status, task.taskStatus) }} {{ getDictData(dict.type.task_test_status, taskDetail.taskStatus) }}
</span> </span>
</div> </div>
</div> </div>
...@@ -87,7 +87,7 @@ ...@@ -87,7 +87,7 @@
</div> </div>
</div> </div>
<div class="standard-result"> <div class="standard-result">
<el-button type="text" @click="testmMthod(item)" <el-button type="text" @click.stop="testmMthod(item)"
>标准测试方法</el-button >标准测试方法</el-button
> >
</div> </div>
...@@ -164,6 +164,7 @@ export default { ...@@ -164,6 +164,7 @@ export default {
open: false, open: false,
tableData: [], tableData: [],
activeNames: [], activeNames: [],
taskDetail: {},
model: { model: {
systemReviewTask: {}, systemReviewTask: {},
reviewSceneChangeTasks: {}, reviewSceneChangeTasks: {},
...@@ -211,7 +212,8 @@ export default { ...@@ -211,7 +212,8 @@ export default {
getTestDetail() { getTestDetail() {
this.loading = true this.loading = true
testDetail({ taskId: this.$route.query.id }).then(res => { testDetail({ taskId: this.$route.query.id }).then(res => {
this.tableData = res.data this.taskDetail = res.data
this.tableData = res.data.modelTestTaskViewResponseList
this.loading = false this.loading = false
this.openAll() this.openAll()
}) })
......
...@@ -135,7 +135,9 @@ ...@@ -135,7 +135,9 @@
style="margin-right: 5px" style="margin-right: 5px"
fill="#999999" fill="#999999"
/> />
{{ item.leader ? item.leader : '---' }} <span class="taskLeader">{{
item.leader ? item.leader : '---'
}}</span>
</div> </div>
</div> </div>
<div class="card-buttons"> <div class="card-buttons">
......
...@@ -127,7 +127,9 @@ ...@@ -127,7 +127,9 @@
style="margin-right: 5px" style="margin-right: 5px"
fill="#999999" fill="#999999"
/> />
{{ item.leader ? item.leader : '---' }} <span class="taskLeader">{{
item.leader ? item.leader : '---'
}}</span>
</div> </div>
</div> </div>
</div> </div>
......
...@@ -70,7 +70,7 @@ ...@@ -70,7 +70,7 @@
</el-col> </el-col>
<el-col :span="8" class="card-title"> <el-col :span="8" class="card-title">
<el-form-item label="委托单位:"> <el-form-item label="委托单位:">
<el-link @click="dialogVisible = true">{{ <el-link type="primary" @click="dialogVisible = true">{{
taskForm.entrustedUnit taskForm.entrustedUnit
}}</el-link> }}</el-link>
</el-form-item> </el-form-item>
...@@ -112,11 +112,11 @@ ...@@ -112,11 +112,11 @@
<div> <div>
<el-tabs v-model="activeName" @tab-click="tabClick"> <el-tabs v-model="activeName" @tab-click="tabClick">
<el-tab-pane label="数据统计" name="dataStatistics"> <el-tab-pane label="数据统计" name="dataStatistics">
<div class="tip-navigation"> <div v-if="dataStatistic.systemExist" class="tip-navigation">
<div class="tip"></div> <div class="tip"></div>
<div class="tip-title">体系审查</div> <div class="tip-title">体系审查</div>
</div> </div>
<el-row :gutter="40"> <el-row v-if="dataStatistic.systemExist" :gutter="40">
<el-col :span="12"> <el-col :span="12">
<div style="border: 1px solid #ebebeb; padding: 24px 0 24px 24px"> <div style="border: 1px solid #ebebeb; padding: 24px 0 24px 24px">
<el-row class="prograss-title"> 用例维度 </el-row> <el-row class="prograss-title"> 用例维度 </el-row>
...@@ -160,18 +160,26 @@ ...@@ -160,18 +160,26 @@
:text-inside="true" :text-inside="true"
:stroke-width="16" :stroke-width="16"
:percentage=" :percentage="
percentageChange(dataStatistic.systemDetails) roundToInt(
dataStatistic.systemDetails,
dataStatistic.systemDetails
)
" "
:format="progressLine" :format="progressLine(dataStatistic.systemDetails)"
text-color="#fff" text-color="#fff"
></el-progress> ></el-progress>
<el-progress <el-progress
:text-inside="true" :text-inside="true"
:stroke-width="16" :stroke-width="16"
:percentage=" :percentage="
percentageChange(dataStatistic.systemDetailsPassNum) roundToInt(
dataStatistic.systemDetails,
dataStatistic.systemDetailsPassNum
)
"
:format="
progressLine(dataStatistic.systemDetailsPassNum)
" "
:format="progressLine"
status="success" status="success"
text-color="#fff" text-color="#fff"
></el-progress> ></el-progress>
...@@ -179,9 +187,14 @@ ...@@ -179,9 +187,14 @@
:text-inside="true" :text-inside="true"
:stroke-width="16" :stroke-width="16"
:percentage=" :percentage="
percentageChange(dataStatistic.systemDetailsNoPassNum) roundToInt(
dataStatistic.systemDetails,
dataStatistic.systemDetailsNoPassNum
)
"
:format="
progressLine(dataStatistic.systemDetailsNoPassNum)
" "
:format="progressLine"
status="warning" status="warning"
text-color="#fff" text-color="#fff"
></el-progress> ></el-progress>
...@@ -189,9 +202,14 @@ ...@@ -189,9 +202,14 @@
:text-inside="true" :text-inside="true"
:stroke-width="16" :stroke-width="16"
:percentage=" :percentage="
percentageChange(dataStatistic.systemDetailsUnderNum) roundToInt(
dataStatistic.systemDetails,
dataStatistic.systemDetailsUnderNum
)
"
:format="
progressLine(dataStatistic.systemDetailsUnderNum)
" "
:format="progressLine"
status="exception" status="exception"
color="#f98921" color="#f98921"
text-color="#fff" text-color="#fff"
...@@ -233,7 +251,7 @@ ...@@ -233,7 +251,7 @@
>标准条款通过(个)</span >标准条款通过(个)</span
> >
<span class="line-prograss-title" <span class="line-prograss-title"
>标准条款未通过(</span >标准条款未通过(</span
> >
<span class="line-prograss-title">审查中(个)</span> <span class="line-prograss-title">审查中(个)</span>
</div> </div>
...@@ -244,18 +262,26 @@ ...@@ -244,18 +262,26 @@
:text-inside="true" :text-inside="true"
:stroke-width="16" :stroke-width="16"
:percentage=" :percentage="
percentageChange(dataStatistic.systemStandards) roundToInt(
dataStatistic.systemStandards,
dataStatistic.systemStandards
)
" "
:format="progressLine" :format="progressLine(dataStatistic.systemStandards)"
text-color="#fff" text-color="#fff"
></el-progress> ></el-progress>
<el-progress <el-progress
:text-inside="true" :text-inside="true"
:stroke-width="16" :stroke-width="16"
:percentage=" :percentage="
percentageChange(dataStatistic.systemStandardsPassNum) roundToInt(
dataStatistic.systemStandards,
dataStatistic.systemStandardsPassNum
)
"
:format="
progressLine(dataStatistic.systemStandardsPassNum)
" "
:format="progressLine"
status="success" status="success"
text-color="#fff" text-color="#fff"
></el-progress> ></el-progress>
...@@ -263,11 +289,14 @@ ...@@ -263,11 +289,14 @@
:text-inside="true" :text-inside="true"
:stroke-width="16" :stroke-width="16"
:percentage=" :percentage="
percentageChange( roundToInt(
dataStatistic.systemStandards,
dataStatistic.systemStandardsNoPassNum dataStatistic.systemStandardsNoPassNum
) )
" "
:format="progressLine" :format="
progressLine(dataStatistic.systemStandardsNoPassNum)
"
status="warning" status="warning"
text-color="#fff" text-color="#fff"
></el-progress> ></el-progress>
...@@ -275,11 +304,14 @@ ...@@ -275,11 +304,14 @@
:text-inside="true" :text-inside="true"
:stroke-width="16" :stroke-width="16"
:percentage=" :percentage="
percentageChange( roundToInt(
dataStatistic.systemStandards,
dataStatistic.systemStandardsUnderNum dataStatistic.systemStandardsUnderNum
) )
" "
:format="progressLine" :format="
progressLine(dataStatistic.systemStandardsUnderNum)
"
status="exception" status="exception"
color="#f98921" color="#f98921"
text-color="#fff" text-color="#fff"
...@@ -291,11 +323,11 @@ ...@@ -291,11 +323,11 @@
</el-col> </el-col>
</el-row> </el-row>
<div class="tip-navigation"> <div v-if="dataStatistic.carExist" class="tip-navigation">
<div class="tip"></div> <div class="tip"></div>
<div class="tip-title">车型审查</div> <div class="tip-title">车型审查</div>
</div> </div>
<el-row :gutter="40"> <el-row v-if="dataStatistic.carExist" :gutter="40">
<el-col :span="12"> <el-col :span="12">
<div style="border: 1px solid #ebebeb; padding: 24px 0 24px 24px"> <div style="border: 1px solid #ebebeb; padding: 24px 0 24px 24px">
<el-row class="prograss-title"> 用例维度 </el-row> <el-row class="prograss-title"> 用例维度 </el-row>
...@@ -336,17 +368,25 @@ ...@@ -336,17 +368,25 @@
<el-progress <el-progress
:text-inside="true" :text-inside="true"
:stroke-width="16" :stroke-width="16"
:percentage="percentageChange(dataStatistic.carDetails)" :percentage="
:format="progressLine" roundToInt(
dataStatistic.carDetails,
dataStatistic.carDetails
)
"
:format="progressLine(dataStatistic.carDetails)"
text-color="#fff" text-color="#fff"
></el-progress> ></el-progress>
<el-progress <el-progress
:text-inside="true" :text-inside="true"
:stroke-width="16" :stroke-width="16"
:percentage=" :percentage="
percentageChange(dataStatistic.carDetailsPassNum) roundToInt(
dataStatistic.carDetails,
dataStatistic.carDetailsPassNum
)
" "
:format="progressLine" :format="progressLine(dataStatistic.carDetailsPassNum)"
status="success" status="success"
text-color="#fff" text-color="#fff"
></el-progress> ></el-progress>
...@@ -354,9 +394,14 @@ ...@@ -354,9 +394,14 @@
:text-inside="true" :text-inside="true"
:stroke-width="16" :stroke-width="16"
:percentage=" :percentage="
percentageChange(dataStatistic.carDetailsNoPassNum) roundToInt(
dataStatistic.carDetails,
dataStatistic.carDetailsNoPassNum
)
"
:format="
progressLine(dataStatistic.carDetailsNoPassNum)
" "
:format="progressLine"
status="warning" status="warning"
text-color="#fff" text-color="#fff"
></el-progress> ></el-progress>
...@@ -364,9 +409,12 @@ ...@@ -364,9 +409,12 @@
:text-inside="true" :text-inside="true"
:stroke-width="16" :stroke-width="16"
:percentage=" :percentage="
percentageChange(dataStatistic.carDetailsUnderNum) roundToInt(
dataStatistic.carDetails,
dataStatistic.carDetailsUnderNum
)
" "
:format="progressLine" :format="progressLine(dataStatistic.carDetailsUnderNum)"
status="exception" status="exception"
color="#f98921" color="#f98921"
text-color="#fff" text-color="#fff"
...@@ -408,7 +456,7 @@ ...@@ -408,7 +456,7 @@
>标准条款通过(个)</span >标准条款通过(个)</span
> >
<span class="line-prograss-title" <span class="line-prograss-title"
>标准条款未通过(</span >标准条款未通过(</span
> >
<span class="line-prograss-title">审查中(个)</span> <span class="line-prograss-title">审查中(个)</span>
</div> </div>
...@@ -419,18 +467,26 @@ ...@@ -419,18 +467,26 @@
:text-inside="true" :text-inside="true"
:stroke-width="16" :stroke-width="16"
:percentage=" :percentage="
percentageChange(dataStatistic.carStandards) roundToInt(
dataStatistic.carStandards,
dataStatistic.carStandards
)
" "
:format="progressLine" :format="progressLine(dataStatistic.carStandards)"
text-color="#fff" text-color="#fff"
></el-progress> ></el-progress>
<el-progress <el-progress
:text-inside="true" :text-inside="true"
:stroke-width="16" :stroke-width="16"
:percentage=" :percentage="
percentageChange(dataStatistic.carStandardsPassNum) roundToInt(
dataStatistic.carStandards,
dataStatistic.carStandardsPassNum
)
"
:format="
progressLine(dataStatistic.carStandardsPassNum)
" "
:format="progressLine"
status="success" status="success"
text-color="#fff" text-color="#fff"
></el-progress> ></el-progress>
...@@ -438,9 +494,14 @@ ...@@ -438,9 +494,14 @@
:text-inside="true" :text-inside="true"
:stroke-width="16" :stroke-width="16"
:percentage=" :percentage="
percentageChange(dataStatistic.carStandardsNoPassNum) roundToInt(
dataStatistic.carStandards,
dataStatistic.carStandardsNoPassNum
)
"
:format="
progressLine(dataStatistic.carStandardsNoPassNum)
" "
:format="progressLine"
status="warning" status="warning"
text-color="#fff" text-color="#fff"
></el-progress> ></el-progress>
...@@ -448,9 +509,14 @@ ...@@ -448,9 +509,14 @@
:text-inside="true" :text-inside="true"
:stroke-width="16" :stroke-width="16"
:percentage=" :percentage="
percentageChange(dataStatistic.carStandardsUnderNum) roundToInt(
dataStatistic.carStandards,
dataStatistic.carStandardsUnderNum
)
"
:format="
progressLine(dataStatistic.carStandardsUnderNum)
" "
:format="progressLine"
status="exception" status="exception"
color="#f98921" color="#f98921"
text-color="#fff" text-color="#fff"
...@@ -461,11 +527,11 @@ ...@@ -461,11 +527,11 @@
</div> </div>
</el-col> </el-col>
</el-row> </el-row>
<div class="tip-navigation"> <div v-if="dataStatistic.testExist" class="tip-navigation">
<div class="tip"></div> <div class="tip"></div>
<div class="tip-title">车型试验</div> <div class="tip-title">车型试验</div>
</div> </div>
<el-row :gutter="40"> <el-row v-if="dataStatistic.testExist" :gutter="40">
<el-col :span="12"> <el-col :span="12">
<div style="border: 1px solid #ebebeb; padding: 24px 0 24px 24px"> <div style="border: 1px solid #ebebeb; padding: 24px 0 24px 24px">
<el-row class="prograss-title"> 用例维度 </el-row> <el-row class="prograss-title"> 用例维度 </el-row>
...@@ -505,18 +571,24 @@ ...@@ -505,18 +571,24 @@
:text-inside="true" :text-inside="true"
:stroke-width="16" :stroke-width="16"
:percentage=" :percentage="
percentageChange(dataStatistic.testDetails) roundToInt(
dataStatistic.testDetails,
dataStatistic.testDetails
)
" "
:format="progressLine" :format="progressLine(dataStatistic.testDetails)"
text-color="#fff" text-color="#fff"
></el-progress> ></el-progress>
<el-progress <el-progress
:text-inside="true" :text-inside="true"
:stroke-width="16" :stroke-width="16"
:percentage=" :percentage="
percentageChange(dataStatistic.testDetailsPassNum) roundToInt(
dataStatistic.testDetails,
dataStatistic.testDetailsPassNum
)
" "
:format="progressLine" :format="progressLine(dataStatistic.testDetailsPassNum)"
status="success" status="success"
text-color="#fff" text-color="#fff"
></el-progress> ></el-progress>
...@@ -524,9 +596,14 @@ ...@@ -524,9 +596,14 @@
:text-inside="true" :text-inside="true"
:stroke-width="16" :stroke-width="16"
:percentage=" :percentage="
percentageChange(dataStatistic.testDetailsNoPassNum) roundToInt(
dataStatistic.testDetails,
dataStatistic.testDetailsNoPassNum
)
"
:format="
progressLine(dataStatistic.testDetailsNoPassNum)
" "
:format="progressLine"
status="warning" status="warning"
text-color="#fff" text-color="#fff"
></el-progress> ></el-progress>
...@@ -534,9 +611,14 @@ ...@@ -534,9 +611,14 @@
:text-inside="true" :text-inside="true"
:stroke-width="16" :stroke-width="16"
:percentage=" :percentage="
percentageChange(dataStatistic.testDetailsUnderNum) roundToInt(
dataStatistic.testDetails,
dataStatistic.testDetailsUnderNum
)
"
:format="
progressLine(dataStatistic.testDetailsUnderNum)
" "
:format="progressLine"
status="exception" status="exception"
color="#f98921" color="#f98921"
text-color="#fff" text-color="#fff"
...@@ -585,18 +667,28 @@ ...@@ -585,18 +667,28 @@
:text-inside="true" :text-inside="true"
:stroke-width="16" :stroke-width="16"
:percentage=" :percentage="
percentageChange(dataStatistic.testDetailsUnderNum) roundToInt(
dataStatistic.testDetailsUnderNum,
dataStatistic.testDetailsUnderNum
)
"
:format="
progressLine(dataStatistic.testDetailsUnderNum)
" "
:format="progressLine"
text-color="#fff" text-color="#fff"
></el-progress> ></el-progress>
<el-progress <el-progress
:text-inside="true" :text-inside="true"
:stroke-width="16" :stroke-width="16"
:percentage=" :percentage="
percentageChange(dataStatistic.testStandardsPassNum) roundToInt(
dataStatistic.testDetailsUnderNum,
dataStatistic.testStandardsPassNum
)
"
:format="
progressLine(dataStatistic.testStandardsPassNum)
" "
:format="progressLine"
status="success" status="success"
text-color="#fff" text-color="#fff"
></el-progress> ></el-progress>
...@@ -604,9 +696,14 @@ ...@@ -604,9 +696,14 @@
:text-inside="true" :text-inside="true"
:stroke-width="16" :stroke-width="16"
:percentage=" :percentage="
percentageChange(dataStatistic.testStandardsNoPassNum) roundToInt(
dataStatistic.testDetailsUnderNum,
dataStatistic.testStandardsNoPassNum
)
"
:format="
progressLine(dataStatistic.testStandardsNoPassNum)
" "
:format="progressLine"
status="warning" status="warning"
text-color="#fff" text-color="#fff"
></el-progress> ></el-progress>
...@@ -614,9 +711,14 @@ ...@@ -614,9 +711,14 @@
:text-inside="true" :text-inside="true"
:stroke-width="16" :stroke-width="16"
:percentage=" :percentage="
percentageChange(dataStatistic.testStandardsUnderNum) roundToInt(
dataStatistic.testDetailsUnderNum,
dataStatistic.testStandardsUnderNum
)
"
:format="
progressLine(dataStatistic.testStandardsUnderNum)
" "
:format="progressLine"
status="exception" status="exception"
color="#f98921" color="#f98921"
text-color="#fff" text-color="#fff"
...@@ -632,9 +734,7 @@ ...@@ -632,9 +734,7 @@
<div class="tip-navigation"> <div class="tip-navigation">
<div class="tip"></div> <div class="tip"></div>
<div class="tip-title"> <div class="tip-title">
{{ {{ '整车样品信息 (' + completeVehicleSampleTotal + ')' }}
'整车样品信息 (' + taskForm.completeVehicleSample.length + ')'
}}
</div> </div>
</div> </div>
<div style="display: flex; flex-wrap: wrap"> <div style="display: flex; flex-wrap: wrap">
...@@ -756,7 +856,7 @@ ...@@ -756,7 +856,7 @@
<div class="tip-navigation"> <div class="tip-navigation">
<div class="tip"></div> <div class="tip"></div>
<div class="tip-title"> <div class="tip-title">
{{ '零部件样品信息 (' + taskForm.partVehicleSample.length + ')' }} {{ '零部件样品信息 (' + partVehicleSampleTotal + ')' }}
</div> </div>
</div> </div>
<div style="display: flex; flex-wrap: wrap"> <div style="display: flex; flex-wrap: wrap">
...@@ -873,6 +973,8 @@ export default { ...@@ -873,6 +973,8 @@ export default {
dicts: ['system_task_status', 'confidentiality_level', 'inspection_item'], dicts: ['system_task_status', 'confidentiality_level', 'inspection_item'],
data() { data() {
return { return {
completeVehicleSampleTotal: 0,
partVehicleSampleTotal: 0,
taskList: [], taskList: [],
taskId: '', taskId: '',
dialogVisible: false, dialogVisible: false,
...@@ -891,13 +993,23 @@ export default { ...@@ -891,13 +993,23 @@ export default {
methods: { methods: {
toEntrustedUnit() {}, toEntrustedUnit() {},
dict, dict,
roundToInt(a, b) {
if (a === null) {
a = 0
return 0
}
if (b === null) {
b = 0
}
return Math.round((b / a) * 100)
},
dictValueReturn(item) { dictValueReturn(item) {
if (item === 'sraifv') { if (item === 'sraifv') {
return '汽车信息安全管理体系要求' return '信息安全管理体系要求'
} else if (item === 'grfis') { } else if (item === 'grfis') {
return '汽车信息安全一般要求' return '信息安全一般要求'
} else { } else {
return '汽车信息安全技术要求' return '信息安全技术要求'
} }
}, },
getDataStatistics() { getDataStatistics() {
...@@ -909,6 +1021,17 @@ export default { ...@@ -909,6 +1021,17 @@ export default {
getTaskInfo() { getTaskInfo() {
selectTaskInfo({ id: this.taskId }).then(res => { selectTaskInfo({ id: this.taskId }).then(res => {
this.taskForm = res.data this.taskForm = res.data
if (res.data.partVehicleSample) {
this.partVehicleSampleTotal = res.data.partVehicleSample.length
} else {
this.taskForm.partVehicleSample = []
}
if (res.data.completeVehicleSample) {
this.completeVehicleSampleTotal =
res.data.completeVehicleSample.length
} else {
this.taskForm.completeVehicleSample = []
}
if (res.data.taskList) { if (res.data.taskList) {
this.taskList = this.taskForm.taskList.split(',') this.taskList = this.taskForm.taskList.split(',')
this.taskList.forEach((item, index) => { this.taskList.forEach((item, index) => {
...@@ -922,8 +1045,16 @@ export default { ...@@ -922,8 +1045,16 @@ export default {
return data.split(',') return data.split(',')
}, },
tabClick() {}, tabClick() {},
progressLine(percentage) { progressLine(data) {
return (percentage = `${percentage}`) if (data) {
return () => {
return data
}
} else {
return () => {
return 0
}
}
}, },
percentageChange(data) { percentageChange(data) {
if (data) { if (data) {
......
...@@ -82,6 +82,22 @@ ...@@ -82,6 +82,22 @@
<el-table-column <el-table-column
prop="deptName" prop="deptName"
label="部门名称" label="部门名称"
show-overflow-tooltip
width="260"
align="left"
></el-table-column>
<el-table-column
prop="address"
label="地址"
show-overflow-tooltip
width="260"
align="left"
></el-table-column>
<el-table-column
prop="postcode"
label="邮政编码"
show-overflow-tooltip
width="260" width="260"
align="left" align="left"
></el-table-column> ></el-table-column>
......
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
<div class="user-info-head" @click="editCropper()"> <div class="user-info-head" @click="editCropper()">
<img :src="options.img" title="点击上传头像" class="img-circle img-lg" /> <img :src="options.img" title="点击上传头像" class="img-circle img-lg" />
</div> </div>
<el-dialog <el-dialog
:title="title" :title="title"
:visible.sync="open" :visible.sync="open"
...@@ -90,11 +91,12 @@ import store from '@/store' ...@@ -90,11 +91,12 @@ import store from '@/store'
import { VueCropper } from 'vue-cropper' import { VueCropper } from 'vue-cropper'
import { uploadAvatar } from '@/api/system/user' import { uploadAvatar } from '@/api/system/user'
import { debounce } from '@/utils' import { debounce } from '@/utils'
import avatar from '@/assets/images/touxiang.png'
export default { export default {
components: { VueCropper }, components: { VueCropper },
data() { data() {
return { return {
avatar,
// 是否显示弹出层 // 是否显示弹出层
open: false, open: false,
// 是否显示cropper // 是否显示cropper
......
...@@ -137,7 +137,9 @@ ...@@ -137,7 +137,9 @@
style="margin-right: 5px" style="margin-right: 5px"
fill="#999999" fill="#999999"
/> />
{{ item.leader ? item.leader : '---' }} <span class="taskLeader">{{
item.leader ? item.leader : '---'
}}</span>
</div> </div>
</div> </div>
<div class="card-cell"> <div class="card-cell">
...@@ -406,7 +408,9 @@ ...@@ -406,7 +408,9 @@
style="margin-right: 5px" style="margin-right: 5px"
fill="#999999" fill="#999999"
/> />
{{ item.leader ? item.leader : '---' }} <span class="taskLeader">{{
item.leader ? item.leader : '---'
}}</span>
</div> </div>
</div> </div>
<div class="card-buttons"> <div class="card-buttons">
......
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