更换责任领域接口

This commit is contained in:
范强强
2023-04-17 17:11:09 +08:00
parent 827ea7152d
commit f359d26fc6
4 changed files with 63 additions and 42 deletions
@@ -25,7 +25,7 @@
</template>
<script>
import { ajaxGetDictItems, getDictItemsFromCache } from '@/api/api'
import { ajaxGetDictItems, getDictItemsFromCache, getDutyTerritoryDictItems } from '@/api/api'
export default {
name: 'JDictSelectTag',
@@ -88,12 +88,22 @@
}
//根据字典Code, 初始化字典数组
ajaxGetDictItems(this.dictCode, null).then((res) => {
if (res.success) {
if (this.dictCode == 'duty_territory'){
getDutyTerritoryDictItems(this.dictCode, null).then((res) => {
if (res.success) {
// console.log(res.result);
this.dictOptions = res.result
}
})
this.dictOptions = res.result
}
})
}else{
ajaxGetDictItems(this.dictCode, null).then((res) => {
if (res.success) {
// console.log(res.result);
this.dictOptions = res.result
}
})
}
},
handleInput(e) {
let val
@@ -109,7 +119,7 @@
}
})
if (this.triggerChange) {
this.$emit('change', val,content)
this.$emit('change', val, content)
} else {
this.$emit('input', val)
this.$emit('changeQuery', content, this.db_field_name)
@@ -27,7 +27,7 @@
</template>
<script>
import { ajaxGetDictItems, getDictItemsFromCache } from '@/api/api'
import { ajaxGetDictItems, getDictItemsFromCache,getDutyTerritoryDictItems } from '@/api/api'
export default {
name: 'JMultiSelectTag',
@@ -117,11 +117,21 @@
return
}
//根据字典Code, 初始化字典数组
ajaxGetDictItems(this.dictCode, null).then((res) => {
if (res.success) {
this.dictOptions = res.result
}
})
if (this.dictCode == 'duty_territory'){
getDutyTerritoryDictItems(this.dictCode, null).then((res) => {
if (res.success) {
// console.log(res.result);
this.dictOptions = res.result
}
})
}else{
ajaxGetDictItems(this.dictCode, null).then((res) => {
if (res.success) {
// console.log(res.result);
this.dictOptions = res.result
}
})
}
}
},