Browse Source

BUG修改

master
yejiaxing 10 months ago
parent
commit
6355242663
  1. 2
      src/utils/dict.ts
  2. 18
      src/views/system/dept/DeptForm.vue

2
src/utils/dict.ts

@ -277,7 +277,7 @@ export enum DICT_TYPE {
DEVICE_MOLD_TYPE = 'device_mold_type', // 设备/模具类型 DEVICE_MOLD_TYPE = 'device_mold_type', // 设备/模具类型
TRANSACTION_TYPE = 'transaction_Type', // 事务类型 TRANSACTION_TYPE = 'transaction_Type', // 事务类型
RESULT = 'result', // 事务类型 RESULT = 'result', // 事务类型
REQUEST_APPLY = 'class_type', // 班组类型 CLASS_TYPE = 'class_type', // 班组类型
} }

18
src/views/system/dept/DeptForm.vue

@ -51,9 +51,9 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="班组类型" prop="classType"> <el-select v-model="formData.classType" clearable placeholder="请选择班组类型"> <el-option v-for="dict in getIntDictOptions(DICT_TYPE.REQUEST_APPLY)" :key="dict.value" :label="dict.label" :value="dict.value" /> </el-select> </el-form-item> <el-form-item label="班组类型" prop="classType"> <el-select v-model="formData.classType" clearable placeholder="请选择班组类型"> <el-option v-for="dict in getStrDictOptions(DICT_TYPE.CLASS_TYPE)" :key="dict.value"
:label="dict.label"
:value="dict.value" /> </el-select> </el-form-item>
</el-form> </el-form>
<template #footer> <template #footer>
<el-button type="primary" @click="submitForm"> </el-button> <el-button type="primary" @click="submitForm"> </el-button>
@ -62,7 +62,7 @@
</Dialog> </Dialog>
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import { DICT_TYPE, getIntDictOptions } from '@/utils/dict' import { DICT_TYPE, getIntDictOptions,getStrDictOptions } from '@/utils/dict'
import { defaultProps, handleTree } from '@/utils/tree' import { defaultProps, handleTree } from '@/utils/tree'
import * as DeptApi from '@/api/system/dept' import * as DeptApi from '@/api/system/dept'
import * as UserApi from '@/api/system/user' import * as UserApi from '@/api/system/user'
@ -104,6 +104,16 @@ const formRef = ref() // 表单 Ref
const deptTree = ref() // const deptTree = ref() //
const userList = ref<UserApi.UserVO[]>([]) // const userList = ref<UserApi.UserVO[]>([]) //
console.log(getIntDictOptions(DICT_TYPE.DEVICE_MOLD_TYPE))
/** 打开弹窗 */ /** 打开弹窗 */
const open = async (type: string, id?: number) => { const open = async (type: string, id?: number) => {
dialogVisible.value = true dialogVisible.value = true

Loading…
Cancel
Save