| | |
| | | import request from '@/axios' |
| | | |
| | | // 字典查询 行业 算法 工单类型 |
| | | export const getDictionary = params => { |
| | | return request({ |
| | | url: `/blade-system/dict-biz/listByCodes?codes=${params}`, |
| | | method: 'get', |
| | | }) |
| | | } |
| | | |
| | | // 区域 |
| | | export const deptsByAreaCode = params => { |
| | | return request({ |
| | |
| | | params, |
| | | }) |
| | | } |
| | | // 多个字典查询 |
| | | export const getMultipleDictionary = params => { |
| | | return request({ |
| | | url: `/blade-system/dict-biz/listByCodes?codes=${params}`, |
| | | method: 'get', |
| | | }) |
| | | } |
| | |
| | | </template> |
| | | |
| | | <script setup> |
| | | import { getDictionary } from '@/api/home/common'; |
| | | |
| | | import { getMultipleDictionary } from '@/api/system/dictbiz' |
| | | |
| | | // 接收父组件传参 |
| | | const props = defineProps({ |
| | |
| | | |
| | | // 请求字典字段 |
| | | const requestDictionary = () => { |
| | | getDictionary('SF,HYLB').then((res) => { |
| | | getMultipleDictionary('SF,HYLB').then((res) => { |
| | | if (res.code !== 0) { |
| | | // 处理数据 |
| | | taskAlgorithm.value = res.data.data['SF']; |
| | |
| | | onMounted(() => { |
| | | requestDictionary(); |
| | | }); |
| | | </script> |
| | | </script> |