|
@@ -9,31 +9,40 @@
|
|
|
style="width: 1200px;margin: 0 auto;" :rules="missionRules" require-asterisk-position="right"
|
|
|
label-width="500px">
|
|
|
<el-form-item label="检测任务名称" prop="misName">
|
|
|
- <el-input class="bestInput" v-model="newMission.misName" placeholder="Approved by" clearable />
|
|
|
+ <el-input class="bestInput" v-model="newMission.misName" placeholder="请输入任务名称" clearable />
|
|
|
</el-form-item>
|
|
|
<el-form-item label="任务编号" prop="misNum">
|
|
|
- <el-input class="bestInput" v-model="newMission.misNum" placeholder="Approved by" clearable />
|
|
|
+ <el-input class="bestInput" disabled v-model="newMission.misNum" placeholder="自动生成任务编号..."
|
|
|
+ clearable />
|
|
|
</el-form-item>
|
|
|
<el-form-item label="检测变电站" prop="flashId">
|
|
|
- <el-select style="width: 512px;" v-model="newMission.flashId" placeholder="请选择变电站" clearable
|
|
|
+ <el-select style="width: 340px;" v-model="newMission.flashId" placeholder="请选择变电站" clearable
|
|
|
@change="flashChange">
|
|
|
<template v-for="(item, index) in flashList">
|
|
|
<el-option :label="item.label" :value="item.value" />
|
|
|
</template>
|
|
|
</el-select>
|
|
|
- <img style="width: 40px;height: 40px;" src="../../../assets/icon/create_misBtn.png" alt="">
|
|
|
+ <img @click="addFlash" style="width: 40px;height: 40px;"
|
|
|
+ src="../../../assets/icon/create_misBtn.png" alt="">
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="检测模型" prop="">
|
|
|
+ <el-input class="bestInput" style="width: 600px;" disabled placeholder="输入内容"
|
|
|
+ v-model="cmodel"></el-input>
|
|
|
+ <el-button @click="modelOpen" style="height: 40px;margin-left: 5px;" type="primary"
|
|
|
+ plain>选择模型</el-button>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="报告模板" prop="reportNow">
|
|
|
- <el-select class="bestInput" v-model="newMission.reportNow" placeholder="Activity zone" clearable>
|
|
|
- <el-option label="Zone one" value="shanghai" />
|
|
|
- <el-option label="Zone two" value="beijing" />
|
|
|
+ <el-select class="bestInput" style="width: 400px;" @chang="bmChange" v-model="newMission.reportNow"
|
|
|
+ placeholder="请选择模板" clearable>
|
|
|
+ <el-option v-for="(item, index) in rmList" :label="item.name" :value="item.id" />
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="任务说明" prop="misMes">
|
|
|
<el-input style="width: 1136px;" v-model="newMission.misMes"></el-input>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="SCD文件">
|
|
|
- <el-button style="width: 954px;" @click="chooseScdFile">{{ btnName }}</el-button>
|
|
|
+ <el-button style="width: 954px;" @click="chooseScdFile" type="primary" plain>{{ btnName
|
|
|
+ }}</el-button>
|
|
|
<span>正在进行间隔装置分析
|
|
|
<el-icon>
|
|
|
<Loading />
|
|
@@ -46,22 +55,47 @@
|
|
|
<div class="gapAndUnit">
|
|
|
<!-- 间隔列表 -->
|
|
|
<div class="gapBox">
|
|
|
-
|
|
|
+ <div style="display: flex;justify-content: flex-start;align-items: center;margin: 5px;">
|
|
|
+ <div>
|
|
|
+ <img src="../../../assets/icon/DotsNine.png" alt="">
|
|
|
+ </div>
|
|
|
+ <div>
|
|
|
+ <span>间隔列表</span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <p :class="jgSelect == index ? 'result' : ''" v-for="(item, index) in jgList"
|
|
|
+ style="text-align: left;cursor: pointer;" @click="jgClick(item, index)">
|
|
|
+ {{ item.name }}
|
|
|
+ </p>
|
|
|
</div>
|
|
|
<!-- 装置列表 -->
|
|
|
<div class="unitBox">
|
|
|
- <el-button @click="modelOpen">打开测试</el-button>
|
|
|
+ <div style="display: flex;justify-content: flex-start;align-items: center;margin: 10px 10px;">
|
|
|
+ <div>
|
|
|
+ <img src="../../../assets/icon/HardDrives.png" alt="">
|
|
|
+ </div>
|
|
|
+ <div style="margin-left: 5px;">
|
|
|
+ <span>装置列表——间隔:<em>{{ jg }}</em></span>
|
|
|
+ </div>
|
|
|
+ <div style="margin-left: 5px;">
|
|
|
+ <span>检测模型:<em v-for="(item, index) in mx">{{ mx[index] }}</em></span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div style="display: flex;justify-content: flex-start;align-items: center;">
|
|
|
+ <p class="chooseSpan" v-for="(item, index) in mx">{{ mx[index] }}</p>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div>
|
|
|
- <el-button>返回</el-button>
|
|
|
- <el-button>保存</el-button>
|
|
|
+ <el-button style="width: 200px;height: 30px;" @click="backMent">返回</el-button>
|
|
|
+ <el-button style="width: 200px;height: 30px;" @click="saveMent" type="primary">保存</el-button>
|
|
|
</div>
|
|
|
</div>
|
|
|
<!-- 模态框组件 -->
|
|
|
<div>
|
|
|
- <LookScd v-if="scdLooks" :scdLooks="scdLooks" @nowBack="nowBack"></LookScd>
|
|
|
- <ModelTree v-if="treeMool" :treeMool="treeMool" @treeBack="treeBack"></ModelTree>
|
|
|
+ <LookScd v-if="scdLooks" :scdLooks="scdLooks" @nowBack="nowBack" @lookNum="lookNum"></LookScd>
|
|
|
+ <ModelTree v-if="treeMool" :treeMool="treeMool" @treeBack="treeBack" @treeNum="treeNum"></ModelTree>
|
|
|
+ <FlashCreate v-if="fcModal" :fcModal="fcModal" @fcBack="fcBack"></FlashCreate>
|
|
|
</div>
|
|
|
</div>
|
|
|
</template>
|
|
@@ -69,9 +103,16 @@
|
|
|
<script>
|
|
|
import { ref, onMounted, reactive } from 'vue';
|
|
|
import flashPower from '../../../api/flashPower'
|
|
|
-import scd from "../../../api/scd"
|
|
|
+import systemRow from '@/api/systemRow'
|
|
|
+import litLine from '@/api/litLine';
|
|
|
+import report from '@/api/report';
|
|
|
+import scd from "@/api/scd"
|
|
|
+import task from '@/api/task';
|
|
|
+import station from '@/api/station/station'
|
|
|
import LookScd from '../modalComp/LookScd.vue';
|
|
|
import ModelTree from '../modalComp/ModelTree.vue';
|
|
|
+import FlashCreate from '../modalComp/FlashCreate.vue';
|
|
|
+import { ElMessage } from 'element-plus';
|
|
|
export default {
|
|
|
props: {
|
|
|
btnSelect: {
|
|
@@ -115,6 +156,18 @@ export default {
|
|
|
let scdLooks = ref(false)//选择scd文件时的显示与否
|
|
|
let treeMool = ref(false)//选择模型模态框
|
|
|
let btnName = ref('点击选择scd文件')
|
|
|
+ let jg = ref("请选择")
|
|
|
+ let jgList = ref([])//间隔列表
|
|
|
+ let jgSelect = ref()//选择间隔
|
|
|
+ let jgid = ref("")//间隔id
|
|
|
+ let mx = ref([])
|
|
|
+ let mxList = ref([])//模型列表
|
|
|
+ let mxId = ref("")//模型id
|
|
|
+ let rmList = ref([])//报告模板list
|
|
|
+ let scdId = ref('')//lookscd.vue返回的scdid
|
|
|
+ let scdName = ref('')//lookscd.vue返回的scdname
|
|
|
+ let cmodel = ref('')
|
|
|
+ let fcModal = ref(false)//创建变电站模态框
|
|
|
function searchAllFlash() {
|
|
|
flashPower.getAllArea({}).then(res => {
|
|
|
flashPower.getAllFlashPower({ pid: res.data[0].pid }).then(res => {
|
|
@@ -124,15 +177,27 @@ export default {
|
|
|
value: item.id
|
|
|
}
|
|
|
})
|
|
|
- // console.log(flashList.value, 'value');
|
|
|
})
|
|
|
})
|
|
|
+ scd.getScdMiddle({ scd_id: 312000086 }).then(res => {
|
|
|
+ jgList.value = res.data
|
|
|
+ })
|
|
|
+ report.getReport({}).then(res => {
|
|
|
+ rmList.value = res.data
|
|
|
+ })
|
|
|
}
|
|
|
-
|
|
|
//变电站下拉框change事件
|
|
|
function flashChange(e) {
|
|
|
// searchScd(e)
|
|
|
}
|
|
|
+ function bmChange(e) {
|
|
|
+ newMission.value.reportNow = e.id
|
|
|
+ }
|
|
|
+ function jgClick(row, num) {
|
|
|
+ jg.value = row.name
|
|
|
+ jgSelect.value = num
|
|
|
+ jgid.value = row.id
|
|
|
+ }
|
|
|
// 选择scd文件
|
|
|
function chooseScdFile() {
|
|
|
scdLooks.value = true
|
|
@@ -143,20 +208,56 @@ export default {
|
|
|
if (names && sid) {
|
|
|
newMission.value.scdFolder = sid
|
|
|
btnName.value = names
|
|
|
- scd.getScdMiddle({scd_id:sid}).then(res=>{
|
|
|
- console.log(res,'sid');
|
|
|
+ scd.getScdMiddle({ scd_id: sid }).then(res => {
|
|
|
+ console.log(res, 'sid');
|
|
|
})
|
|
|
- scd.getIedMiddle({scd_id:sid}).then(res=>{
|
|
|
- console.log(res,'ied');
|
|
|
+ scd.getIedMiddle({ scd_id: sid }).then(res => {
|
|
|
+ console.log(res, 'ied');
|
|
|
})
|
|
|
}
|
|
|
}
|
|
|
- function treeBack(data){
|
|
|
+ function saveMent() {//保存检测任务
|
|
|
+ task.createTask({
|
|
|
+ name: newMission.value.misName,
|
|
|
+ station_id: 861,
|
|
|
+ memo: newMission.value.misMes,
|
|
|
+ report_id: newMission.value.reportNow - 0,
|
|
|
+ scd_id: scdId.value - 0,
|
|
|
+ modelids: mxId.value.toString()
|
|
|
+ }).then(res => {
|
|
|
+ if (res.code == 0) {
|
|
|
+ ElMessage({
|
|
|
+ message: "创建成功",
|
|
|
+ type: "success"
|
|
|
+ })
|
|
|
+ emit("createBack", 0)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ function addFlash() {
|
|
|
+ fcModal.value = true
|
|
|
+ }
|
|
|
+ function backMent() {
|
|
|
+ emit("createBack", 0)
|
|
|
+ }
|
|
|
+ function treeBack(data) {
|
|
|
treeMool.value = data
|
|
|
}
|
|
|
- function modelOpen(){
|
|
|
+ function modelOpen() {
|
|
|
treeMool.value = true
|
|
|
}
|
|
|
+ function treeNum(data, name) {
|
|
|
+ mxId.value = data
|
|
|
+ mx.value = name
|
|
|
+ cmodel.value = name.toString()
|
|
|
+ }
|
|
|
+ function lookNum(name, id) {
|
|
|
+ scdId.value = id
|
|
|
+ scdName.value = name
|
|
|
+ }
|
|
|
+ function fcBack(data) {
|
|
|
+ fcModal.value = data
|
|
|
+ }
|
|
|
onMounted(() => {
|
|
|
searchAllFlash()
|
|
|
})
|
|
@@ -175,16 +276,43 @@ export default {
|
|
|
treeMool,//选择模型显示与否
|
|
|
treeBack,//modeltree传回数据
|
|
|
modelOpen,//选择模型打开模态框
|
|
|
+ jg,//间隔
|
|
|
+ jgList,//间隔列表
|
|
|
+ jgSelect,//选择
|
|
|
+ jgClick,//间隔点击
|
|
|
+ jgid,//间隔id
|
|
|
+ mx,//模型
|
|
|
+ mxList,//模型列表
|
|
|
+ treeNum,//modelTree.vue返回的id函数
|
|
|
+ mxId,//模型id
|
|
|
+ lookNum,//lookscd.vue返回的scd名称和id函数
|
|
|
+ rmList,//报告模板列表
|
|
|
+ scdId,//lookscd.vue返回的数据
|
|
|
+ scdName,//lookscd.vue返回的数据
|
|
|
+ saveMent,//保存检测任务
|
|
|
+ bmChange,
|
|
|
+ backMent,//返回切换
|
|
|
+ cmodel,
|
|
|
+ addFlash,//新建变电站
|
|
|
+ fcModal,//创建变电站模态框
|
|
|
+ fcBack,//flashcreate.vue返回的模态框值
|
|
|
}
|
|
|
},
|
|
|
components: {
|
|
|
LookScd,
|
|
|
ModelTree,//选择模型
|
|
|
+ FlashCreate,//创建变电站
|
|
|
}
|
|
|
}
|
|
|
</script>
|
|
|
|
|
|
<style scoped>
|
|
|
+em {
|
|
|
+ font-style: normal;
|
|
|
+ color: #5779D7;
|
|
|
+ margin-right: 5px;
|
|
|
+}
|
|
|
+
|
|
|
.createMisBox {
|
|
|
width: 100%;
|
|
|
height: calc(100vh - 150px);
|
|
@@ -201,14 +329,14 @@ export default {
|
|
|
}
|
|
|
|
|
|
.bestInput {
|
|
|
- width: 550px;
|
|
|
+ width: 340px;
|
|
|
height: 40px;
|
|
|
border-radius: 2px 2px 2px 2px;
|
|
|
}
|
|
|
|
|
|
.gapAndUnit {
|
|
|
width: 1136px;
|
|
|
- height: 150px;
|
|
|
+ /* height: 150px; */
|
|
|
/* border: 1px solid black; */
|
|
|
margin: 5px auto;
|
|
|
display: flex;
|
|
@@ -218,15 +346,28 @@ export default {
|
|
|
|
|
|
.gapBox {
|
|
|
width: 288px;
|
|
|
- height: 142px;
|
|
|
+ height: calc(100vh - 600px);
|
|
|
overflow-y: auto;
|
|
|
border: 1px solid #5779D7;
|
|
|
}
|
|
|
|
|
|
.unitBox {
|
|
|
width: 832px;
|
|
|
- height: 142px;
|
|
|
+ height: calc(100vh - 600px);
|
|
|
overflow-y: auto;
|
|
|
border: 1px solid #5779D7;
|
|
|
+ position: relative;
|
|
|
+}
|
|
|
+
|
|
|
+.result {
|
|
|
+ color: #5779D7;
|
|
|
}
|
|
|
-</style>
|
|
|
+
|
|
|
+.chooseSpan {
|
|
|
+ width: 150px;
|
|
|
+ height: 30px;
|
|
|
+ margin-left: 10px;
|
|
|
+ border: 1px solid blue;
|
|
|
+ text-align: center;
|
|
|
+ line-height: 30px;
|
|
|
+}</style>
|