|
@@ -189,7 +189,7 @@ export default {
|
|
},
|
|
},
|
|
subjectId: {
|
|
subjectId: {
|
|
handler(newValue, oldValue) {
|
|
handler(newValue, oldValue) {
|
|
- console.log(newValue, oldValue)
|
|
|
|
|
|
+ console.log(newValue, '过来的id')
|
|
this.optionsOId = newValue
|
|
this.optionsOId = newValue
|
|
if(this.optionsOId && this.optionsOId.length != 0) {
|
|
if(this.optionsOId && this.optionsOId.length != 0) {
|
|
this.traverseArr(this.options, this.optionsOId)
|
|
this.traverseArr(this.options, this.optionsOId)
|
|
@@ -231,6 +231,8 @@ export default {
|
|
}
|
|
}
|
|
if(this.subjectId) {
|
|
if(this.subjectId) {
|
|
this.optionsOId = JSON.parse(JSON.stringify(this.subjectId))
|
|
this.optionsOId = JSON.parse(JSON.stringify(this.subjectId))
|
|
|
|
+ console.log(this.options, '过来的数据')
|
|
|
|
+ this.traverseArr(this.options, this.optionsOId)
|
|
for(let i in this.options) {
|
|
for(let i in this.options) {
|
|
if(this.options[i].id == this.optionsOId || this.options[i].auditorId == this.optionsOId) {
|
|
if(this.options[i].id == this.optionsOId || this.options[i].auditorId == this.optionsOId) {
|
|
this.selectName = this.options[i].name || this.options[i].auditorName
|
|
this.selectName = this.options[i].name || this.options[i].auditorName
|
|
@@ -247,11 +249,12 @@ export default {
|
|
methods: {
|
|
methods: {
|
|
// 循环取值
|
|
// 循环取值
|
|
traverseArr(arr, idd){
|
|
traverseArr(arr, idd){
|
|
- console.log(arr, idd, '传过来的值')
|
|
|
|
let id = idd[0]
|
|
let id = idd[0]
|
|
if(arr) {
|
|
if(arr) {
|
|
for(var i in arr) {
|
|
for(var i in arr) {
|
|
- if(arr[i].value == id) {
|
|
|
|
|
|
+ console.log(arr[i].value, idd)
|
|
|
|
+ if(arr[i].value == idd) {
|
|
|
|
+ console.log('将要付给的值', arr[i])
|
|
this.selectName = arr[i].label
|
|
this.selectName = arr[i].label
|
|
if(arr[i].type) {
|
|
if(arr[i].type) {
|
|
this.selectNameType = arr[i].type
|
|
this.selectNameType = arr[i].type
|