| | |
| | | VITE_APP_ENV = 'development' |
| | | |
| | | # 图片地址 |
| | | VITE_APP_IMG_BASEURL='http://192.168.0.200:8036/upload' |
| | | VITE_APP_IMG_BASEURL='https://www.huiwuyuntong.com/water-hydropower-beta/upload' |
| | | |
| | | #后端本地 |
| | | VITE_APP_PUBLIC_REQUEST_API = 'http://192.168.0.67:8036' |
| | | VITE_APP_PUBLIC_REQUEST_API = 'https://www.huiwuyuntong.com/water-hydropower-beta' |
| | |
| | | const first = matched[0] |
| | | // 判断是否为首页 |
| | | if (!isDashboard(first)) { |
| | | matched = [{ path: '/index', meta: { title: '首页' } }].concat(matched) |
| | | matched = [{ path: '/', meta: { title: '首页' } }].concat(matched) |
| | | } |
| | | |
| | | levelList.value = matched.filter(item => item.meta && item.meta.title && item.meta.breadcrumb !== false) |
| | |
| | | </div> |
| | | <template #dropdown> |
| | | <el-dropdown-menu> |
| | | <!-- <router-link to="/userCenter">--> |
| | | <!-- <el-dropdown-item >个人中心</el-dropdown-item>--> |
| | | <!-- </router-link>--> |
| | | <router-link to="/userCenter"> |
| | | <el-dropdown-item >个人中心</el-dropdown-item> |
| | | </router-link> |
| | | <!-- <el-dropdown-item command="setLayout" v-if="settingsStore.showSettings">--> |
| | | <!-- <span>布局设置</span>--> |
| | | <!-- </el-dropdown-item>--> |
| | | <el-dropdown-item command="logout"> |
| | | <el-dropdown-item divided command="logout"> |
| | | <span>退出登录</span> |
| | | </el-dropdown-item> |
| | | </el-dropdown-menu> |
| | |
| | | { |
| | | path: '/', |
| | | hidden: true, |
| | | component: Layout, |
| | | redirect: '/screen', |
| | | children: [ |
| | | { |
| | | path: 'userCenter', |
| | | component: () => import('@/views/userCenter.vue'), |
| | | name: 'userCenter', |
| | | meta: { title: '个人中心', icon: 'PhUserCircleFill', affix: true } |
| | | }, |
| | | ] |
| | | }, |
| | | { |
| | | path: '/login', |
| | |
| | | path: '/screen', |
| | | component: Screen, |
| | | hidden: true |
| | | }, |
| | | { |
| | | path: '', //单独添加得后台路由,需要一层layout |
| | | hidden: true, |
| | | component: Layout, |
| | | children: [ |
| | | { |
| | | path: '/userCenter', |
| | | component: () => import('@/views/userCenter.vue'), |
| | | name: 'userCenter', |
| | | meta: { title: '个人中心', icon: 'PhUserCircleFill', affix: true } |
| | | }, |
| | | ] |
| | | } |
| | | ] |
| | | |
| | |
| | | <span>选择系统</span> |
| | | </div> |
| | | <div class="top-name">金川水电站生态流量监测系统</div> |
| | | <div class="top-modal"> |
| | | <div class="top-modal" v-if="text"> |
| | | 公告弹窗提示 |
| | | <el-switch v-model="openWarn" /> |
| | | </div> |
| | |
| | | |
| | | // 获取报警内容 |
| | | const getWarnList = () => { |
| | | let errorCode = [10, 20] |
| | | let str = '' |
| | | warnHistory({limit: 10, page: 1, monitorType: 2}).then(res => { |
| | | res.data.list?.forEach((item)=>{ |
| | | if(errorCode.includes(item.isConfirm)){ |
| | | str += item.description + ',' |
| | | } |
| | | }) |
| | | text.value = str |
| | | }) |
| | |
| | | import waterFacilityParameter from "@/api/facility/parameter.js"; |
| | | import setPostParams from "@/utils/searchParams.js"; |
| | | import {onMounted} from "vue"; |
| | | |
| | | const route = useRoute(); |
| | | const {proxy} = getCurrentInstance(); |
| | | const imgBaseUrl = import.meta.env.VITE_APP_IMG_BASEURL //图片前缀 |
| | |
| | | */ |
| | | /** 搜索按钮操作 */ |
| | | function handleQuery() { |
| | | getList({keywords: searchParams.value.facilityCode}) |
| | | getList(searchParams.value) |
| | | } |
| | | |
| | | /** 重置按钮操作 */ |
| | |
| | | }); |
| | | //查询监控点 |
| | | const pointList = ref(); |
| | | const cascaderOption = { label: 'pointName', value: 'id', children: 'childrenList', checkStrictly: true, expandTrigger: 'hover', emitPath: false }; //级联选择器配置 |
| | | const cascaderOption = { |
| | | label: 'pointName', |
| | | value: 'id', |
| | | children: 'childrenList', |
| | | checkStrictly: true, |
| | | expandTrigger: 'hover', |
| | | emitPath: false |
| | | }; //级联选择器配置 |
| | | const getPoint = async () => { |
| | | await pointApi().getParentPoint().then((res) => { |
| | | pointList.value = res.data |
| | |
| | | } |
| | | }) |
| | | } |
| | | |
| | | /** 新增按钮操作 */ |
| | | async function handleAdd() { |
| | | reset(); |
| | |
| | | } |
| | | //上传文件,添加图片地址信息 |
| | | const uploadData = (data) => { |
| | | form.value.facilityUrl = imgBaseUrl + data.toString(); |
| | | form.value.facilityUrl = data.toString(); |
| | | } |
| | | |
| | | /** 提交按钮 */ |
| | |
| | | openParamForm.value = false; |
| | | reset(); |
| | | } |
| | | |
| | | /** 绑定按钮操作 */ |
| | | const handleband = async(row) =>{ |
| | | facilityData.value.facilityId = row.id |
| | |
| | | getSelectParamList(row.id) |
| | | openParamForm.value = true |
| | | } |
| | | |
| | | /** 表单重置 */ |
| | | function reset() { |
| | | form.value = { |
| | |
| | | <template> |
| | | <div class="app-container"> |
| | | <el-form :model="searchParams" ref="queryRef" :inline="true"> |
| | | <el-form-item label="" prop=""> |
| | | <el-form-item label="" prop="keywords"> |
| | | <el-input |
| | | v-model="searchParams.facilityCode" |
| | | v-model="searchParams.keywords" |
| | | placeholder="请输入搜索信息" |
| | | clearable |
| | | style="width: 200px" |
| | |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="选择监控点" prop="pointId"> |
| | | <el-cascader v-model="form.pointId" :options="pointList" :show-all-levels="false" :props="cascaderOption" /> |
| | | <el-cascader v-model="form.pointId" :options="pointList" :show-all-levels="false" |
| | | :props="cascaderOption"/> |
| | | </el-form-item> |
| | | <el-form-item label="安装日期" prop="installDate"> |
| | | <el-date-picker |
| | |
| | | max-width: 100px; |
| | | height: 50px; |
| | | } |
| | | |
| | | .form-box{ |
| | | justify-content: normal; |
| | | |
| | | :deep(.el-cascader){ |
| | | flex-grow: 1; |
| | | } |
| | |
| | | */ |
| | | /** 搜索按钮操作 */ |
| | | function handleQuery() { |
| | | getList({keywords: searchParams.value.name}) |
| | | getList(searchParams.value) |
| | | } |
| | | |
| | | /** 重置按钮操作 */ |
| | |
| | | <template> |
| | | <div class="app-container"> |
| | | <el-form :model="searchParams" ref="queryRef" :inline="true"> |
| | | <el-form-item label="" prop=""> |
| | | <el-form-item label="" prop="keywords"> |
| | | <el-input |
| | | v-model="searchParams.name" |
| | | v-model="searchParams.keywords" |
| | | placeholder="请输入搜索信息" |
| | | clearable |
| | | style="width: 200px" |
| | |
| | | */ |
| | | /** 搜索按钮操作 */ |
| | | function handleQuery() { |
| | | getList({keywords: searchParams.value.keywords}) |
| | | getList(searchParams.value) |
| | | } |
| | | |
| | | /** 重置按钮操作 */ |
| | |
| | | async function getList(val) { |
| | | loading.value = true; |
| | | let postParam = setPostParams(val) |
| | | await pointApi().search({...postParam, ...searchParams.value}).then((res) => { |
| | | await pointApi().search(postParam).then((res) => { |
| | | tableData.value = res.data.list |
| | | pageParam.value.total = res.data.total |
| | | pageParam.value.limit = res.data.limit |
| | |
| | | |
| | | //上传文件,添加图片地址信息 |
| | | const uploadData = (data) => { |
| | | form.value.imageUrl = imgBaseUrl + data.toString(); |
| | | form.value.imageUrl = data.toString(); |
| | | } |
| | | |
| | | /** 提交按钮 */ |
| | |
| | | <template> |
| | | <div class="app-container"> |
| | | <el-form :model="searchParams" ref="queryRef" :inline="true"> |
| | | <el-form-item label="" prop=""> |
| | | <el-form-item label="" prop="keywords"> |
| | | <el-input |
| | | v-model="searchParams.keywords" |
| | | placeholder="请输入搜索信息" |
| | |
| | | import setPostParams from "@/utils/searchParams.js"; |
| | | |
| | | const {proxy} = getCurrentInstance(); |
| | | const imgBaseUrl = import.meta.env.VITE_APP_IMG_BASEURL //图片前缀 |
| | | |
| | | /** |
| | | * 搜索相关 |
| | |
| | | |
| | | //上传文件,添加图片地址信息 |
| | | const uploadData = (img) => { |
| | | form.value.headImg = imgBaseUrl + img.toString() |
| | | form.value.headImg = img.toString() |
| | | } |
| | | |
| | | //获取用户分类列表 |
| | |
| | | <div class="name">密码:</div> |
| | | <div class="info pwd"> |
| | | ******** |
| | | <el-button type="plain" @click="isShow = true">修改密码</el-button> |
| | | <el-button type="default" @click="isShow = true">修改密码</el-button> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | |
| | | <script setup> |
| | | import {userDetail} from '@/api/login' |
| | | import {removeToken} from '@/utils/auth' |
| | | import {ElMessageBox} from "element-plus"; |
| | | |
| | | const { proxy } = getCurrentInstance(); |
| | | const form = ref({}) |
| | | const preUrl = ref(import.meta.env.VITE_APP_IMG_BASEURL) |
| | |
| | | } |
| | | } |
| | | |
| | | // 退出登录 |
| | | const loginOut = () => { |
| | | ElMessageBox.confirm('确定注销并退出系统吗?', '提示', { |
| | | confirmButtonText: '确定', |
| | | cancelButtonText: '取消', |
| | | type: 'warning' |
| | | }).then((e) => { |
| | | removeToken() |
| | | window.location.reload(); |
| | | |
| | | }) |
| | | } |
| | | |
| | | //修改密码 |
| | | const rules = { |
| | | oldPassword: [ |