Compare commits
9 Commits
8cd3ed3f8c
...
6079814962
| Author | SHA1 | Date | |
|---|---|---|---|
| 6079814962 | |||
| fd4e05a802 | |||
| af65455d33 | |||
| d1c090b855 | |||
| ed25998d61 | |||
| 6003bcbe32 | |||
| 16003cff02 | |||
| e9a60e978f | |||
| 63d17eea3c |
@ -5,7 +5,7 @@ VITE_APP_TITLE = 新能源场站智慧运维平台
|
||||
VITE_APP_ENV = 'development'
|
||||
|
||||
# 开发环境
|
||||
VITE_APP_BASE_API = 'http://192.168.110.210:18899'
|
||||
VITE_APP_BASE_API = 'http://192.168.110.149:18899'
|
||||
|
||||
# 应用访问路径 例如使用前缀 /admin/
|
||||
VITE_APP_CONTEXT_PATH = '/'
|
||||
|
||||
@ -38,7 +38,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="left_title_item">
|
||||
<div>电站数量</div>
|
||||
<div>升压站数量</div>
|
||||
<div>
|
||||
<span style="font-size: 24px; color: rgba(29, 214, 255, 1); padding-right: 10px">{{ data?.operatingRate ?? '0' }}</span>
|
||||
<span style="color: rgba(156, 163, 175, 1)">座</span>
|
||||
|
||||
@ -64,9 +64,9 @@
|
||||
<!-- 主开关 -->
|
||||
<g :class="{ 'switch-closed': devices[0].status === 'closed' }">
|
||||
<circle cx="200" cy="200" r="15" :fill="devices[0].status === 'closed' ? '#10b981' : '#ef4444'" />
|
||||
<text x="200" y="250" text-anchor="middle" font-size="12">主开关</text>
|
||||
<text x="200" y="270" text-anchor="middle" font-size="10" fill="#666">220kV</text>
|
||||
<text x="200" y="285" text-anchor="middle" font-size="10"
|
||||
<text x="200" y="250" text-anchor="middle" font-size="5">主开关</text>
|
||||
<text x="200" y="270" text-anchor="middle" font-size="4" fill="#666">220kV</text>
|
||||
<text x="200" y="285" text-anchor="middle" font-size="4"
|
||||
:fill="devices[0].status === 'closed' ? '#10b981' : '#ef4444'">
|
||||
{{ devices[0].statusText }}
|
||||
</text>
|
||||
@ -78,15 +78,15 @@
|
||||
<line x1="315" y1="190" x2="345" y2="190" stroke="#666" stroke-width="2" />
|
||||
<line x1="315" y1="210" x2="345" y2="210" stroke="#666" stroke-width="2" />
|
||||
<line x1="315" y1="230" x2="345" y2="230" stroke="#666" stroke-width="2" />
|
||||
<text x="330" y="285" text-anchor="middle" font-size="10" fill="#10b981">已完成</text>
|
||||
<text x="330" y="285" text-anchor="middle" font-size="5" fill="#10b981">已完成</text>
|
||||
</g>
|
||||
|
||||
<!-- 母线开关 -->
|
||||
<g :class="{ 'switch-closed': devices[1].status === 'closed' }">
|
||||
<circle cx="440" cy="200" r="15" :fill="devices[1].status === 'closed' ? '#10b981' : '#ef4444'" />
|
||||
<text x="440" y="250" text-anchor="middle" font-size="12">母线开关</text>
|
||||
<text x="440" y="270" text-anchor="middle" font-size="10" fill="#666">110kV</text>
|
||||
<text x="440" y="285" text-anchor="middle" font-size="10"
|
||||
<text x="440" y="250" text-anchor="middle" font-size="5">母线开关</text>
|
||||
<text x="440" y="270" text-anchor="middle" font-size="4" fill="#666">110kV</text>
|
||||
<text x="440" y="285" text-anchor="middle" font-size="4"
|
||||
:fill="devices[1].status === 'closed' ? '#10b981' : '#ef4444'">
|
||||
{{ devices[1].statusText }}
|
||||
</text>
|
||||
@ -98,8 +98,8 @@
|
||||
<!-- 馈线开关A -->
|
||||
<g :class="{ 'switch-closed': devices[2].status === 'closed' }">
|
||||
<circle cx="600" cy="100" r="15" :fill="devices[2].status === 'closed' ? '#10b981' : '#ef4444'" />
|
||||
<text x="600" y="60" text-anchor="middle" font-size="12">馈线开关A</text>
|
||||
<text x="600" y="80" text-anchor="middle" font-size="10"
|
||||
<text x="600" y="60" text-anchor="middle" font-size="5">馈线开关A</text>
|
||||
<text x="600" y="80" text-anchor="middle" font-size="5"
|
||||
:fill="devices[2].status === 'closed' ? '#10b981' : '#ef4444'">
|
||||
{{ devices[2].statusText }}
|
||||
</text>
|
||||
@ -107,14 +107,14 @@
|
||||
|
||||
<!-- 负载A -->
|
||||
<circle cx="680" cy="100" r="20" fill="#3b82f6" stroke="#1e40af" stroke-width="2" />
|
||||
<text x="680" y="105" text-anchor="middle" fill="white" font-size="12">负载A</text>
|
||||
<text x="680" y="135" text-anchor="middle" font-size="10" fill="#10b981">已完成</text>
|
||||
<text x="680" y="105" text-anchor="middle" fill="white" font-size="5">负载A</text>
|
||||
<text x="680" y="135" text-anchor="middle" font-size="5" fill="#10b981">已完成</text>
|
||||
|
||||
<!-- 馈线开关B -->
|
||||
<g :class="{ 'switch-closed': devices[3].status === 'closed' }">
|
||||
<circle cx="600" cy="300" r="15" :fill="devices[3].status === 'closed' ? '#10b981' : '#ef4444'" />
|
||||
<text x="600" y="340" text-anchor="middle" font-size="12">馈线开关B</text>
|
||||
<text x="600" y="360" text-anchor="middle" font-size="10"
|
||||
<text x="600" y="340" text-anchor="middle" font-size="5">馈线开关B</text>
|
||||
<text x="600" y="360" text-anchor="middle" font-size="5"
|
||||
:fill="devices[3].status === 'closed' ? '#10b981' : '#ef4444'">
|
||||
{{ devices[3].statusText }}
|
||||
</text>
|
||||
@ -123,8 +123,8 @@
|
||||
<!-- 保护开关 -->
|
||||
<g :class="{ 'switch-closed': devices[4].status === 'closed' }">
|
||||
<circle cx="720" cy="300" r="15" :fill="devices[4].status === 'closed' ? '#10b981' : '#ef4444'" />
|
||||
<text x="720" y="340" text-anchor="middle" font-size="12">保护开关</text>
|
||||
<text x="720" y="360" text-anchor="middle" font-size="10"
|
||||
<text x="720" y="340" text-anchor="middle" font-size="5">保护开关</text>
|
||||
<text x="720" y="360" text-anchor="middle" font-size="5"
|
||||
:fill="devices[4].status === 'closed' ? '#10b981' : '#ef4444'">
|
||||
{{ devices[4].statusText }}
|
||||
</text>
|
||||
|
||||
@ -140,6 +140,11 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" prop="creator" label="创建人" min-width="100"></el-table-column>
|
||||
<el-table-column align="center" prop="progress" label="工单进度" min-width="100">
|
||||
<template #default="scope">
|
||||
<el-progress :percentage="parseFloat(scope.row.progress) || 0" show-text />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" prop="createTime" label="创建时间" min-width="140"></el-table-column>
|
||||
<el-table-column align="center" prop="deadline" label="截止时间" min-width="140"></el-table-column>
|
||||
<el-table-column align="center" prop="status" label="状态" min-width="100">
|
||||
@ -296,13 +301,6 @@
|
||||
<el-form-item label="工单描述">
|
||||
<el-input v-model="createForm.resultDescription" type="textarea" :rows="3" placeholder="请描述该工单完成后预期达成的成果" />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="是否需要执行人" prop="needAssignee">
|
||||
<el-radio-group v-model="createForm.needAssignee">
|
||||
<el-radio label="true">是,指定执行人</el-radio>
|
||||
<el-radio label="false">否,由系统分配</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<template #footer>
|
||||
@ -568,7 +566,8 @@ const fetchWorkOrderList = async () => {
|
||||
getOrderTime: item.getOrderTime ? formatDate(item.getOrderTime) : '',
|
||||
finishiOrderTime: item.finishiOrderTime ? formatDate(item.finishiOrderTime) : '',
|
||||
position: item.position || '',
|
||||
device: item.device || ''
|
||||
device: item.device || '',
|
||||
progress: item.progress // 添加进度字段
|
||||
}));
|
||||
|
||||
// 更新总条数
|
||||
@ -1282,6 +1281,25 @@ const handleEdit = async (row) => {
|
||||
createForm.resultDescription = workOrderDetail.results || '';
|
||||
createForm.needAssignee = !!workOrderDetail.executor;
|
||||
|
||||
// 根据工单状态设置进度
|
||||
// 1: 待派单, 2: 已派单, 3: 执行中, 4: 已完成, 5: 已拒绝
|
||||
switch (workOrderDetail.status) {
|
||||
case '1':
|
||||
createForm.progress = 0;
|
||||
break;
|
||||
case '2':
|
||||
createForm.progress = 25;
|
||||
break;
|
||||
case '3':
|
||||
createForm.progress = 50;
|
||||
break;
|
||||
case '4':
|
||||
createForm.progress = 100;
|
||||
break;
|
||||
default:
|
||||
createForm.progress = 0;
|
||||
}
|
||||
|
||||
// 填充步骤数据:从nodes数组中提取并按code排序
|
||||
if (workOrderDetail.nodes && Array.isArray(workOrderDetail.nodes)) {
|
||||
// 复制nodes数组并按code升序排序
|
||||
@ -1343,7 +1361,8 @@ const createForm = reactive({
|
||||
file: '',
|
||||
fileList: [],
|
||||
resultDescription: '',
|
||||
needAssignee: 'false'
|
||||
needAssignee: 'false',
|
||||
progress: 0
|
||||
});
|
||||
|
||||
const createFormRules = {
|
||||
@ -1473,7 +1492,8 @@ const submitCreate = async () => {
|
||||
createBy: '',
|
||||
handlerDept: '',
|
||||
handler: '',
|
||||
handlerName: ''
|
||||
handlerName: '',
|
||||
progress: createForm.progress || 0
|
||||
};
|
||||
|
||||
// 编辑操作:调用updategongdan接口
|
||||
@ -1493,6 +1513,8 @@ const submitCreate = async () => {
|
||||
createForm[key] = [{ name: '', intendedPurpose: '', intendedTime: '' }];
|
||||
} else if (key === 'fileList') {
|
||||
createForm[key] = [];
|
||||
} else if (key === 'progress') {
|
||||
createForm[key] = 0;
|
||||
} else {
|
||||
createForm[key] = '';
|
||||
}
|
||||
@ -1523,6 +1545,8 @@ const cancelCreate = () => {
|
||||
createForm[key] = [{ name: '', intendedPurpose: '', intendedTime: '' }];
|
||||
} else if (key === 'fileList') {
|
||||
createForm[key] = [];
|
||||
} else if (key === 'progress') {
|
||||
createForm[key] = 0;
|
||||
} else {
|
||||
createForm[key] = '';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user