设备页面调整
This commit is contained in:
parent
45d662dac5
commit
681c155fa7
@ -221,6 +221,7 @@ const getTree = () => {
|
||||
formQuery.orgId = res.data[0].id
|
||||
RyUserQuery(formQuery)
|
||||
formQuery1.orgId = res.data[0].id
|
||||
treeId.value = res.data[0].id
|
||||
})
|
||||
})
|
||||
}
|
||||
@ -352,6 +353,7 @@ const rules = reactive<FormRules<RuleUser>>({
|
||||
const addUserFromData = () => {
|
||||
visibleParam.value = true
|
||||
formUserAdd.account = ''
|
||||
formUserAdd.password = ''
|
||||
formUserAdd.userName = ''
|
||||
formUserAdd.email = ''
|
||||
formUserAdd.phone = ''
|
||||
@ -416,7 +418,7 @@ const viewUsers = (data: any) => {
|
||||
formUserUpData.roleList = data.row.roleList.map((item: any) => {
|
||||
return item.id
|
||||
})
|
||||
formUserUpData.profilePicture = data.row.profilePicture
|
||||
formUserUpData.profilePicture = data.row.headImage
|
||||
}
|
||||
const upDataOnSubmit = () => {
|
||||
formRef.value.validate((valid: any) => {
|
||||
@ -544,25 +546,10 @@ const showPwd = () => {
|
||||
passWordDialog.value = true
|
||||
}
|
||||
const ChangePasswordFrom = ref()
|
||||
const changePassWordData = reactive({
|
||||
id: formUserUpData.id,
|
||||
oldPassword: passWordProp.newPassword,
|
||||
})
|
||||
|
||||
const passWordUpdata = () => {
|
||||
ChangePasswordFrom.value.validate((valid: any) => {
|
||||
if (valid) {
|
||||
// userChangePassword(changePassWordData)
|
||||
// .then((res) => {
|
||||
// if (res.code == 200) {
|
||||
// ElMessage.success('修改成功')
|
||||
// passWordDialog.value = false
|
||||
// } else {
|
||||
// ElMessage.error(res.msg)
|
||||
// }
|
||||
// })
|
||||
// .catch(() => {
|
||||
// ElMessage.error('修改失败')
|
||||
// })
|
||||
formUserUpData.password = passWordProp.newPassword
|
||||
passWordDialog.value = false
|
||||
}
|
||||
|
@ -408,8 +408,6 @@ const equipTreeRef = ref()
|
||||
const deviceTypeList = ref()
|
||||
const equipTypeList = () => {
|
||||
equipType().then((res) => {
|
||||
console.log(res, '')
|
||||
|
||||
userData.value = res.data
|
||||
deviceTypeList.value = res.data
|
||||
nextTick(() => {
|
||||
@ -418,6 +416,7 @@ const equipTypeList = () => {
|
||||
formQuery.pageNum = currentPage.value
|
||||
formQuery.objectType = res.data[0].equipmentTypeId
|
||||
equipQuery(formQuery).then((res) => {
|
||||
|
||||
deviceList.value = res.rows
|
||||
pageTotal.value = res.total
|
||||
})
|
||||
@ -425,6 +424,7 @@ const equipTypeList = () => {
|
||||
equipModeList({
|
||||
objectType: res.data[0].equipmentTypeId,
|
||||
})
|
||||
queryParameter.value.equipmentTypeId = res.data[0].equipmentTypeId
|
||||
})
|
||||
})
|
||||
}
|
||||
@ -558,7 +558,7 @@ const deviceTypeQuery = () => {
|
||||
}
|
||||
// 编码查询
|
||||
if (headerForm.resource === '2') {
|
||||
nameQuery.objectType = queryParameter.value.equipmentTypeId
|
||||
nameQuery2.objectType = queryParameter.value.equipmentTypeId
|
||||
nameQuery2.pageSize = currentPageSize.value
|
||||
nameQuery2.pageNum = currentPage.value
|
||||
nameQuery2.code = headerForm.searchFor
|
||||
@ -831,10 +831,12 @@ const handleCloseAddEditDevice = () => {
|
||||
}
|
||||
// 导入
|
||||
const upLoadModel = (file: any) => {
|
||||
console.log(queryParameter.value.equipmentTypeId,"min132");
|
||||
|
||||
const formData = new FormData()
|
||||
formData.append('file', file.file)
|
||||
const v = generateRandomNumber(16)
|
||||
const id = encrypt_aes(queryParameter.value.id, v)
|
||||
const id = encrypt_aes(queryParameter.value.equipmentTypeId, v)
|
||||
formData.append('id', id)
|
||||
return equipImport(formData, v)
|
||||
.then((res: any) => {
|
||||
@ -852,7 +854,7 @@ const upLoadModel = (file: any) => {
|
||||
|
||||
// 导出
|
||||
const Export = () => {
|
||||
equipExport({ id: queryParameter.value.equipmentTypeId }).then((res: any) => {
|
||||
equipExport({ objectType: queryParameter.value.equipmentTypeId }).then((res: any) => {
|
||||
const downloadUrl = window.URL.createObjectURL(res)
|
||||
const a = document.createElement('a')
|
||||
a.href = downloadUrl
|
||||
|
Loading…
Reference in New Issue
Block a user