更换责任领域接口
This commit is contained in:
@@ -66,6 +66,7 @@ const editDictItem = (params)=>putAction("/sys/dictItem/edit",params);
|
||||
|
||||
//字典标签专用(通过code获取字典数组)
|
||||
export const ajaxGetDictItems = (code, params)=>getAction(`/sys/dict/getDictItems/${code}`,params);
|
||||
export const getDutyTerritoryDictItems = (code, params)=>getAction(`/sys/dict/getDutyTerritoryDictItems/${code}`,params);
|
||||
//从缓存中获取字典配置
|
||||
function getDictItemsFromCache(dictCode) {
|
||||
if (Vue.ls.get(UI_CACHE_DB_DICT_DATA) && Vue.ls.get(UI_CACHE_DB_DICT_DATA)[dictCode]) {
|
||||
|
||||
@@ -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
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
@@ -44,37 +44,37 @@
|
||||
</a-select>
|
||||
</div>
|
||||
</a-col>
|
||||
<template v-if="toggleSearchStatus">
|
||||
<a-col :md="6" :sm="8">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text" :title="$t('Tasknode')">
|
||||
<span>{{$t('Tasknode')}}</span>
|
||||
</div>
|
||||
<a-select :placeholder="$t('PleaseSelect')+$t('Tasknode')"
|
||||
class="box-input"
|
||||
:getPopupContainer="triggerNode=> triggerNode.parentNode"
|
||||
allowClear
|
||||
showSearch
|
||||
optionFilterProp="label"
|
||||
v-model="queryParam.status">
|
||||
<a-select-option v-for="(item, key) in taskStatusList"
|
||||
:key="key"
|
||||
:label="item.name"
|
||||
:value="item.value">
|
||||
<span style="display: inline-block;width: 100%" :title=" item.name">
|
||||
{{ item.name }}
|
||||
</span>
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
</div>
|
||||
</a-col>
|
||||
</template>
|
||||
<!-- <template v-if="toggleSearchStatus">-->
|
||||
<!-- <a-col :md="6" :sm="8">-->
|
||||
<!-- <div class="box-title-text">-->
|
||||
<!-- <div class="title-text" :title="$t('Tasknode')">-->
|
||||
<!-- <span>{{$t('Tasknode')}}</span>-->
|
||||
<!-- </div>-->
|
||||
<!-- <a-select :placeholder="$t('PleaseSelect')+$t('Tasknode')"-->
|
||||
<!-- class="box-input"-->
|
||||
<!-- :getPopupContainer="triggerNode=> triggerNode.parentNode"-->
|
||||
<!-- allowClear-->
|
||||
<!-- showSearch-->
|
||||
<!-- optionFilterProp="label"-->
|
||||
<!-- v-model="queryParam.status">-->
|
||||
<!-- <a-select-option v-for="(item, key) in taskStatusList"-->
|
||||
<!-- :key="key"-->
|
||||
<!-- :label="item.name"-->
|
||||
<!-- :value="item.value">-->
|
||||
<!-- <span style="display: inline-block;width: 100%" :title=" item.name">-->
|
||||
<!-- {{ item.name }}-->
|
||||
<!-- </span>-->
|
||||
<!-- </a-select-option>-->
|
||||
<!-- </a-select>-->
|
||||
<!-- </div>-->
|
||||
<!-- </a-col>-->
|
||||
<!-- </template>-->
|
||||
<span style="float: right;overflow: hidden;margin-right: 11px" class="table-page-search-submitButtons">
|
||||
<a-col :md="6" :sm="24">
|
||||
<a @click="handleToggleSearch">
|
||||
{{ !toggleSearchStatus ? $t('open') : $t('away') }}
|
||||
<a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>
|
||||
</a>
|
||||
<!-- <a @click="handleToggleSearch">-->
|
||||
<!-- {{ !toggleSearchStatus ? $t('open') : $t('away') }}-->
|
||||
<!-- <a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>-->
|
||||
<!-- </a>-->
|
||||
<a-button class="box-button" style="margin-left: 8px" @click="searchReset">{{$t('reset')}}</a-button>
|
||||
<a-button class="box-button" style="margin-left: 8px" type="primary" @click="searchQuery">{{$t('query')}}</a-button>
|
||||
</a-col>
|
||||
|
||||
Reference in New Issue
Block a user