0922
This commit is contained in:
@ -5,7 +5,7 @@ VITE_APP_TITLE = 新能源场站智慧运维平台
|
||||
VITE_APP_ENV = 'development'
|
||||
|
||||
# 开发环境
|
||||
VITE_APP_BASE_API = 'http://192.168.110.149:18899'
|
||||
VITE_APP_BASE_API = 'http://192.168.110.210:18899'
|
||||
|
||||
# 应用访问路径 例如使用前缀 /admin/
|
||||
VITE_APP_CONTEXT_PATH = '/'
|
||||
|
||||
@ -47,3 +47,11 @@ export const uploadbaoxiu = (data) => {
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
export const baoxiuRecord = (data) => {
|
||||
return request({
|
||||
url: '/ops/report/record',
|
||||
method: 'get',
|
||||
params: data
|
||||
});
|
||||
};
|
||||
|
||||
57
src/api/zhinengxunjian/gongdan/index.ts
Normal file
57
src/api/zhinengxunjian/gongdan/index.ts
Normal file
@ -0,0 +1,57 @@
|
||||
import request from '@/utils/request';
|
||||
import { AxiosPromise } from 'axios';
|
||||
//查询列表
|
||||
export const gongdanlist = (query) => {
|
||||
return request({
|
||||
url: '/ops/order/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
//新增待办事项
|
||||
export const addgongdan = (data) => {
|
||||
return request({
|
||||
url: '/ops/order',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
//修改待办事项
|
||||
export const updategongdan = (data) => {
|
||||
return request({
|
||||
url: '/ops/order',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
//删除待办事项
|
||||
|
||||
export function delgongdan(ids) {
|
||||
return request({
|
||||
url: `/ops/order/${ids}`, // 拼接ids作为路径参数
|
||||
method: 'delete'
|
||||
});
|
||||
}
|
||||
|
||||
export const gongdanDetail = (id) => {
|
||||
return request({
|
||||
url: `/ops/order/${id}`,
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
export const uploadgongdan = (data) => {
|
||||
return request({
|
||||
url: '/resource/oss/upload',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
export const gongdanRecord = (data) => {
|
||||
return request({
|
||||
url: '/ops/order/record',
|
||||
method: 'get',
|
||||
params: data
|
||||
});
|
||||
};
|
||||
57
src/api/zhinengxunjian/jiedian/index.ts
Normal file
57
src/api/zhinengxunjian/jiedian/index.ts
Normal file
@ -0,0 +1,57 @@
|
||||
import request from '@/utils/request';
|
||||
import { AxiosPromise } from 'axios';
|
||||
//查询列表
|
||||
export const jiedianlist = (query) => {
|
||||
return request({
|
||||
url: '/ops/node/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
//新增待办事项
|
||||
export const addjiedian = (data) => {
|
||||
return request({
|
||||
url: '/ops/node',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
//修改待办事项
|
||||
export const updatejiedian = (data) => {
|
||||
return request({
|
||||
url: '/ops/node',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
//删除待办事项
|
||||
|
||||
export function deljiedian(ids) {
|
||||
return request({
|
||||
url: `/ops/node/${ids}`, // 拼接ids作为路径参数
|
||||
method: 'delete'
|
||||
});
|
||||
}
|
||||
|
||||
export const jiedianDetail = (id) => {
|
||||
return request({
|
||||
url: `/ops/node/${id}`,
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
export const uploadjiedian = (data) => {
|
||||
return request({
|
||||
url: '/resource/oss/upload',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
export const jiedianRecord = (data) => {
|
||||
return request({
|
||||
url: '/ops/node/record',
|
||||
method: 'get',
|
||||
params: data
|
||||
});
|
||||
};
|
||||
57
src/api/zhinengxunjian/qiangxiu/index.ts
Normal file
57
src/api/zhinengxunjian/qiangxiu/index.ts
Normal file
@ -0,0 +1,57 @@
|
||||
import request from '@/utils/request';
|
||||
import { AxiosPromise } from 'axios';
|
||||
//查询列表
|
||||
export const qiangxiulist = (query) => {
|
||||
return request({
|
||||
url: '/ops/repair/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
//新增待办事项
|
||||
export const addqiangxiu = (data) => {
|
||||
return request({
|
||||
url: '/ops/repair',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
//修改待办事项
|
||||
export const updateqiangxiu = (data) => {
|
||||
return request({
|
||||
url: '/ops/repair',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
//删除待办事项
|
||||
|
||||
export function delqiangxiu(ids) {
|
||||
return request({
|
||||
url: `/ops/repair/${ids}`, // 拼接ids作为路径参数
|
||||
method: 'delete'
|
||||
});
|
||||
}
|
||||
|
||||
export const qiangxiuDetail = (id) => {
|
||||
return request({
|
||||
url: `/ops/repair/${id}`,
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
export const uploadqiangxiu = (data) => {
|
||||
return request({
|
||||
url: '/resource/oss/upload',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
export const qiangxiuRecord = (data) => {
|
||||
return request({
|
||||
url: '/ops/repair/record',
|
||||
method: 'get',
|
||||
params: data
|
||||
});
|
||||
};
|
||||
@ -23,12 +23,18 @@ export const globalHeaders = () => {
|
||||
};
|
||||
};
|
||||
|
||||
// 设置默认请求头
|
||||
axios.defaults.headers['Content-Type'] = 'application/json;charset=utf-8';
|
||||
axios.defaults.headers['Accept'] = 'application/json, text/plain, */*';
|
||||
axios.defaults.headers['clientid'] = import.meta.env.VITE_APP_CLIENT_ID;
|
||||
// 创建 axios 实例
|
||||
const service = axios.create({
|
||||
baseURL: import.meta.env.VITE_APP_BASE_API,
|
||||
timeout: 50000
|
||||
timeout: 50000,
|
||||
headers: {
|
||||
'Content-Type': 'application/json;charset=utf-8',
|
||||
'Accept': 'application/json, text/plain, */*'
|
||||
}
|
||||
});
|
||||
|
||||
// 请求拦截器
|
||||
|
||||
@ -48,8 +48,8 @@
|
||||
</el-select>
|
||||
</div>
|
||||
<div class="filter-actions">
|
||||
<el-button type="primary" class="search-btn" @click="handleSearch">搜索</el-button>
|
||||
<el-button type="primary" icon="el-icon-plus" class="create-btn" @click="handleCreate">手动创建计划</el-button>
|
||||
<el-button type="primary" icon="Search" class="search-btn" @click="handleSearch"> 搜索 </el-button>
|
||||
<el-button type="primary" icon="Plus" class="create-btn" @click="handleCreate">手动创建计划</el-button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -43,7 +43,7 @@
|
||||
<div class="form-container">
|
||||
<div class="form-header">
|
||||
<h2>今日待办</h2>
|
||||
<el-button type="primary" size="small" icon="el-icon-plus" @click="openAddTaskDialog">添加</el-button>
|
||||
<el-button type="primary" icon="Plus" @click="openAddTaskDialog">添加</el-button>
|
||||
</div>
|
||||
|
||||
<!-- 待办事项列表 - 动态渲染 -->
|
||||
|
||||
@ -48,8 +48,8 @@
|
||||
<el-date-picker v-model="dispatchDate" type="date" placeholder="派单日期" format="yyyy/MM/dd" value-format="yyyy/MM/dd"></el-date-picker>
|
||||
</div>
|
||||
<div class="filter-actions">
|
||||
<el-button type="primary" class="search-btn" @click="handleSearch">搜索</el-button>
|
||||
<el-button type="primary" class="create-btn" @click="handleExport">导出记录</el-button>
|
||||
<el-button type="primary" icon="Search" class="search-btn" @click="handleSearch"> 搜索 </el-button>
|
||||
<el-button type="primary" icon="Export" class="create-btn" @click="handleExport">导出记录</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -59,15 +59,25 @@
|
||||
<div class="stat-card">
|
||||
<div class="stat-value">{{ totalDispatches }}</div>
|
||||
<div class="stat-label">本月派单总数</div>
|
||||
<div class="stat-trend">较上月 <span class="trend-up">↑ 12%</span></div>
|
||||
<div class="stat-trend">
|
||||
较上月
|
||||
<span :class="dispatchGrowthRate.includes('-') ? 'trend-down' : 'trend-up'">
|
||||
{{ dispatchGrowthRate.includes('-') ? '↓' : '↑' }} {{ dispatchGrowthRate }}
|
||||
</span>
|
||||
</div>
|
||||
<div class="stat-icon">
|
||||
<img src="@/assets/images/paidan.png" alt="时间" class="stat-img" />
|
||||
<img src="@/assets/images/paidan.png" alt="派单" class="stat-img" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="stat-card">
|
||||
<div class="stat-value">{{ avgResponseTime }}</div>
|
||||
<div class="stat-label">平均响应时间</div>
|
||||
<div class="stat-trend">较上月 <span class="trend-down">↓ 5分钟</span></div>
|
||||
<div class="stat-trend">
|
||||
较上月
|
||||
<span :class="responseGrowthRate.includes('-') ? 'trend-up' : 'trend-down'">
|
||||
{{ responseGrowthRate.includes('-') ? '↓' : '↑' }} {{ responseGrowthRate }}
|
||||
</span>
|
||||
</div>
|
||||
<div class="stat-icon">
|
||||
<img src="@/assets/images/shijian.png" alt="时间" class="stat-img" />
|
||||
</div>
|
||||
@ -83,7 +93,12 @@
|
||||
<div class="stat-card">
|
||||
<div class="stat-value">{{ completionRate }}</div>
|
||||
<div class="stat-label">按时完成率</div>
|
||||
<div class="stat-trend">较上月 <span class="trend-up">↑ 3%</span></div>
|
||||
<div class="stat-trend">
|
||||
较上月
|
||||
<span :class="completionGrowthRate.includes('-') ? 'trend-down' : 'trend-up'">
|
||||
{{ completionGrowthRate.includes('-') ? '↓' : '↑' }} {{ completionGrowthRate }}
|
||||
</span>
|
||||
</div>
|
||||
<div class="stat-icon success">
|
||||
<img src="@/assets/images/wancheng.png" alt="完成" class="stat-img" />
|
||||
</div>
|
||||
@ -165,7 +180,7 @@
|
||||
import { ref, computed, reactive } from 'vue';
|
||||
import router from '@/router';
|
||||
import TitleComponent from './TitleComponent.vue';
|
||||
|
||||
import { gongdanRecord } from '@/api/zhinengxunjian/gongdan/index';
|
||||
// 激活的选项卡,默认显示派单记录
|
||||
const activeTab = ref('dispatch');
|
||||
|
||||
@ -175,10 +190,47 @@ const executor = ref('all');
|
||||
const dispatchDate = ref('');
|
||||
|
||||
// 统计数据
|
||||
const totalDispatches = ref(56);
|
||||
const avgResponseTime = ref('42分钟');
|
||||
const pendingDispatches = ref(7);
|
||||
const completionRate = ref('92%');
|
||||
const totalDispatches = ref('');
|
||||
const avgResponseTime = ref('');
|
||||
const pendingDispatches = ref('');
|
||||
const completionRate = ref('');
|
||||
|
||||
// 增长率数据
|
||||
const dispatchGrowthRate = ref('');
|
||||
const responseGrowthRate = ref('');
|
||||
const completionGrowthRate = ref('');
|
||||
|
||||
// 初始化加载数据
|
||||
const fetchStatisticsData = async () => {
|
||||
try {
|
||||
const response = await gongdanRecord();
|
||||
if (response.code === 200 && response.data) {
|
||||
// 更新统计数据,处理null值
|
||||
totalDispatches.value = response.data.bypds || '0';
|
||||
avgResponseTime.value = response.data.pjxysj ? `${response.data.pjxysj}分钟` : '0分钟';
|
||||
pendingDispatches.value = response.data.djsgd || '0';
|
||||
completionRate.value = response.data.aswcl ? `${response.data.aswcl}%` : '0%';
|
||||
|
||||
// 更新增长率数据,处理null值
|
||||
dispatchGrowthRate.value = response.data.pdzzl || '0%';
|
||||
responseGrowthRate.value = response.data.xysjzzl || '0分钟';
|
||||
completionGrowthRate.value = response.data.wczzl || '0%';
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('获取统计数据失败:', error);
|
||||
// 发生错误时使用默认值
|
||||
totalDispatches.value = '56';
|
||||
avgResponseTime.value = '42分钟';
|
||||
pendingDispatches.value = '7';
|
||||
completionRate.value = '92%';
|
||||
dispatchGrowthRate.value = '12%';
|
||||
responseGrowthRate.value = '-5分钟';
|
||||
completionGrowthRate.value = '3%';
|
||||
}
|
||||
};
|
||||
|
||||
// 页面加载时获取数据
|
||||
fetchStatisticsData();
|
||||
|
||||
// 派单记录数据
|
||||
const rawTableData = ref([
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -49,8 +49,8 @@
|
||||
></el-date-picker>
|
||||
</div>
|
||||
<div class="action-buttons">
|
||||
<el-button type="primary" class="search-btn"> 搜索 </el-button>
|
||||
<el-button type="primary" class="create-btn" @click="openRecordDialog"> <i class="fas fa-plus"></i> 新增实验记录 </el-button>
|
||||
<el-button type="primary" icon="Search" class="search-btn"> 搜索 </el-button>
|
||||
<el-button type="primary" icon="Plus" class="create-btn" @click="openRecordDialog"> <i class="fas fa-plus"></i> 新增实验记录 </el-button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@ -54,7 +54,7 @@
|
||||
class="date-picker"
|
||||
></el-date-picker>
|
||||
|
||||
<el-button type="primary" class="search-btn"> 搜索 </el-button>
|
||||
<el-button type="primary" icon="Search" class="search-btn"> 搜索 </el-button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@ -49,8 +49,8 @@
|
||||
</el-select>
|
||||
</div>
|
||||
<div class="filter-actions">
|
||||
<el-button type="primary" class="search-btn" @click="handleSearch">搜索</el-button>
|
||||
<el-button type="primary" icon="el-icon-plus" class="create-btn" @click="handleCreateTask"> 手动创建任务 </el-button>
|
||||
<el-button type="primary" icon="Search" class="search-btn" @click="handleSearch"> 搜索 </el-button>
|
||||
<el-button type="primary" icon="Plus" class="create-btn" @click="handleCreateTask"> 手动创建任务 </el-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -12,7 +12,7 @@
|
||||
<div class="header-container">
|
||||
<div class="header-actions">
|
||||
<el-button type="primary" class="export-btn">筛选</el-button>
|
||||
<el-button type="primary" class="create-btn">导出数据</el-button>
|
||||
<el-button type="primary" icon="UploadFilled" class="create-btn">导出数据</el-button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -54,7 +54,7 @@
|
||||
></el-date-picker>
|
||||
</div>
|
||||
<div class="filter-actions">
|
||||
<el-button type="primary" class="search-btn" @click="fetchDashboardData">搜索</el-button>
|
||||
<el-button type="primary" icon="Search" class="search-btn" @click="fetchDashboardData">搜索</el-button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@ -42,8 +42,8 @@
|
||||
<el-input v-model="executor" placeholder="执行人"></el-input>
|
||||
</div>
|
||||
<div class="filter-actions">
|
||||
<el-button type="primary" class="search-btn" @click="handleSearch">搜索</el-button>
|
||||
<el-button type="primary" icon="el-icon-plus" class="create-btn" @click="handleCreateTask"> 手动创建任务 </el-button>
|
||||
<el-button type="primary" icon="Search" class="search-btn" @click="handleSearch"> 搜索 </el-button>
|
||||
<el-button type="primary" icon="Plus" class="create-btn" @click="handleCreateTask"> 手动创建任务 </el-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user