feat: 功能和界面
This commit is contained in:
parent
f05537cb7e
commit
349bb9c0d0
@ -17,7 +17,7 @@
|
|||||||
v-for="dict in ti_function_config"
|
v-for="dict in ti_function_config"
|
||||||
:key="dict.value"
|
:key="dict.value"
|
||||||
:label="dict.label"
|
:label="dict.label"
|
||||||
:value="dict.label"
|
:value="dict.value"
|
||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|||||||
@ -36,7 +36,11 @@
|
|||||||
<!-- 功能表格 -->
|
<!-- 功能表格 -->
|
||||||
<el-table :data="tableData" style="width: 100%">
|
<el-table :data="tableData" style="width: 100%">
|
||||||
<el-table-column prop="id" label="ID" />
|
<el-table-column prop="id" label="ID" />
|
||||||
<el-table-column prop="funcKey" label="功能名称"/>
|
<el-table-column prop="funcKey" label="功能名称">
|
||||||
|
<template #default="{ row }">
|
||||||
|
<div>{{ formatFuncName(row.funcKey) }}</div>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column prop="iconUrl" label="图片" >
|
<el-table-column prop="iconUrl" label="图片" >
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<el-image
|
<el-image
|
||||||
@ -92,6 +96,7 @@ import { ElMessage, ElMessageBox, ElImageViewer } from 'element-plus'
|
|||||||
import { Plus } from '@element-plus/icons-vue'
|
import { Plus } from '@element-plus/icons-vue'
|
||||||
import FunctionDialog from './FunctionDialog.vue'
|
import FunctionDialog from './FunctionDialog.vue'
|
||||||
import { addFunction, getFunction, updateFunction, deleteFunction } from '@/api/is/func/index'
|
import { addFunction, getFunction, updateFunction, deleteFunction } from '@/api/is/func/index'
|
||||||
|
import { useDict } from '@/utils/dict'
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
selectNode: {
|
selectNode: {
|
||||||
@ -237,6 +242,12 @@ const handleUpdateFunction = (row) => {
|
|||||||
functionDialogVisible.value = true
|
functionDialogVisible.value = true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const { ti_function_config } = useDict("ti_function_config");
|
||||||
|
const formatFuncName = (funcKey) => {
|
||||||
|
const dict = ti_function_config.value.find(item => item.value === funcKey)
|
||||||
|
return dict?.label || ''
|
||||||
|
}
|
||||||
|
|
||||||
watch(() => props.selectNode,
|
watch(() => props.selectNode,
|
||||||
(newVal) => {
|
(newVal) => {
|
||||||
if (newVal && newVal.type === 'version') {
|
if (newVal && newVal.type === 'version') {
|
||||||
|
|||||||
@ -17,7 +17,7 @@
|
|||||||
v-for="dict in ti_ui_config"
|
v-for="dict in ti_ui_config"
|
||||||
:key="dict.value"
|
:key="dict.value"
|
||||||
:label="dict.label"
|
:label="dict.label"
|
||||||
:value="dict.label"
|
:value="dict.value"
|
||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|||||||
@ -8,7 +8,12 @@
|
|||||||
label="功能名称"
|
label="功能名称"
|
||||||
align="center"
|
align="center"
|
||||||
prop="funcKey"
|
prop="funcKey"
|
||||||
show-overflow-tooltip />
|
show-overflow-tooltip
|
||||||
|
>
|
||||||
|
<template #default="{ row }">
|
||||||
|
<div>{{ formatFuncName(row.funcKey) }}</div>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column prop="iconUrl" label="图片" >
|
<el-table-column prop="iconUrl" label="图片" >
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<el-image
|
<el-image
|
||||||
@ -69,7 +74,11 @@
|
|||||||
align="center"
|
align="center"
|
||||||
prop="funcKey"
|
prop="funcKey"
|
||||||
show-overflow-tooltip
|
show-overflow-tooltip
|
||||||
/>
|
>
|
||||||
|
<template #default="{ row }">
|
||||||
|
<div>{{ formatFuncName(row.funcKey) }}</div>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column prop="iconUrl" label="图片" >
|
<el-table-column prop="iconUrl" label="图片" >
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<el-image
|
<el-image
|
||||||
@ -102,6 +111,7 @@
|
|||||||
import { onMounted } from "vue";
|
import { onMounted } from "vue";
|
||||||
import { ElImageViewer } from 'element-plus'
|
import { ElImageViewer } from 'element-plus'
|
||||||
import { getFunction } from '@/api/is/func/index'
|
import { getFunction } from '@/api/is/func/index'
|
||||||
|
import { useDict } from '@/utils/dict'
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
selectNode: {
|
selectNode: {
|
||||||
@ -202,6 +212,12 @@ const unSelectRow = (row) => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const { ti_function_config } = useDict("ti_function_config");
|
||||||
|
const formatFuncName = (funcKey) => {
|
||||||
|
const dict = ti_function_config.value.find(item => item.value === funcKey)
|
||||||
|
return dict?.label || ''
|
||||||
|
}
|
||||||
|
|
||||||
const getImgUrl = (url) => {
|
const getImgUrl = (url) => {
|
||||||
return import.meta.env.VITE_API_URL + url
|
return import.meta.env.VITE_API_URL + url
|
||||||
}
|
}
|
||||||
|
|||||||
@ -36,7 +36,11 @@
|
|||||||
<!-- 界面表格 -->
|
<!-- 界面表格 -->
|
||||||
<el-table :data="tableData" style="width: 100%">
|
<el-table :data="tableData" style="width: 100%">
|
||||||
<el-table-column prop="id" label="ID" />
|
<el-table-column prop="id" label="ID" />
|
||||||
<el-table-column prop="uiKey" label="界面名称" />
|
<el-table-column prop="uiKey" label="界面名称">
|
||||||
|
<template #default="{ row }">
|
||||||
|
<div>{{ formatUiName(row.uiKey) }}</div>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column prop="uiUrl" label="图片" >
|
<el-table-column prop="uiUrl" label="图片" >
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<el-image
|
<el-image
|
||||||
@ -94,6 +98,7 @@ import { ElMessage, ElMessageBox, ElImageViewer } from 'element-plus'
|
|||||||
import { Plus } from '@element-plus/icons-vue'
|
import { Plus } from '@element-plus/icons-vue'
|
||||||
import FunctionDialog from './Dialog.vue'
|
import FunctionDialog from './Dialog.vue'
|
||||||
import { addUi, getUiList, deleteUiList, updateUI } from '@/api/is/im/index'
|
import { addUi, getUiList, deleteUiList, updateUI } from '@/api/is/im/index'
|
||||||
|
import { useDict } from '@/utils/dict'
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
selectNode: {
|
selectNode: {
|
||||||
@ -220,6 +225,12 @@ const getDataList = async () => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const { ti_ui_config } = useDict("ti_ui_config");
|
||||||
|
const formatUiName = (uiKey) => {
|
||||||
|
const dict = ti_ui_config.value.find(item => item.value === uiKey)
|
||||||
|
return dict?.label || ''
|
||||||
|
}
|
||||||
|
|
||||||
const getImgUrl = (url) => {
|
const getImgUrl = (url) => {
|
||||||
return import.meta.env.VITE_API_URL + url
|
return import.meta.env.VITE_API_URL + url
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user