修改日志
This commit is contained in:
@@ -28,7 +28,9 @@ import { ElMessage } from 'element-plus'
|
|||||||
import { passwordConfirm, updatePassword } from '@/api/user-boot/user'
|
import { passwordConfirm, updatePassword } from '@/api/user-boot/user'
|
||||||
import { validatePwd } from '@/utils/common'
|
import { validatePwd } from '@/utils/common'
|
||||||
import { useAdminInfo } from '@/stores/adminInfo'
|
import { useAdminInfo } from '@/stores/adminInfo'
|
||||||
|
import router from '@/router'
|
||||||
|
import { useNavTabs } from '@/stores/navTabs'
|
||||||
|
const navTabs = useNavTabs()
|
||||||
const adminInfo = useAdminInfo()
|
const adminInfo = useAdminInfo()
|
||||||
const dialogVisible = ref(false)
|
const dialogVisible = ref(false)
|
||||||
const title = ref('修改密码')
|
const title = ref('修改密码')
|
||||||
@@ -97,8 +99,14 @@ const submit = () => {
|
|||||||
id: adminInfo.$state.userIndex,
|
id: adminInfo.$state.userIndex,
|
||||||
newPassword: form.newPwd
|
newPassword: form.newPwd
|
||||||
}).then((res: any) => {
|
}).then((res: any) => {
|
||||||
ElMessage.success('密码修改成功')
|
ElMessage.success('密码修改成功,请重新登录!')
|
||||||
dialogVisible.value = false
|
dialogVisible.value = false
|
||||||
|
setTimeout(() => {
|
||||||
|
navTabs.closeTabs()
|
||||||
|
window.localStorage.clear()
|
||||||
|
adminInfo.reset()
|
||||||
|
router.push({ name: 'login' })
|
||||||
|
}, 0)
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
</TableHeader>
|
</TableHeader>
|
||||||
|
|
||||||
<div :key="key">
|
<div :key="key">
|
||||||
<Table ref="tableRef" :height="'49vh'"></Table>
|
<Table ref="tableRef" :height="'calc(50vh - 100px)'"></Table>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -153,7 +153,7 @@ const typeOptions = ref([
|
|||||||
{ label: 'cp95值', value: 4 }
|
{ label: 'cp95值', value: 4 }
|
||||||
])
|
])
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
datePickerRef.value.setTheDate(5)
|
datePickerRef.value.setTheDate(4)
|
||||||
init()
|
init()
|
||||||
})
|
})
|
||||||
const height: any = ref(mainHeight(200, 1))
|
const height: any = ref(mainHeight(200, 1))
|
||||||
|
|||||||
@@ -43,7 +43,9 @@
|
|||||||
<el-button icon="el-icon-Upload" type="primary" class="mr10 ml10">上传接线图</el-button>
|
<el-button icon="el-icon-Upload" type="primary" class="mr10 ml10">上传接线图</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-upload>
|
</el-upload>
|
||||||
<el-button icon="el-icon-Download" type="primary" @click="exportEvent" :loading="loading">生成</el-button>
|
<el-button icon="el-icon-Download" type="primary" @click="exportEvent" :loading="loading">
|
||||||
|
生成
|
||||||
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
</TableHeader>
|
</TableHeader>
|
||||||
<div class="box">
|
<div class="box">
|
||||||
@@ -107,10 +109,10 @@ const handleNodeClick = (data: any, node: any) => {
|
|||||||
}
|
}
|
||||||
// 上传
|
// 上传
|
||||||
const choose = (files: any) => {
|
const choose = (files: any) => {
|
||||||
const isJPG = files.raw.type === 'image/jpg'
|
const isJPG = files.raw.type === 'image/jpeg'
|
||||||
const isPNG = files.raw.type === 'image/png'
|
const isPNG = files.raw.type === 'image/png'
|
||||||
if (!isJPG && !isPNG) {
|
if (!isJPG && !isPNG) {
|
||||||
ElMessage.warning('上传文件只能是 JPG/PNG 格式!')
|
ElMessage.warning('上传文件只能是 jpg/png 格式!')
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -146,22 +148,24 @@ const exportEvent = () => {
|
|||||||
} else {
|
} else {
|
||||||
loading.value = true
|
loading.value = true
|
||||||
ElMessage('生成报告中...')
|
ElMessage('生成报告中...')
|
||||||
exportModel(form).then((res: any) => {
|
exportModel(form)
|
||||||
let blob = new Blob([res], {
|
.then((res: any) => {
|
||||||
type: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document;charset=UTF-8'
|
let blob = new Blob([res], {
|
||||||
|
type: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document;charset=UTF-8'
|
||||||
|
})
|
||||||
|
// createObjectURL(blob); //创建下载的链接
|
||||||
|
const url = window.URL.createObjectURL(blob)
|
||||||
|
const link = document.createElement('a') // 创建a标签
|
||||||
|
link.href = url
|
||||||
|
link.download = dotList.value.name + dayjs().format('YYYYMMDD') // 设置下载的文件名
|
||||||
|
document.body.appendChild(link)
|
||||||
|
link.click() //执行下载
|
||||||
|
document.body.removeChild(link)
|
||||||
|
loading.value = false
|
||||||
|
})
|
||||||
|
.catch((err: any) => {
|
||||||
|
loading.value = false
|
||||||
})
|
})
|
||||||
// createObjectURL(blob); //创建下载的链接
|
|
||||||
const url = window.URL.createObjectURL(blob)
|
|
||||||
const link = document.createElement('a') // 创建a标签
|
|
||||||
link.href = url
|
|
||||||
link.download = dotList.value.name+ dayjs().format('YYYYMMDD') // 设置下载的文件名
|
|
||||||
document.body.appendChild(link)
|
|
||||||
link.click() //执行下载
|
|
||||||
document.body.removeChild(link)
|
|
||||||
loading.value =false
|
|
||||||
}).catch((err: any) => {
|
|
||||||
loading.value =false
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Reference in New Issue
Block a user