Commit 326171f0 authored by 盖献康's avatar 盖献康

feat: 审查问卷左侧css、符合场景按钮位置。各页面交互

parent 6324395b
......@@ -619,6 +619,7 @@ export default {
},
/* 返回跳转*/
goToProcessedReview() {
this.$modal.msgSuccess('确认提交成功')
this.$router.push('/task/on')
},
getRows(i) {
......
......@@ -278,7 +278,7 @@
<el-col :span="8">
<el-form-item label="商标" prop="trademark">
<ImageUpload
v-model="imageUrl"
v-model="model.trademark"
:is-show-tip="false"
:limit="1"
></ImageUpload>
......@@ -391,7 +391,7 @@ export default {
{ required: true, message: '任务名称不能为空', trigger: 'blur' }
],
taskStatus: [
{ required: true, message: '任务状态不能为空', trigger: 'blur' }
{ required: true, message: '任务状态不能为空', trigger: 'change' }
],
productName: [
{ required: true, message: '产品名称不能为空', trigger: 'blur' }
......@@ -428,10 +428,10 @@ export default {
{ required: true, message: '样品名称不能为空', trigger: 'blur' }
],
productionEnterprise: [
{ required: true, message: '生产企业不能为空', trigger: 'blur' }
{ required: true, message: '生产企业不能为空', trigger: 'change' }
],
trademark: [
{ required: true, message: '商标不能为空', trigger: 'blur' }
{ required: true, message: '商标不能为空', trigger: 'change' }
],
sampleSender: [
{ required: true, message: '送样者不能为空', trigger: 'blur' }
......@@ -449,7 +449,7 @@ export default {
{ required: true, message: '检验依据不能为空', trigger: 'blur' }
],
inspectionItem: [
{ required: true, message: '检验项目不能为空', trigger: 'blur' }
{ required: true, message: '检验项目不能为空', trigger: 'change' }
]
},
userList: [
......@@ -484,6 +484,18 @@ export default {
]
}
},
watch: {
'model.trademark': {
handler(newValue, oldValue) {
if (newValue) {
console.log('aaa')
this.$refs.form.clearValidate('trademark')
} else {
this.$refs.form.validateField('trademark')
}
}
}
},
methods: {
/**
* 小组信息修改
......@@ -580,7 +592,10 @@ export default {
handleAdd() {
this.$refs.form.validate(valid => {
if (valid) {
console.log('aaaa')
this.$modal.msgSuccess('发布成功')
this.$router.push({
path: '/task/on'
})
}
})
},
......@@ -588,7 +603,7 @@ export default {
handleSave() {
this.$refs.form.validate(valid => {
if (valid) {
console.log('aaaa')
this.$modal.msgSuccess('暂存成功')
}
})
}
......
......@@ -18,17 +18,28 @@
<el-row>
<!-- 步骤条 -->
<el-col :span="2">
<div class="left-content" style="height: 300px">
<div
v-for="(item, index) in circleList"
:key="index"
:class="{
'select-circle': item.checked === true,
'no-select-circle': item.checked === false
}"
@click="handleCircle(item)"
>
<span class="inner-text">{{ item.id }}</span>
<div class="left-content" style="height: 300px; width: 110px">
<div v-for="(item, index) in circleList" :key="index">
<div
:class="{
'exclamation-point': item.problem === true,
'no-exclamation-point': item.problem === false
}"
>
<div v-show="item.problem" class="exclamation">!</div>
</div>
<div
:class="{
'select-circle': item.checked === true,
'no-select-circle': item.checked === false
}"
@click="handleCircle(item)"
>
<span class="inner-text">{{ item.id }}</span>
</div>
<span v-show="item.tick" class="tick-class">
<i class="el-icon-check" />
</span>
</div>
</div>
</el-col>
......@@ -58,9 +69,17 @@
>
</el-form-item>
<el-form-item :label="'符合场景'">
<el-button size="mini" type="warning" @click="handleAddScene">
新增场景
</el-button>
<template slot="label">
<span>符合场景</span>
<el-button
class="label-btn"
size="mini"
type="warning"
@click="handleAddScene"
>
<span>新增场景</span>
</el-button>
</template>
<div class="match-scene">
<div>1.管理制度发布会红头文件</div>
<div>2.管理制度正式发布会议纪要</div>
......@@ -210,22 +229,26 @@
</el-card>
</el-form-item>
<el-form-item label="条目填写人">
<span></span>
<span>小刚</span>
</el-form-item>
</el-form>
</el-col>
</el-row>
</div>
<div class="bottom-btn">
<el-button type="warning">保存当前条目</el-button>
<el-button type="primary">提交问卷</el-button>
<el-button type="warning" @click="saveCurrentItem">
保存当前条目
</el-button>
<el-button type="primary" @click="submitQuestionnaire"
>提交问卷</el-button
>
</div>
</el-card>
<!-- 新增场景对话框 -->
<el-dialog
title="新增场景对话框"
:visible.sync="senceDialogVisible"
width="30%"
width="35%"
append-to-body
:close-on-click-modal="false"
:close-on-press-escape="false"
......@@ -250,6 +273,7 @@
<el-select
v-model="sceneForm.reviewType"
placeholder="请选择评审类型"
style="width: 100%"
>
<el-option
v-for="item in reviewTypeOptions"
......@@ -263,6 +287,7 @@
<el-select
v-model="sceneForm.sceneClassification"
placeholder="请选择评审类型"
style="width: 100%"
>
<el-option
v-for="item in reviewTypeOptions"
......@@ -313,16 +338,16 @@ export default {
form: {},
checked: false,
circleList: [
{ id: 1, checked: true },
{ id: 2, checked: false },
{ id: 3, checked: false },
{ id: 4, checked: false },
{ id: 5, checked: false },
{ id: 6, checked: false },
{ id: 7, checked: false },
{ id: 8, checked: false },
{ id: 9, checked: false },
{ id: 10, checked: false }
{ id: 1, checked: false, problem: false, tick: true },
{ id: 2, checked: true, problem: false, tick: false },
{ id: 3, checked: false, problem: true, tick: false },
{ id: 4, checked: false, problem: false, tick: false },
{ id: 5, checked: false, problem: false, tick: false },
{ id: 6, checked: false, problem: false, tick: false },
{ id: 7, checked: false, problem: false, tick: false },
{ id: 8, checked: false, problem: false, tick: false },
{ id: 9, checked: false, problem: false, tick: false },
{ id: 10, checked: false, problem: false, tick: false }
],
fileRules: {
enterpriseName: [
......@@ -378,6 +403,9 @@ export default {
reviewTypeOptions: []
}
},
created() {
console.log('人', this.$store.state.user.name)
},
methods: {
/**
* 点击左侧圆圈触发的回调函数
......@@ -398,6 +426,14 @@ export default {
this.senceDialogVisible = true
console.log('a')
},
// 保存当前条目
saveCurrentItem() {
this.$modal.msgSuccess('保存当前条目成功')
},
submitQuestionnaire() {
this.$modal.msgSuccess('提交问卷成功')
this.$router.back()
},
// 新增场景对话框关闭时触发的回调函数
handleSceneClose() {
this.senceDialogVisible = false
......@@ -449,6 +485,43 @@ export default {
}
}
.left-content {
.tick-class {
float: right;
position: relative;
top: -1.8em;
left: -1em;
i {
color: #25c173;
}
}
.no-exclamation-point {
float: left;
width: 1px;
height: 1px;
padding-left: 30px;
}
.exclamation-point {
float: left;
margin-top: 6px;
margin-right: 10px;
position: relative;
width: 20px;
height: 20px;
border: 2px solid #f56c6c;
border-radius: 50%;
display: flex;
justify-content: center;
align-items: center;
font-size: 24px;
font-weight: bold;
margin-bottom: 5px;
.exclamation {
position: absolute;
font-size: 12px;
color: #f56c6c;
font-weight: bold;
}
}
.no-select-circle {
cursor: pointer;
width: 35px;
......@@ -522,10 +595,11 @@ export default {
}
}
.file-prompt {
margin: 10px 0 10px 0;
margin: 0 0 10px 0;
padding: 10px;
background-color: #ebf5ff;
div {
font-size: 12px;
padding-left: 10px;
i {
color: #409eff;
......@@ -533,4 +607,12 @@ export default {
}
}
}
.label-btn {
width: 60px;
span {
font-size: 12px;
position: relative;
right: 9px;
}
}
</style>
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