| | |
| | | v-if="item.elTagType == 'default' || item.elTagType == ''"
|
| | | :key="item.value"
|
| | | :index="index"
|
| | | :class="item.elTagType"
|
| | | :class="item.elTagClass"
|
| | | >{{ item.label }}</span>
|
| | | <el-tag
|
| | | v-else
|
| | |
| | | :key="item.value + ''"
|
| | | :index="index"
|
| | | :type="item.elTagType === 'primary' ? '' : item.elTagType"
|
| | | :class="item.elTagType"
|
| | | :class="item.elTagClass"
|
| | | >{{ item.label }}</el-tag>
|
| | | </template>
|
| | | </template>
|
| | |
| | | import './permission' // permission control
|
| | |
|
| | | import { useDict } from '@/utils/dict'
|
| | | import { parseTime, resetForm, addDateRange, handleTree, selectDictLabel } from '@/utils/ruoyi'
|
| | | import { parseTime, resetForm, addDateRange, handleTree, selectDictLabel, selectDictLabels } from '@/utils/ruoyi'
|
| | |
|
| | | // 分页组件
|
| | | import Pagination from '@/components/Pagination'
|
| | |
| | | app.config.globalProperties.handleTree = handleTree
|
| | | app.config.globalProperties.addDateRange = addDateRange
|
| | | app.config.globalProperties.selectDictLabel = selectDictLabel
|
| | | app.config.globalProperties.selectDictLabels = selectDictLabels
|
| | |
|
| | | // 全局组件挂载
|
| | | app.component('DictTag', DictTag)
|
| | |
| | | args.forEach((d, index) => {
|
| | | res.value[d] = [];
|
| | | getDicts(d).then(resp => {
|
| | | res.value[d] = resp.data.map(p => ({ label: p.dictLabel, value: p.dictValue, elTagType: p.listClass }))
|
| | | res.value[d] = resp.data.map(p => ({ label: p.dictLabel, value: p.dictValue, elTagType: p.listClass, elTagClass: p.cssClass }))
|
| | | })
|
| | | })
|
| | | return toRefs(res.value);
|