|
@@ -109,12 +109,12 @@
|
|
</template>
|
|
</template>
|
|
<script lang="tsx" setup>
|
|
<script lang="tsx" setup>
|
|
import dict from '@/api/system/dict'
|
|
import dict from '@/api/system/dict'
|
|
-import formCategory from '@/api/system/formcategory'
|
|
|
|
|
|
+import formCategory from '@/api/flow/formcategory'
|
|
import { computed, nextTick, ref, watch } from 'vue'
|
|
import { computed, nextTick, ref, watch } from 'vue'
|
|
import { ElMessage, ElTree, ElMessageBox } from 'element-plus'
|
|
import { ElMessage, ElTree, ElMessageBox } from 'element-plus'
|
|
import { useTablePage } from '@/hooks/useTablePage'
|
|
import { useTablePage } from '@/hooks/useTablePage'
|
|
import { Plus, Delete, Edit } from '@element-plus/icons-vue'
|
|
import { Plus, Delete, Edit } from '@element-plus/icons-vue'
|
|
-import StatusIndicator from '@/components/StatusIndicator'
|
|
|
|
|
|
+import StatusIndicator from '@/components/StatusIndicator/index.vue'
|
|
|
|
|
|
const visible = ref(false) // 弹窗显示隐藏
|
|
const visible = ref(false) // 弹窗显示隐藏
|
|
const isCreate = ref(true)
|
|
const isCreate = ref(true)
|
|
@@ -191,7 +191,7 @@ const treeData = ref([])
|
|
// 获取左侧菜单数据
|
|
// 获取左侧菜单数据
|
|
const getGroup = async () => {
|
|
const getGroup = async () => {
|
|
showGroupLoading.value = true
|
|
showGroupLoading.value = true
|
|
- let data = await formCategory.formCategoryListAllApi()
|
|
|
|
|
|
+ let data = await formCategory.formCategoryListTreeApi()
|
|
formOptions.value.forms[0].options = data.map(item => {
|
|
formOptions.value.forms[0].options = data.map(item => {
|
|
return { value: item.id, label: item.name }
|
|
return { value: item.id, label: item.name }
|
|
})
|
|
})
|
|
@@ -355,7 +355,7 @@ const submitHandler = async params => {
|
|
try {
|
|
try {
|
|
formOptions.value.formConfig.submitLoading = true
|
|
formOptions.value.formConfig.submitLoading = true
|
|
params.status = params.status ? 1 : 0
|
|
params.status = params.status ? 1 : 0
|
|
- params.id = activeData.value.id ? activeData.value.id : null
|
|
|
|
|
|
+ params.pid = 0
|
|
await formCategory.formCategoryAddOrEditSaveApi(params)
|
|
await formCategory.formCategoryAddOrEditSaveApi(params)
|
|
ElMessage.success(`${isCreate.value ? '新增' : '修改'}成功~`)
|
|
ElMessage.success(`${isCreate.value ? '新增' : '修改'}成功~`)
|
|
visible.value = false
|
|
visible.value = false
|