Merge remote-tracking branch 'origin/main'
This commit is contained in:
commit
75db505167
@ -30,11 +30,12 @@ export const delInstitutionalListReq = (data: delDataType) => {
|
||||
url: '/api/org/delete',
|
||||
method: 'post',
|
||||
data: data,
|
||||
},{
|
||||
showErrorMessage:false
|
||||
})
|
||||
}
|
||||
|
||||
export const getInstitutionalTreeListReq = (data: getTreeDataType) => {
|
||||
console.log(data);
|
||||
return createAxios<never, operateDataReturnType<getTreeDataReturnType[]>>({
|
||||
url: '/api/org/list',
|
||||
method: 'post',
|
||||
|
@ -1,8 +1,8 @@
|
||||
export default {
|
||||
'Last logged in on': '上次登录于',
|
||||
'user name': '用户名',
|
||||
'User nickname': '用户昵称',
|
||||
'Please enter a nickname': '请输入昵称',
|
||||
'User nickname': '职员名称',
|
||||
'Please enter a nickname': '请输入名称',
|
||||
'e-mail address': '邮箱地址',
|
||||
'phone number': '手机号码',
|
||||
autograph: '签名',
|
||||
|
@ -12,13 +12,12 @@
|
||||
@node-click="handleNodeClick"
|
||||
@node-contextmenu="enumContextMenu"
|
||||
/>
|
||||
|
||||
</el-main>
|
||||
</el-aside>
|
||||
<el-container class="defaultMainContainer">
|
||||
<el-header class="defaultHeader">
|
||||
<div class="searchPart">
|
||||
<el-input v-model="queryName" class="searchInput" placeholder="按名称查询枚举名"></el-input>
|
||||
<el-input v-model="queryName" class="searchInput" placeholder="按枚举描述查询"></el-input>
|
||||
<el-button @click="clickQuery" type="primary" :icon="Search" class="defaultBtn">查询</el-button>
|
||||
</div>
|
||||
<div class="btnPart">
|
||||
@ -33,7 +32,7 @@
|
||||
<el-table-column prop="value" label="枚举值" />
|
||||
<el-table-column label="操作">
|
||||
<template #default="scope">
|
||||
<span style="color: #0064aa; cursor: pointer" @click="enumValueEdit(scope)">查看</span>
|
||||
<span style="color: #0064aa; cursor: pointer" @click="enumValueEdit(scope)">编辑</span>
|
||||
|
|
||||
<span style="color: #0064aa; cursor: pointer" @click="fromDelete(scope)">删除</span>
|
||||
</template>
|
||||
@ -70,7 +69,6 @@
|
||||
<el-form-item label="描述:" prop="description">
|
||||
<el-input v-model="formInlineAdd.description" placeholder="" clearable />
|
||||
</el-form-item>
|
||||
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
@ -95,7 +93,6 @@
|
||||
<el-form-item label="描述:" prop="description">
|
||||
<el-input v-model="formInlineEdit.description" placeholder="" clearable />
|
||||
</el-form-item>
|
||||
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
@ -124,12 +121,8 @@
|
||||
<el-input-number :min="0" v-model="formInlineValue.orderNumber" placeholder="" />
|
||||
</el-form-item>
|
||||
<el-form-item label=" 是否有效:">
|
||||
<el-switch @change="addhandleSwitchChange"
|
||||
:active-value="1"
|
||||
:inactive-value="0"
|
||||
v-model="formInlineValue.isActive" />
|
||||
<el-switch @change="addhandleSwitchChange" :active-value="1" :inactive-value="0" v-model="formInlineValue.isActive" />
|
||||
</el-form-item>
|
||||
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
@ -149,7 +142,7 @@
|
||||
</template>
|
||||
</el-dialog>
|
||||
<!--编辑枚举值-->
|
||||
<el-dialog v-model="visibleValueEdit" title="查看枚举值" width="500" :before-close="edithandleClosevalue">
|
||||
<el-dialog v-model="visibleValueEdit" title="编辑枚举值" width="500" :before-close="edithandleClosevalue">
|
||||
<el-form
|
||||
ref="formRef"
|
||||
:inline="true"
|
||||
@ -167,12 +160,8 @@
|
||||
<el-input-number :min="0" v-model="fromUpDate.orderNumber" placeholder="" />
|
||||
</el-form-item>
|
||||
<el-form-item label=" 是否有效:">
|
||||
<el-switch @change="edithandleSwitchChange"
|
||||
:active-value="1"
|
||||
:inactive-value="0"
|
||||
v-model="fromUpDate.isActive" />
|
||||
<el-switch @change="edithandleSwitchChange" :active-value="1" :inactive-value="0" v-model="fromUpDate.isActive" />
|
||||
</el-form-item>
|
||||
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
@ -210,17 +199,16 @@ import {
|
||||
enumTypeDelete,
|
||||
enumValueAdd,
|
||||
enumValueDelete,
|
||||
enumValuepageEdit
|
||||
} from "/@/api/backend/Enumeration/request";
|
||||
enumValuepageEdit,
|
||||
} from '/@/api/backend/Enumeration/request'
|
||||
import ContextMenu from '/@/views/backend/auth/model/contextMenu.vue'
|
||||
import {delModelReq} from "/@/api/backend/deviceModel/request";
|
||||
|
||||
import { delModelReq } from '/@/api/backend/deviceModel/request'
|
||||
|
||||
const activeName = ref('1')
|
||||
interface Tree {
|
||||
enumId: number,
|
||||
enumName: string,
|
||||
enumDesc: string,
|
||||
enumId: number
|
||||
enumName: string
|
||||
enumDesc: string
|
||||
}
|
||||
|
||||
const defaultProps = {
|
||||
@ -230,17 +218,18 @@ const defaultProps = {
|
||||
|
||||
const tableData = ref()
|
||||
//const TypeData=ref()
|
||||
const TypeData=ref([{
|
||||
const TypeData = ref([
|
||||
{
|
||||
id: 0,
|
||||
name: "",
|
||||
description: "枚举类型配置",
|
||||
children: []
|
||||
}])
|
||||
name: '',
|
||||
description: '枚举类型配置',
|
||||
children: [],
|
||||
},
|
||||
])
|
||||
const TypeTree = ref()
|
||||
const formRef = ref()
|
||||
const enumTypeId = ref()
|
||||
|
||||
|
||||
// 搜索查询
|
||||
const queryName = ref('')
|
||||
const queryListData = reactive({
|
||||
@ -265,10 +254,8 @@ const enumTreeTypeList = () => {
|
||||
TypeTree.value?.setCurrentKey(TypeData.value[0].id!, false)
|
||||
queryListData.description = queryName.value
|
||||
queryListData.enumTypeId = res.data[0].id
|
||||
queryListData.pageNum=currentPage.value,
|
||||
queryListData.pageSize=currentPageSize.value
|
||||
;(queryListData.pageNum = currentPage.value), (queryListData.pageSize = currentPageSize.value)
|
||||
queryenumValueMethod(queryListData)
|
||||
|
||||
})
|
||||
} else {
|
||||
ElMessage.error({
|
||||
@ -283,7 +270,7 @@ const nodename = ref()
|
||||
const curnodeData = ref({
|
||||
id: '',
|
||||
description: '',
|
||||
name:''
|
||||
name: '',
|
||||
})
|
||||
const handleNodeClick = (data: any) => {
|
||||
queryParameter.value = data
|
||||
@ -300,8 +287,10 @@ const handleNodeClick = (data: any) => {
|
||||
curnodeData.value.id = data.id
|
||||
curnodeData.value.name = data.name
|
||||
curnodeData.value.description = data.description
|
||||
if (data.id !== 0) {
|
||||
queryenumValueMethod(queryListData)
|
||||
}
|
||||
}
|
||||
|
||||
const currentPage = ref(1)
|
||||
const currentPageSize = ref(20)
|
||||
@ -326,19 +315,20 @@ const rules = reactive<FormRules<RuleForm>>({
|
||||
required: true,
|
||||
message: '名称不能为空',
|
||||
trigger: 'blur',
|
||||
}],
|
||||
},
|
||||
],
|
||||
description: [
|
||||
{
|
||||
required: true,
|
||||
message: '描述不能为空',
|
||||
trigger: 'blur',
|
||||
}]
|
||||
|
||||
},
|
||||
],
|
||||
})
|
||||
const visibleTypeAdd = ref(false)
|
||||
const formInlineAdd = reactive<RuleForm>({
|
||||
name: '',
|
||||
description: ''
|
||||
description: '',
|
||||
})
|
||||
const fromAddType = () => {
|
||||
visibleTypeAdd.value = true
|
||||
@ -349,7 +339,6 @@ const handleClose = (done: () => void) => {
|
||||
visibleTypeAdd.value = false
|
||||
}
|
||||
|
||||
|
||||
const onSubmitType = () => {
|
||||
formRef.value.validate((valid: any) => {
|
||||
if (valid) {
|
||||
@ -373,8 +362,6 @@ const onSubmitType = () => {
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
//新增枚举值
|
||||
interface RuleForm1 {
|
||||
enumTypeId: number | string
|
||||
@ -404,7 +391,7 @@ const formInlineValue = reactive<RuleForm1>({
|
||||
value: ' ',
|
||||
description: ' ',
|
||||
orderNumber: 0,
|
||||
isActive:0
|
||||
isActive: 0,
|
||||
})
|
||||
const fromAddValue = () => {
|
||||
visibleValueAdd.value = true
|
||||
@ -418,7 +405,6 @@ const handleClosevalue = (done: () => void) => {
|
||||
visibleValueAdd.value = false
|
||||
}
|
||||
|
||||
|
||||
const queryenumValueMethod = (data: any) => {
|
||||
enumListQuery(data).then((res) => {
|
||||
if (res.code == 200) {
|
||||
@ -440,8 +426,7 @@ const onSubmitvalue = () => {
|
||||
if (res.code == 200) {
|
||||
queryListData.description = queryName.value
|
||||
queryListData.enumTypeId = enumTypeId.value
|
||||
queryListData.pageNum=currentPage.value,
|
||||
queryListData.pageSize=currentPageSize.value
|
||||
;(queryListData.pageNum = currentPage.value), (queryListData.pageSize = currentPageSize.value)
|
||||
queryenumValueMethod(queryListData)
|
||||
ElMessage({
|
||||
message: res.msg,
|
||||
@ -510,7 +495,7 @@ const fromUpDate = reactive({
|
||||
value: '',
|
||||
description: '',
|
||||
orderNumber: 0,
|
||||
isActive: 0
|
||||
isActive: 0,
|
||||
})
|
||||
const addhandleSwitchChange = (value: any) => {
|
||||
formInlineValue.isActive = value ? 1 : 0
|
||||
@ -527,8 +512,6 @@ const enumValueEdit = (data: any) => {
|
||||
fromUpDate.description = data.row.description
|
||||
fromUpDate.orderNumber = data.row.orderNumber
|
||||
fromUpDate.isActive = data.row.isActive
|
||||
|
||||
|
||||
}
|
||||
|
||||
const edithandleClosevalue = (done: () => void) => {
|
||||
@ -541,8 +524,7 @@ const EditonSubmitvalue = () => {
|
||||
if (res.code == 200) {
|
||||
queryListData.description = queryName.value
|
||||
queryListData.enumTypeId = enumTypeId.value
|
||||
queryListData.pageNum=currentPage.value,
|
||||
queryListData.pageSize=currentPageSize.value
|
||||
;(queryListData.pageNum = currentPage.value), (queryListData.pageSize = currentPageSize.value)
|
||||
queryenumValueMethod(queryListData)
|
||||
ElMessage({
|
||||
message: res.msg,
|
||||
@ -565,9 +547,9 @@ const visibleTypeEdit=ref(false)
|
||||
const formInlineEdit = reactive({
|
||||
id: '',
|
||||
name: '',
|
||||
description: ''
|
||||
description: '',
|
||||
})
|
||||
const enumTypeEdit = (curnodeData) => {
|
||||
const enumTypeEdit = (curnodeData: any) => {
|
||||
visibleTypeEdit.value = true
|
||||
formInlineEdit.id = curnodeData.id
|
||||
formInlineEdit.name = curnodeData.name
|
||||
@ -603,7 +585,7 @@ const onSubmitTypeEdit = () => {
|
||||
const contextMenuTreeData = ref({
|
||||
id: '',
|
||||
name: '',
|
||||
description: ''
|
||||
description: '',
|
||||
})
|
||||
|
||||
const enumOperateVisible = ref(false)
|
||||
@ -611,19 +593,25 @@ const enumcontextMenuPos = ref({
|
||||
x: 0,
|
||||
y: 0,
|
||||
})
|
||||
const enumContextMenu = (event: any,curnodeData) => {
|
||||
const enumContextMenu = (event: any, curnodeData: any) => {
|
||||
enumcontextMenuPos.value.x = event.pageX
|
||||
enumcontextMenuPos.value.y = event.pageY
|
||||
contextMenuTreeData.value = curnodeData
|
||||
if(nodename.value=="枚举类型配置"||nodename.value==undefined){
|
||||
if (nodename.value == '枚举类型配置' || nodename.value == undefined) {
|
||||
enumOperateVisible.value = false
|
||||
} else {
|
||||
enumOperateVisible.value = true
|
||||
}
|
||||
}
|
||||
const delenumType = () => {
|
||||
enumTypeDelete({ id: contextMenuTreeData.value!.id! })
|
||||
.then((res) => {
|
||||
const params = {...queryListData,pageNum:1,pageSize:10,enumTypeId: contextMenuTreeData.value.id}
|
||||
enumListQuery(params).then((res) => {
|
||||
if (res.data?.rows.length) {
|
||||
throw '该枚举类型下存在枚举值,请先删除枚举值!'
|
||||
}else{
|
||||
return enumTypeDelete({ id: contextMenuTreeData.value!.id! })
|
||||
}
|
||||
}).then((res:any) => {
|
||||
if (res.code == 200) {
|
||||
enumTreeTypeList()
|
||||
ElMessage({
|
||||
@ -638,7 +626,8 @@ const delenumType = () => {
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
ElMessage.error(err?.response?.data?.msg ?? '删除失败')
|
||||
const msg = typeof err === 'string' ? err : err?.response?.data?.msg
|
||||
ElMessage.error(msg ?? '删除失败')
|
||||
})
|
||||
}
|
||||
|
||||
@ -648,7 +637,6 @@ onMounted(() => {
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
|
||||
$defaultHeaderHeight: 60px;
|
||||
@mixin searchInput($value) {
|
||||
margin-right: $value;
|
||||
@ -684,14 +672,13 @@ $paginationHeight: 32px;
|
||||
background: #d0e5f2;
|
||||
border-radius: 4px;
|
||||
padding-left: 10px;
|
||||
text-align:left
|
||||
text-align: left;
|
||||
}
|
||||
:deep(.el-collapse-item__wrap) {
|
||||
border: none;
|
||||
border-color: transparent;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -77,7 +77,7 @@
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label=" 动作参数:">
|
||||
<el-form-item label=" 菜单路径:">
|
||||
<el-input v-model="fromUpDate.funParam"> </el-input>
|
||||
</el-form-item>
|
||||
|
||||
@ -127,7 +127,7 @@
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label=" 动作参数:">
|
||||
<el-form-item label=" 菜单路径:">
|
||||
<el-input v-model="formInlineAdd.funParam"> </el-input>
|
||||
</el-form-item>
|
||||
|
||||
@ -363,7 +363,7 @@ const rules = reactive<FormRules<RuleForm>>({
|
||||
],
|
||||
})
|
||||
|
||||
// 动作参数
|
||||
// 菜单路径
|
||||
interface RyReplaceFields {
|
||||
children: string
|
||||
title: string
|
||||
|
@ -47,6 +47,9 @@
|
||||
placeholder="请输入模型名称"
|
||||
class="searchModelInput"
|
||||
></el-input>
|
||||
<el-tooltip effect="light" content="新增物模型" placement="bottom">
|
||||
<el-button :icon="Plus" @click="openModel('add')"></el-button>
|
||||
</el-tooltip>
|
||||
</el-header>
|
||||
<el-main class="treeMain">
|
||||
<el-tree
|
||||
@ -199,7 +202,7 @@
|
||||
<template #default>
|
||||
<div class="modelOperate">
|
||||
<el-button @click="openModel('detail', curContextMenuTreeData)" :icon="Reading">查看</el-button>
|
||||
<el-button @click="openModel('add')" :icon="DocumentAdd">新增</el-button>
|
||||
<!-- <el-button @click="openModel('add')" :icon="DocumentAdd">新增</el-button> -->
|
||||
<el-button @click="openModel('edit', curContextMenuTreeData)" :icon="DocumentChecked">修改</el-button>
|
||||
<el-popconfirm title="确认删除?" @confirm="delModel">
|
||||
<template #reference>
|
||||
@ -1084,6 +1087,11 @@ $paginationHeight: 32px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
gap: 5px;
|
||||
.el-button {
|
||||
width: 35px;
|
||||
height: 40px;
|
||||
}
|
||||
.searchModelInput {
|
||||
height: 40px;
|
||||
}
|
||||
@ -1169,7 +1177,7 @@ $paginationHeight: 32px;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
width: 80px;
|
||||
height: 150px;
|
||||
height: 110px;
|
||||
.el-button {
|
||||
margin: 0;
|
||||
}
|
||||
|
@ -51,8 +51,8 @@
|
||||
</template>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<el-button type="primary" @click="submitAddForm" :disabled="formDisabled">保存</el-button>
|
||||
<el-button @click="closeAddForm">取消</el-button>
|
||||
<el-button v-if="!formDisabled" type="primary" @click="submitAddForm">保存</el-button>
|
||||
<el-button v-if="!formDisabled" @click="closeAddForm">取消</el-button>
|
||||
</template>
|
||||
</el-dialog>
|
||||
<el-container class="defaultContainer">
|
||||
@ -81,7 +81,7 @@
|
||||
<el-input v-model="searchTableInput" class="searchInput"></el-input>
|
||||
<el-button @click="searchTable" type="primary" :icon="Search" class="defaultBtn">{{ t('management.search') }}</el-button>
|
||||
</div>
|
||||
<el-button type="primary" :icon="Plus" class="defaultBtn" @click="addInstitutional(false)">{{ t('management.add') }}</el-button>
|
||||
<el-button type="primary" :icon="Plus" class="defaultBtn" @click="addInstitutional">{{ t('management.add') }}</el-button>
|
||||
</el-header>
|
||||
<el-main class="defaultMain">
|
||||
<el-table :data="tableData" class="tablePart">
|
||||
@ -125,7 +125,7 @@
|
||||
<template #default>
|
||||
<div class="modelOperate">
|
||||
<el-button @click="editForm(rightClickMenuData!, true)" :icon="Reading">查看</el-button>
|
||||
<el-button @click="addInstitutional(true)" :icon="DocumentAdd">新增</el-button>
|
||||
<el-button @click="addInstitutional" :icon="DocumentAdd">新增</el-button>
|
||||
<el-button @click="editForm(rightClickMenuData!)" :icon="DocumentChecked">修改</el-button>
|
||||
<el-popconfirm title="确认删除?" @confirm="delForm(rightClickMenuData!)">
|
||||
<template #reference>
|
||||
@ -308,14 +308,12 @@ const addFormItemList: formItemListType<addDataEnumKeyJointType>[] = [
|
||||
]
|
||||
const dialogTitle = ref('新增机构')
|
||||
const dialogVible = ref(false)
|
||||
const addInstitutional = (rightClick = false) => {
|
||||
const addInstitutional = () => {
|
||||
dialogTitle.value = '新增机构'
|
||||
formModel.value = JSON.parse(JSON.stringify(defaultFormModel))
|
||||
formRef.value && formRef.value.resetFields()
|
||||
dialogVible.value = true
|
||||
if (!rightClick) {
|
||||
formModel.value.parentOrgId = clickTreeMenuData.value?.id!
|
||||
}
|
||||
formDisabled.value = false
|
||||
}
|
||||
|
||||
@ -330,7 +328,7 @@ const submitAddForm = () => {
|
||||
.then((res) => {
|
||||
if (res.success) {
|
||||
ElMessage.success('新增成功')
|
||||
getInstitutionList({ parentOrgId: rightClickMenuData.value?.parentOrgId })
|
||||
getInstitutionList({ parentOrgId: formModel.value.parentOrgId })
|
||||
dialogVible.value = false
|
||||
refreshTreeData(formModel.value.parentOrgId)
|
||||
} else {
|
||||
@ -345,11 +343,10 @@ const submitAddForm = () => {
|
||||
.then((res) => {
|
||||
if (res.success) {
|
||||
ElMessage.success('编辑成功')
|
||||
getInstitutionList({ parentOrgId: rightClickMenuData.value?.parentOrgId })
|
||||
getInstitutionList({ parentOrgId: formModel.value.parentOrgId })
|
||||
dialogVible.value = false
|
||||
refreshTreeData(rightClickMenuData.value!.parentOrgId).then(() => {
|
||||
refreshTreeData(formModel.value.parentOrgId)
|
||||
})
|
||||
return
|
||||
} else {
|
||||
ElMessage.error(res?.msg ?? '编辑失败')
|
||||
}
|
||||
@ -368,7 +365,6 @@ const closeAddForm = () => {
|
||||
const getInstitutionList = (data: getDataType = { name: null }) => {
|
||||
getInstitutionalListReq(data).then((res) => {
|
||||
pageTotal.value = res.total
|
||||
console.log(res.rows)
|
||||
|
||||
originData.value = res.rows.map((item) => {
|
||||
return {
|
||||
@ -447,7 +443,7 @@ const formDisabled = ref(false)
|
||||
const editForm = (column: getTreeDataReturnType, onlyOpen = false) => {
|
||||
formRef.value?.resetFields()
|
||||
formModel.value = JSON.parse(JSON.stringify(column))
|
||||
dialogTitle.value = '编辑机构'
|
||||
dialogTitle.value = onlyOpen ? '查看机构' : '编辑机构'
|
||||
dialogVible.value = true
|
||||
formDisabled.value = onlyOpen
|
||||
}
|
||||
@ -457,7 +453,7 @@ const delForm = (column: getTreeDataReturnType) => {
|
||||
.then((res) => {
|
||||
if (res.success) {
|
||||
ElMessage.success('删除成功')
|
||||
getInstitutionList({ parentOrgId: rightClickMenuData.value?.parentOrgId })
|
||||
getInstitutionList({ parentOrgId: column.parentOrgId })
|
||||
refreshTreeData(column.parentOrgId)
|
||||
} else {
|
||||
ElMessage.error(res?.msg ?? '删除失败')
|
||||
@ -536,9 +532,7 @@ const getTreeData = (orgId: number | string | null) => {
|
||||
const initData = () => {
|
||||
getTreeData(null)
|
||||
.then((res) => {
|
||||
console.log(res)
|
||||
treeData.value = [...res]
|
||||
console.log(treeData.value)
|
||||
|
||||
nextTick(() => {
|
||||
treeRef.value?.setCurrentKey(res[0]?.id!, false)
|
||||
|
@ -1,6 +1,6 @@
|
||||
export type getDataType = {
|
||||
name?: string | null
|
||||
parentOrgId?: string | number
|
||||
parentOrgId?: string | number |null
|
||||
province?: string
|
||||
city?: string
|
||||
county?: string
|
||||
|
@ -87,8 +87,8 @@
|
||||
|
||||
<avatar @selectAvatar="selectAddName">
|
||||
<template #randerData>
|
||||
<el-form-item label="头像选择:" prop="profilePicture">
|
||||
<el-input v-model="formUserAdd.profilePicture" placeholder="" clearable></el-input>
|
||||
<el-form-item label="头像选择:" prop="headImage">
|
||||
<el-input v-model="formUserAdd.headImage" placeholder="" clearable></el-input>
|
||||
</el-form-item>
|
||||
</template>
|
||||
</avatar>
|
||||
@ -136,8 +136,8 @@
|
||||
</el-form-item>
|
||||
<avatar @selectAvatar="selectUpdataName">
|
||||
<template #randerData>
|
||||
<el-form-item label="头像选择:" prop="profilePicture">
|
||||
<el-input v-model="formUserUpData.profilePicture" placeholder="" clearable></el-input>
|
||||
<el-form-item label="头像选择:" prop="headImage">
|
||||
<el-input v-model="formUserUpData.headImage" placeholder="" clearable></el-input>
|
||||
</el-form-item>
|
||||
</template>
|
||||
</avatar>
|
||||
@ -329,7 +329,7 @@ const formUserAdd = reactive({
|
||||
phone: '',
|
||||
orgId: '',
|
||||
roleList: [],
|
||||
profilePicture: '',
|
||||
headImage: '',
|
||||
})
|
||||
const rules = reactive<FormRules<RuleUser>>({
|
||||
account: [
|
||||
@ -339,6 +339,13 @@ const rules = reactive<FormRules<RuleUser>>({
|
||||
trigger: 'blur',
|
||||
},
|
||||
],
|
||||
password:[
|
||||
{
|
||||
required: true,
|
||||
message: '密码不能为空',
|
||||
trigger: 'blur',
|
||||
},
|
||||
]
|
||||
})
|
||||
const addUserFromData = () => {
|
||||
visibleParam.value = true
|
||||
@ -349,7 +356,7 @@ const addUserFromData = () => {
|
||||
formUserAdd.phone = ''
|
||||
formUserAdd.orgId = ''
|
||||
formUserAdd.roleList = []
|
||||
formUserAdd.profilePicture = ''
|
||||
formUserAdd.headImage = ''
|
||||
}
|
||||
|
||||
const handleCloseParam = (data: any) => {
|
||||
@ -361,7 +368,9 @@ const addOnSubmit = () => {
|
||||
if (valid) {
|
||||
visibleParam.value = false
|
||||
formUserAdd.orgId = treeId.value
|
||||
|
||||
if (!formUserAdd.headImage) {
|
||||
formUserAdd.headImage = 'Avatar'
|
||||
}
|
||||
userAdd(formUserAdd).then((res) => {
|
||||
if (res.code == 200) {
|
||||
formQuery.orgId = treeId.value
|
||||
@ -389,7 +398,7 @@ const formUserUpData = reactive({
|
||||
phone: '',
|
||||
orgId: '',
|
||||
roleList: [],
|
||||
profilePicture: '',
|
||||
headImage: '',
|
||||
})
|
||||
const viewUsers = (data: any) => {
|
||||
formRef.value?.resetFields()
|
||||
@ -404,7 +413,7 @@ const viewUsers = (data: any) => {
|
||||
formUserUpData.roleList = data.row.roleList.map((item: any) => {
|
||||
return item.id
|
||||
})
|
||||
formUserUpData.profilePicture = data.row.headImage
|
||||
formUserUpData.headImage = data.row.headImage
|
||||
}
|
||||
const upDataOnSubmit = () => {
|
||||
formRef.value.validate((valid: any) => {
|
||||
@ -538,12 +547,12 @@ const passWordUpdata = () => {
|
||||
|
||||
// 新增页面头像接受
|
||||
const selectAddName = (data: string) => {
|
||||
formUserAdd.profilePicture = data
|
||||
formUserAdd.headImage = data
|
||||
}
|
||||
|
||||
// 修改页面头像接受
|
||||
const selectUpdataName = (data: string) => {
|
||||
formUserUpData.profilePicture = data
|
||||
formUserUpData.headImage = data
|
||||
}
|
||||
// 分页
|
||||
const pagePagination = [20, 50, 100]
|
||||
|
@ -301,7 +301,7 @@ const StatusListData = () => {
|
||||
objectType: 10002,
|
||||
belongProject: '',
|
||||
attributesList: [
|
||||
'iwindspeed"',
|
||||
'iwindspeed',
|
||||
'iturbineoperationmode',
|
||||
'iyplevel',
|
||||
'gridlostdetected',
|
||||
|
@ -205,7 +205,7 @@ const StatusListData = () => {
|
||||
objectType: 10002,
|
||||
belongProject: '',
|
||||
attributesList: [
|
||||
'iwindspeed"',
|
||||
'iwindspeed',
|
||||
'iturbineoperationmode',
|
||||
'iyplevel',
|
||||
'gridlostdetected',
|
||||
|
Loading…
Reference in New Issue
Block a user