Commit 34c90699 authored by baiyanhao's avatar baiyanhao

修改代码前提交

parent 43f1e0f7
...@@ -2,9 +2,7 @@ ...@@ -2,9 +2,7 @@
<page-standard class="create-review"> <page-standard class="create-review">
<div slot="tab"> <div slot="tab">
<el-row class="vif0"> <el-row class="vif0">
<el-col :span="3"> <el-col :span="3"> </el-col>
</el-col>
<el-col :span="21"> <el-col :span="21">
<div v-if="pageIndex === 0" class="create-review-content"> <div v-if="pageIndex === 0" class="create-review-content">
<div class="center-tip"> <div class="center-tip">
...@@ -21,47 +19,44 @@ ...@@ -21,47 +19,44 @@
<div style="font-size: 18px">只能选择一种类型</div> <div style="font-size: 18px">只能选择一种类型</div>
</div> </div>
<el-form <el-form
v-if="pageIndex === 0" v-if="pageIndex === 0"
ref="queryForm" ref="queryForm"
class="tab-form" class="tab-form"
:model="formModel" :model="formModel"
size="small" size="small"
:inline="true" :inline="true"
> >
<el-form-item label="选择标准" v-bind="standardList" <el-form-item
:style=" { margin: '30px', label="选择标准"
'margin-left': '-100px', v-bind="standardList"
}"> :style="{ margin: '30px', 'margin-left': '-100px' }"
<el-select
placeholder="请选择标准"
v-model="selected"
filterable
clearable
size="medium"
@change="handleSelectStandard(selected)"
> >
<el-option <el-select
v-for="(item, indexS) in standardList" placeholder="请选择标准"
:key="indexS" v-model="selected"
:label="item.standardNo" filterable
:value="item.standardNo" clearable
>{{ item.standardNo }} size="medium"
</el-option> @change="handleSelectStandard(selected)"
</el-select> >
</el-form-item> <el-option
v-for="(item, indexS) in standardList"
</el-form> :key="indexS"
<div class="bg-transparent"> :label="item.standardNo"
<p :style="{ color:'transparent', :value="item.id"
UserSelect: 'none', >{{ item.standardNo }}
}">sss</p> </el-option>
</el-select>
</div> </el-form-item>
</el-form>
<div class="bg-transparent">
<p :style="{ color: 'transparent', UserSelect: 'none' }">sss</p>
</div>
<div <div
v-for="(reviewType, typeIndex) in dict.type.create_review_type" v-for="(reviewType, typeIndex) in dict.type.create_review_type"
:key="reviewType.value" :key="reviewType.value"
:class="['review-type-content', { 'third-row': typeIndex === 2 }]" :class="['review-type-content', { 'third-row': typeIndex === 2 }]"
:style="typeIndex === 2 ? { marginLeft: '-270px' } : {}" :style="typeIndex === 2 ? { marginLeft: '-270px' } : {}"
> >
<span>{{ reviewType.label }}</span> <span>{{ reviewType.label }}</span>
<el-button <el-button
...@@ -366,7 +361,8 @@ export default { ...@@ -366,7 +361,8 @@ export default {
standardNo: '', standardNo: '',
name: '', name: '',
id: '', id: '',
operationSort: '' operationSort: '',
inspectStandardId:''
}, },
selectedItem: { selectedItem: {
name: '', name: '',
...@@ -422,34 +418,55 @@ export default { ...@@ -422,34 +418,55 @@ export default {
.then(response => { .then(response => {
this.standardList = response.rows this.standardList = response.rows
this.selected = this.standardList[0].standardNo this.selected = this.standardList[0].standardNo
this.pageIndexSec.inspectStandardId = this.standardList[0].id
this.pageIndexSec.standardNo = this.standardList[0].standardNo
// console.log(response, '1111')
console.log(response, '1111')
}) })
.catch(error => { .catch(error => {
console.error('testInitatereview接口出错', error) console.error('testInitatereview接口出错', error)
}) })
}, },
// vif0 下拉框选择标准 // vif0 下拉框选择标准
// handleSelectStandard(selected) {
// this.selectedItem = this.standardList.find(
// item => item.id === selected
// )
// if (this.selectedItem) {
// // 将 item.name 赋值给 this.pageIndexSec.name
// this.pageIndexSec.name = this.selectedItem.name
// this.pageIndexSec.inspectStandardId = this.selectedItem.id
// this.pageIndexSec.standardNo = this.selectedItem.standardNo
// } else {
// console.log('赋值给 this.pageIndexSec.name时出现问题')
// }
// },
handleSelectStandard(selected) { handleSelectStandard(selected) {
this.selectedItem = this.standardList.find( console.log(selected, "handleSelectStandard selected");
item => item.standardNo === selected
) // 查找选中的项
if (this.selectedItem) { const selectedItem = this.standardList.find(
// 将 item.name 赋值给 this.pageIndexSec.name item => item.id === selected
this.pageIndexSec.name = this.selectedItem.name );
this.pageIndexSec.id = this.selectedItem.id
if (selectedItem) {
// 将选中的项的属性赋值给 pageIndexSec
this.pageIndexSec.name = selectedItem.name;
this.pageIndexSec.inspectStandardId = selectedItem.id;
this.pageIndexSec.standardNo = selectedItem.standardNo;
} else { } else {
console.log('赋值给 this.pageIndexSec.name时出现问题') console.error("赋值给 this.pageIndexSec 时出现问题");
} }
}, },
// 按钮-选择类型 // 按钮-选择类型
handleSelectType(reviewType, reviewSubtype) { handleSelectType(reviewType, reviewSubtype) {
console.log('评审类型 = ', reviewType) // console.log('评审类型 = ', reviewType)
console.log('评审子类型 = ', reviewSubtype) // console.log('评审子类型 = ', reviewSubtype)
this.formModel.reviewType = reviewType this.formModel.reviewType = reviewType
this.formModel.reviewSubtype = reviewSubtype this.formModel.reviewSubtype = reviewSubtype
console.log(this.formModel) console.log(this.formModel)
...@@ -480,9 +497,14 @@ export default { ...@@ -480,9 +497,14 @@ export default {
) { ) {
this.pageIndexSec.reviewSubtype = this.formModel.reviewSubtype this.pageIndexSec.reviewSubtype = this.formModel.reviewSubtype
this.pageIndexSec.reviewType = this.formModel.reviewType this.pageIndexSec.reviewType = this.formModel.reviewType
this.pageIndexSec.standardNo = this.selected
this.pageIndexSec.operationSort = 'ADD_KEYPOINT'
this.pageIndexSec.id = this.selectedItem.id this.pageIndexSec.id = this.selectedItem.id
this.pageIndexSec.operationSort = 'ADD_KEYPOINT'
// if(this.selectedItem){
// this.pageIndexSec.inspectStandardId = this.selectedItem.id
// }else if(!this.selectedItem){
// this.pageIndexSec.inspectStandardId = '1'
// }
// this.pageIndexSec.name = this.postData.name // this.pageIndexSec.name = this.postData.name
this.pageIndex = 1 this.pageIndex = 1
} else if ( } else if (
......
...@@ -389,8 +389,10 @@ export default { ...@@ -389,8 +389,10 @@ export default {
//根据 inspectStandardId => standard/findStandardList 的id //根据 inspectStandardId => standard/findStandardList 的id
// inspectStandardNo => standard/findStandardList 的standardNo // inspectStandardNo => standard/findStandardList 的standardNo
//operationSort => 这个在点击下一步的界面 通过选择新增场景时就已经设置好了 为新增 ADD_SENCE 或删除 //operationSort => 这个在点击下一步的界面 通过选择新增场景时就已经设置好了 为新增 ADD_SENCE 或删除
this.newResDataAdd.inspectStandardId = this.pageIndexSec.id this.newResDataAdd.inspectStandardId = this.pageIndexSec.inspectStandardId
console.log(this.pageIndexSec.id,'submitRequirement id')
this.newResDataAdd.inspectStandardNo = this.pageIndexSec.standardNo this.newResDataAdd.inspectStandardNo = this.pageIndexSec.standardNo
console.log(this.pageIndexSec.standardNo,'submitRequirement no')
this.newResDataAdd.operationSort = this.pageIndexSec.operationSort this.newResDataAdd.operationSort = this.pageIndexSec.operationSort
console.log(this.newResData, '选择标准要求弹窗确认newResData') console.log(this.newResData, '选择标准要求弹窗确认newResData')
console.log(this.newResDataAdd, '选择标准要求弹窗确认newResDataAdd') console.log(this.newResDataAdd, '选择标准要求弹窗确认newResDataAdd')
...@@ -414,7 +416,7 @@ export default { ...@@ -414,7 +416,7 @@ export default {
.then(response => { .then(response => {
this.receivedRequirements = response this.receivedRequirements = response
this.newResDataAdd.inspectStandardId = this.pageIndexSec.id this.newResDataAdd.inspectStandardId = this.pageIndexSec.inspectStandardId
this.newResDataAdd.inspectStandardNo = this.pageIndexSec.standardNo this.newResDataAdd.inspectStandardNo = this.pageIndexSec.standardNo
this.newResDataAdd.operationSort = this.pageIndexSec.operationSort this.newResDataAdd.operationSort = this.pageIndexSec.operationSort
...@@ -487,7 +489,8 @@ export default { ...@@ -487,7 +489,8 @@ export default {
this.newResDataAdd.remark = this.newReviewSceneRemark this.newResDataAdd.remark = this.newReviewSceneRemark
// this.newResDataAdd.inspectStandardId = this.pageIndexSec.id this.newResDataAdd.inspectStandardId = this.pageIndexSec.inspectStandardId
console.log(this.pageIndexSec)
console.log(this.newResDataAdd.inspectStandardId, '提交之前') console.log(this.newResDataAdd.inspectStandardId, '提交之前')
this.$refs.formItemName.validate(valid =>{ this.$refs.formItemName.validate(valid =>{
......
...@@ -473,7 +473,7 @@ export default { ...@@ -473,7 +473,7 @@ export default {
//根据 inspectStandardId => standard/findStandardList 的id //根据 inspectStandardId => standard/findStandardList 的id
// inspectStandardNo => standard/findStandardList 的standardNo // inspectStandardNo => standard/findStandardList 的standardNo
//operationSort => 这个在点击下一步的界面 通过选择新增场景时就已经设置好了 为新增 ADD_SENCE 或删除 //operationSort => 这个在点击下一步的界面 通过选择新增场景时就已经设置好了 为新增 ADD_SENCE 或删除
this.newResDataAdd.inspectStandardId = this.pageIndexSec.id this.newResDataAdd.inspectStandardId = this.pageIndexSec.inspectStandardId
this.newResDataAdd.inspectStandardNo = this.pageIndexSec.standardNo this.newResDataAdd.inspectStandardNo = this.pageIndexSec.standardNo
this.newResDataAdd.operationSort = this.pageIndexSec.operationSort this.newResDataAdd.operationSort = this.pageIndexSec.operationSort
console.log(this.newResData, '选择标准要求弹窗确认newResData') console.log(this.newResData, '选择标准要求弹窗确认newResData')
...@@ -498,7 +498,7 @@ export default { ...@@ -498,7 +498,7 @@ export default {
.then(response => { .then(response => {
this.receivedRequirements = response this.receivedRequirements = response
this.newResDataAdd.inspectStandardId = this.pageIndexSec.id this.newResDataAdd.inspectStandardId = this.pageIndexSec.
this.newResDataAdd.inspectStandardNo = this.pageIndexSec.standardNo this.newResDataAdd.inspectStandardNo = this.pageIndexSec.standardNo
this.newResDataAdd.operationSort = this.pageIndexSec.operationSort this.newResDataAdd.operationSort = this.pageIndexSec.operationSort
......
...@@ -80,7 +80,7 @@ ...@@ -80,7 +80,7 @@
<!-- 弹窗底部 --> <!-- 弹窗底部 -->
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button type="success" plain @click="dialogVisible = false">确认</el-button> <el-button type="primary" plain @click="dialogVisible = false">确认</el-button>
</div> </div>
</el-dialog> </el-dialog>
</div> </div>
......
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