Commit 34c90699 authored by baiyanhao's avatar baiyanhao

修改代码前提交

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