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