liyangzheng 1 жил өмнө
parent
commit
46edb3bf21

+ 18 - 0
src/api/scd.js

@@ -31,9 +31,27 @@ function scdReal(data){
         params:data,
     })
 }
+// 解析scd
+function loadScd(data){
+    return request({
+        url:`/screen/scd/parse/step1`,
+        method:"post",
+        data,
+    })
+}
+// 获取解析后的数据
+function getLoadScd(data){
+    return request({
+        url:`/admin/get/check_area`,
+        method:"get",
+        params:data
+    })
+}
 export default {
     getAllScd,
     getScdMiddle,
     getIedMiddle,
     scdReal,
+    loadScd,
+    getLoadScd,
 }

+ 41 - 11
src/pages/mission/components/CreateMis.vue

@@ -41,9 +41,15 @@
                         <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" type="primary" plain>{{ btnName
-                        }}</el-button>
-                        <span>正在进行间隔装置分析
+                        <el-upload ref="upload" class="upload-demo" :http-request="nowUpload" :limit="2"
+                            element-loading-text="上传中..." element-loading-background="rgba(255, 255, 255, 0.8)"
+                            :show-file-list="false">
+                            <template #trigger>
+                                <el-button style="border-bottom: 1px solid #7BBAFD;width: calc(100vw - 1000px);"
+                                    type="primary" plain>点击选择scd文件</el-button>
+                            </template>
+                        </el-upload>
+                        <span v-loading="scdLoading">正在进行间隔装置分析
                             <el-icon>
                                 <Loading />
                             </el-icon>
@@ -103,16 +109,14 @@
 <script>
 import { ref, onMounted, reactive } from 'vue';
 import flashPower from '../../../api/flashPower'
-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 cid from '@/api/cid/cid';
 import LookScd from '../modalComp/LookScd.vue';
 import ModelTree from '../modalComp/ModelTree.vue';
 import FlashCreate from '../modalComp/FlashCreate.vue';
-import { ElMessage } from 'element-plus';
+import { ElMessage, ElLoading } from 'element-plus';
 export default {
     props: {
         btnSelect: {
@@ -168,6 +172,7 @@ export default {
         let scdName = ref('')//lookscd.vue返回的scdname
         let cmodel = ref('')
         let fcModal = ref(false)//创建变电站模态框
+        let scdLoading = ref(false)//上传scd文件后进行分析
         function searchAllFlash() {
             flashPower.getAllArea({}).then(res => {
                 flashPower.getAllFlashPower({ pid: res.data[0].pid }).then(res => {
@@ -179,9 +184,9 @@ export default {
                     })
                 })
             })
-            scd.getScdMiddle({ scd_id: 312000086 }).then(res => {
-                jgList.value = res.data
-            })
+            // scd.getScdMiddle({ scd_id: 312000086 }).then(res => {
+            //     jgList.value = res.data
+            // })
             report.getReport({}).then(res => {
                 rmList.value = res.data
             })
@@ -234,6 +239,25 @@ export default {
                 }
             })
         }
+        function nowUpload(e) {
+            const loading = ElLoading.service({
+                    lock: true,
+                    text: '文件上传中',
+                    background: 'rgba(0, 0, 0, 0.7)',
+                })
+            cid.fileUpload({ station_id: 861, data_type: 'a_scd', file: e.file }).then(res => {
+                scdLoading.value = true
+                if (res.code == 0) {
+                    loading.close()
+                }
+                scd.loadScd({ station_id: 861, scd_path: res.data.path, scd_name: res.data.filename }).then(the => {
+                    scd.getLoadScd({ scd_id: the.data - 0 }).then(lod => {
+                        console.log(lod,'rsasdas');
+                        scdLoading.value = false
+                    })
+                })
+            })
+        }
         function addFlash() {
             fcModal.value = true
         }
@@ -253,6 +277,9 @@ export default {
         }
         function lookNum(name, id) {
             scdId.value = id
+            scd.getScdMiddle({ scd_id: id }).then(res => {
+                jgList.value = res.data
+            })
             scdName.value = name
         }
         function fcBack(data) {
@@ -296,6 +323,8 @@ export default {
             addFlash,//新建变电站
             fcModal,//创建变电站模态框
             fcBack,//flashcreate.vue返回的模态框值
+            nowUpload,//文件上传
+            scdLoading,
         }
     },
     components: {
@@ -370,4 +399,5 @@ em {
     border: 1px solid blue;
     text-align: center;
     line-height: 30px;
-}</style>
+}
+</style>

+ 4 - 4
src/pages/mission/modalComp/FlashCreate.vue

@@ -5,14 +5,14 @@
                 <el-form-item label="区域名称" prop="areaName">
                     <el-input v-model="formData.areaName" />
                 </el-form-item>
-                <el-form-item label="父级区域">
+                <!-- <el-form-item label="父级区域">
                     <el-select v-model="formData.pids" placeholder="请选择父级区域">
                         <el-option v-for="(item, index) in fatherArea" :label="item.title" :value="item.pid" />
                     </el-select>
                 </el-form-item>
                 <el-form-item label="区域类型" prop="areaType">
                     <el-input v-model="formData.areaType" />
-                </el-form-item>
+                </el-form-item> -->
             </el-form>
             <template #footer>
                 <span class="dialog-footer">
@@ -65,8 +65,8 @@ export default {
         }
         function modalTrue() {
             flashPower.createFlash({
-                pid: formData.value.pids - 0,
-                area_type: formData.value.areaType - 0,
+                // pid: formData.value.pids - 0,
+                // area_type: formData.value.areaType - 0,
                 area_name: formData.value.areaName,
             }).then(res => {
                 console.log(res, 'tianjia');

+ 1 - 1
src/pages/mission/modalComp/LookScd.vue

@@ -1,7 +1,7 @@
 <template>
     <div>
         <div>
-            <el-dialog v-model="dialogVisible" :title="'选择scd文件,您选择的文件是:' + scdName" width="30%" @close="sureclose">
+            <el-dialog v-model="dialogVisible" draggable :title="'选择scd文件,您选择的文件是:' + scdName" width="30%" @close="sureclose">
                 <el-tree :data="treeList" :props="treeProps" @node-click="handleNodeClick" />
                 <template #footer>
                     <span class="dialog-footer">

+ 4 - 4
src/pages/netStructPicture/components/CidTree.vue

@@ -76,10 +76,9 @@ export default {
             children: "children"
         })
         function tagClick(row, num) {
-            console.log(row, 'row');
             tagChoose.value = num
             cid.findFile({
-                scd_id: 276000076,
+                scd_id: 300000082,
                 ied_name: row.desc,
                 pageno: 1,
                 pagesize: 10,
@@ -91,10 +90,11 @@ export default {
                 pageindex: 1,
                 pagesize: 10,
                 station_id: 861,
-                scd_id: 276000076,
+                scd_id: 300000082,
                 is_checkin: 2,
                 ied_name: row.ied_name
             }).then(res => {
+                console.log(res,'sss222');
                 let a = res.data.filter(item => item.type_name == 'CID')
                 if (a.length > 0) {
                     needName.value = a[0].file_name
@@ -106,7 +106,7 @@ export default {
             console.log(e, 'eee');
         }
         onMounted(() => {
-            cid.getAll({ scd_id: 276000076, ied_name: "" }).then(res => {
+            cid.getAll({ scd_id: 300000082, ied_name: "" }).then(res => {
                 tagList.value = res.data
             })
         })

+ 19 - 10
src/pages/netStructPicture/components/scdTree.vue

@@ -35,7 +35,8 @@
             </el-table>
         </div>
         <div>
-            <LookScd v-if="lookScdModal" :lookScdModal="lookScdModal" :aktType="aktType" @lookScdBack="lookScdBack"></LookScd>
+            <LookScd v-if="lookScdModal" :lookScdModal="lookScdModal" :aktType="aktType" @lookScdBack="lookScdBack">
+            </LookScd>
         </div>
     </div>
 </template>
@@ -45,7 +46,7 @@ import { ref, onMounted, toRefs, watch, nextTick } from 'vue';
 import scdCheck from '@/api/scdCheck/scdCheck'
 import scd from '@/api/scd';
 import systemRow from '@/api/systemRow';
-import { ElMessage } from 'element-plus';
+import { ElMessage, ElLoading } from 'element-plus';
 import LookScd from '../modalCom/LookScd.vue';
 export default {
     setup(props, { emit }) {
@@ -81,20 +82,28 @@ export default {
         function reloadCheck() {//重新比对
             checkNow()
         }
-        function searchScdCheck(row){//查看scd对比
-            scdCheck.scdResult({comp_id:row.id}).then(res=>{
-                console.log(res,'对比详细');
+        function searchScdCheck(row) {//查看scd对比
+            const loading = ElLoading.service({
+                lock: true,
+                text: '正在查询数据',
+                background: 'rgba(0, 0, 0, 0.7)',
             })
-            scdCheck.scdAll({comp_id:row.id}).then(res=>{
-                console.log(res,'阿拉蕾');
+            scdCheck.scdResult({ comp_id: row.id }).then(res => {
+                console.log(res, '对比详细');
+                if(res.code == 0){
+                    loading.close()
+                }
             })
+            // scdCheck.scdAll({ comp_id: row.id }).then(res => {
+            //     console.log(res, '阿拉蕾');
+            // })
         }
-        function lookScdBack(data,row) {//选择scd文件模态框返回数据
+        function lookScdBack(data, row) {//选择scd文件模态框返回数据
             lookScdModal.value = data
             lookScdArr.value = row
-            emit('scdTreeBack',lookScdArr.value)
+            emit('scdTreeBack', lookScdArr.value)
         }
-        function aktType(){//初始化数据
+        function aktType() {//初始化数据
             scdCheck.flashStation({ station_id: 861 }).then(res => {//获取差异纪录列表
                 tableList.value = res.data
             })