Merge branch 'ts' into future/flowable
This commit is contained in:
commit
bace65610d
@ -1,7 +1,6 @@
|
||||
export interface DictDataQuery extends PageQuery {
|
||||
dictName: string;
|
||||
dictType: string;
|
||||
status: string;
|
||||
dictLabel: string;
|
||||
}
|
||||
|
||||
@ -12,7 +11,6 @@ export interface DictDataVO extends BaseEntity {
|
||||
cssClass: string;
|
||||
listClass: ElTagType;
|
||||
dictSort: number;
|
||||
status: string;
|
||||
remark: string;
|
||||
}
|
||||
|
||||
@ -24,6 +22,5 @@ export interface DictDataForm {
|
||||
cssClass: string;
|
||||
listClass: ElTagType;
|
||||
dictSort: number;
|
||||
status: string;
|
||||
remark: string;
|
||||
}
|
||||
|
@ -2,7 +2,6 @@ export interface DictTypeVO extends BaseEntity {
|
||||
dictId: number | string;
|
||||
dictName: string;
|
||||
dictType: string;
|
||||
status: string;
|
||||
remark: string;
|
||||
}
|
||||
|
||||
@ -10,12 +9,10 @@ export interface DictTypeForm {
|
||||
dictId: number | string | undefined;
|
||||
dictName: string;
|
||||
dictType: string;
|
||||
status: string;
|
||||
remark: string;
|
||||
}
|
||||
|
||||
export interface DictTypeQuery extends PageQuery {
|
||||
dictName: string;
|
||||
dictType: string;
|
||||
status: string;
|
||||
}
|
||||
|
@ -169,6 +169,17 @@ export const updateAuthRole = (data: { userId: string; roleIds: string }) => {
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 查询当前部门的所有用户信息
|
||||
* @param deptId
|
||||
*/
|
||||
export const listUserByDeptId = (deptId: string | number): AxiosPromise<UserVO[]> => {
|
||||
return request({
|
||||
url: "/system/user/list/dept/" + deptId,
|
||||
method: "get"
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 查询部门下拉树结构
|
||||
*/
|
||||
@ -193,5 +204,6 @@ export default {
|
||||
uploadAvatar,
|
||||
getAuthRole,
|
||||
updateAuthRole,
|
||||
deptTreeSelect
|
||||
deptTreeSelect,
|
||||
listUserByDeptId
|
||||
};
|
||||
|
@ -50,7 +50,7 @@ const props = defineProps({
|
||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||
|
||||
const upload = reactive<UploadOption>({
|
||||
headers: globalHeaders,
|
||||
headers: globalHeaders(),
|
||||
url: import.meta.env.VITE_APP_BASE_API + '/resource/oss/upload'
|
||||
})
|
||||
const myQuillEditor = ref();
|
||||
|
@ -66,7 +66,7 @@ const uploadList = ref<any[]>([]);
|
||||
|
||||
const baseUrl = import.meta.env.VITE_APP_BASE_API;
|
||||
const uploadFileUrl = ref(baseUrl + "/resource/oss/upload"); // 上传文件服务器地址
|
||||
const headers = ref(globalHeaders);
|
||||
const headers = ref(globalHeaders());
|
||||
|
||||
const fileList = ref<any[]>([]);
|
||||
const showTip = computed(
|
||||
|
@ -70,7 +70,7 @@ const dialogVisible = ref(false);
|
||||
|
||||
const baseUrl = import.meta.env.VITE_APP_BASE_API;
|
||||
const uploadImgUrl = ref(baseUrl + "/resource/oss/upload"); // 上传的图片服务器地址
|
||||
const headers = ref(globalHeaders);
|
||||
const headers = ref(globalHeaders());
|
||||
|
||||
const fileList = ref<any[]>([]);
|
||||
const showTip = computed(
|
||||
|
@ -16,7 +16,7 @@ export default {
|
||||
method: 'get',
|
||||
url: url,
|
||||
responseType: 'blob',
|
||||
headers: globalHeaders,
|
||||
headers: globalHeaders(),
|
||||
});
|
||||
const isBlob = blobValidate(res.data);
|
||||
if (isBlob) {
|
||||
@ -40,7 +40,7 @@ export default {
|
||||
method: 'get',
|
||||
url: url,
|
||||
responseType: 'blob',
|
||||
headers: globalHeaders,
|
||||
headers: globalHeaders(),
|
||||
});
|
||||
const isBlob = blobValidate(res.data);
|
||||
if (isBlob) {
|
||||
|
@ -14,9 +14,11 @@ import { encrypt } from '@/utils/jsencrypt';
|
||||
let downloadLoadingInstance: LoadingInstance;
|
||||
// 是否显示重新登录
|
||||
export const isRelogin = { show: false };
|
||||
export const globalHeaders = {
|
||||
Authorization: "Bearer " + getToken(),
|
||||
clientid: import.meta.env.VITE_APP_CLIENT_ID
|
||||
export const globalHeaders = () => {
|
||||
return {
|
||||
Authorization: "Bearer " + getToken(),
|
||||
clientid: import.meta.env.VITE_APP_CLIENT_ID
|
||||
}
|
||||
}
|
||||
|
||||
axios.defaults.headers['Content-Type'] = 'application/json;charset=utf-8';
|
||||
|
@ -132,13 +132,14 @@ const handleRegister = () => {
|
||||
}
|
||||
|
||||
const getCode = async () => {
|
||||
const { data } = await getCodeImg();
|
||||
const res = await getCodeImg();
|
||||
const { data } = res;
|
||||
captchaEnabled.value = data.captchaEnabled === undefined ? true : data.captchaEnabled;
|
||||
if (captchaEnabled.value) {
|
||||
codeUrl.value = "data:image/gif;base64," + data.img;
|
||||
codeUrl.value = 'data:image/gif;base64,' + data.img;
|
||||
registerForm.value.uuid = data.uuid;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
const initTenantList = async () => {
|
||||
const { data } = await getTenantList();
|
||||
|
@ -97,7 +97,9 @@
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="负责人" prop="leader">
|
||||
<el-input v-model="form.leader" placeholder="请输入负责人" maxlength="20" />
|
||||
<el-select v-model="form.leader" placeholder="请选择负责人">
|
||||
<el-option v-for="item in deptUserList" :key="item.userId" :label="item.userName" :value="item.userId" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
@ -114,7 +116,7 @@
|
||||
<el-form-item label="部门状态">
|
||||
<el-radio-group v-model="form.status">
|
||||
<el-radio v-for="dict in sys_normal_disable" :key="dict.value" :label="dict.value">{{ dict.label
|
||||
}}</el-radio>
|
||||
}}</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@ -133,6 +135,8 @@
|
||||
<script setup name="Dept" lang="ts">
|
||||
import { listDept, getDept, delDept, addDept, updateDept, listDeptExcludeChild } from "@/api/system/dept"
|
||||
import { DeptForm, DeptQuery, DeptVO } from "@/api/system/dept/types";
|
||||
import {UserVO} from "@/api/system/user/types";
|
||||
import {listUserByDeptId} from "@/api/system/user";
|
||||
|
||||
interface DeptOptionsType {
|
||||
deptId: number | string;
|
||||
@ -149,7 +153,7 @@ const loading = ref(true)
|
||||
const showSearch = ref(true)
|
||||
const deptOptions = ref<DeptOptionsType[]>([])
|
||||
const isExpandAll = ref(true)
|
||||
|
||||
const deptUserList = ref<UserVO[]>([]);
|
||||
|
||||
const dialog = reactive<DialogOption>({
|
||||
visible: false,
|
||||
@ -199,6 +203,15 @@ const getList = async () => {
|
||||
}
|
||||
loading.value = false
|
||||
}
|
||||
|
||||
/** 查询当前部门的所有用户 */
|
||||
async function getDeptAllUser(deptId: any) {
|
||||
if (deptId !== null && deptId !== "" && deptId !== undefined) {
|
||||
const res = await listUserByDeptId(deptId);
|
||||
deptUserList.value = res.data;
|
||||
}
|
||||
}
|
||||
|
||||
/** 取消按钮 */
|
||||
const cancel = () => {
|
||||
reset()
|
||||
@ -251,6 +264,8 @@ const handleAdd = async (row?: DeptVO) => {
|
||||
/** 修改按钮操作 */
|
||||
const handleUpdate = async (row: DeptVO) => {
|
||||
reset();
|
||||
//查询当前部门所有用户
|
||||
getDeptAllUser(row.deptId);
|
||||
const res = await getDept(row.deptId);
|
||||
form.value = res.data
|
||||
const response = await listDeptExcludeChild(row.deptId);
|
||||
|
@ -12,11 +12,6 @@
|
||||
<el-form-item label="字典标签" prop="dictLabel">
|
||||
<el-input v-model="queryParams.dictLabel" placeholder="请输入字典标签" clearable style="width: 200px" @keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="状态" prop="status">
|
||||
<el-select v-model="queryParams.status" placeholder="数据状态" clearable style="width: 200px">
|
||||
<el-option v-for="dict in sys_normal_disable" :key="dict.value" :label="dict.label" :value="dict.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
||||
@ -61,11 +56,6 @@
|
||||
</el-table-column>
|
||||
<el-table-column label="字典键值" align="center" prop="dictValue" />
|
||||
<el-table-column label="字典排序" align="center" prop="dictSort" />
|
||||
<el-table-column label="状态" align="center" prop="status">
|
||||
<template #default="scope">
|
||||
<dict-tag :options="sys_normal_disable" :value="scope.row.status" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="备注" align="center" prop="remark" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="创建时间" align="center" prop="createTime" width="180">
|
||||
<template #default="scope">
|
||||
@ -114,11 +104,6 @@
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="状态" prop="status">
|
||||
<el-radio-group v-model="form.status">
|
||||
<el-radio v-for="dict in sys_normal_disable" :key="dict.value" :label="dict.value">{{ dict.label }}</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容"></el-input>
|
||||
</el-form-item>
|
||||
@ -141,7 +126,6 @@ import { DictTypeVO } from '@/api/system/dict/type/types';
|
||||
import { DictDataForm, DictDataQuery, DictDataVO } from "@/api/system/dict/data/types";
|
||||
|
||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance
|
||||
const { sys_normal_disable } = toRefs<any>(proxy?.useDict("sys_normal_disable"));
|
||||
const route = useRoute();
|
||||
|
||||
const dataList = ref<DictDataVO[]>([]);
|
||||
@ -180,7 +164,6 @@ const initFormData: DictDataForm = {
|
||||
cssClass: '',
|
||||
listClass: "default",
|
||||
dictSort: 0,
|
||||
status: "0",
|
||||
remark: ''
|
||||
}
|
||||
const data = reactive<PageData<DictDataForm, DictDataQuery>>({
|
||||
@ -190,7 +173,6 @@ const data = reactive<PageData<DictDataForm, DictDataQuery>>({
|
||||
pageSize: 10,
|
||||
dictName: '',
|
||||
dictType: '',
|
||||
status: '',
|
||||
dictLabel: ''
|
||||
},
|
||||
rules: {
|
||||
|
@ -10,11 +10,6 @@
|
||||
<el-form-item label="字典类型" prop="dictType">
|
||||
<el-input v-model="queryParams.dictType" placeholder="请输入字典类型" clearable style="width: 240px" @keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="状态" prop="status">
|
||||
<el-select v-model="queryParams.status" placeholder="字典状态" clearable style="width: 240px">
|
||||
<el-option v-for="dict in sys_normal_disable" :key="dict.value" :label="dict.label" :value="dict.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="创建时间" style="width: 308px">
|
||||
<el-date-picker
|
||||
v-model="dateRange"
|
||||
@ -69,11 +64,6 @@
|
||||
</router-link>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="状态" align="center" prop="status">
|
||||
<template #default="scope">
|
||||
<dict-tag :options="sys_normal_disable" :value="scope.row.status" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="备注" align="center" prop="remark" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="创建时间" align="center" prop="createTime" width="180">
|
||||
<template #default="scope">
|
||||
@ -103,11 +93,6 @@
|
||||
<el-form-item label="字典类型" prop="dictType">
|
||||
<el-input v-model="form.dictType" placeholder="请输入字典类型" />
|
||||
</el-form-item>
|
||||
<el-form-item label="状态" prop="status">
|
||||
<el-radio-group v-model="form.status">
|
||||
<el-radio v-for="dict in sys_normal_disable" :key="dict.value" :label="dict.value">{{ dict.label }}</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容"></el-input>
|
||||
</el-form-item>
|
||||
@ -128,7 +113,6 @@ import { listType, getType, delType, addType, updateType, refreshCache } from "@
|
||||
import { DictTypeForm, DictTypeQuery, DictTypeVO } from "@/api/system/dict/type/types";
|
||||
|
||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||
const { sys_normal_disable } = toRefs<any>(proxy?.useDict("sys_normal_disable"))
|
||||
|
||||
const typeList = ref<DictTypeVO[]>([]);
|
||||
const loading = ref(true);
|
||||
@ -152,7 +136,6 @@ const initFormData: DictTypeForm = {
|
||||
dictId: undefined,
|
||||
dictName: '',
|
||||
dictType: '',
|
||||
status: "0",
|
||||
remark: ''
|
||||
}
|
||||
const data = reactive<PageData<DictTypeForm, DictTypeQuery>>({
|
||||
@ -161,8 +144,7 @@ const data = reactive<PageData<DictTypeForm, DictTypeQuery>>({
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
dictName: '',
|
||||
dictType: '',
|
||||
status: ''
|
||||
dictType: ''
|
||||
},
|
||||
rules: {
|
||||
dictName: [{ required: true, message: "字典名称不能为空", trigger: "blur" }],
|
||||
|
@ -335,7 +335,7 @@ const upload = reactive<ImportOption>({
|
||||
// 是否更新已经存在的用户数据
|
||||
updateSupport: 0,
|
||||
// 设置上传的请求头部
|
||||
headers: globalHeaders,
|
||||
headers: globalHeaders(),
|
||||
// 上传的地址
|
||||
url: import.meta.env.VITE_APP_BASE_API + "/system/user/importData"
|
||||
})
|
||||
|
Loading…
x
Reference in New Issue
Block a user