Răsfoiți Sursa

Merge branch 'liyangzheng' of http://94.191.59.107:3000/houwenfeng/scd_tools_ui

liling 1 an în urmă
părinte
comite
ea4bc8f0e3

+ 7 - 6
src/pages/mission/MissionVue.vue

@@ -50,17 +50,14 @@ export default {
                 value: "3"
             }
         ])//按钮列表
-        let taskList = ref([
-            {
-                name:"95588"
-            }
-        ])//任务表单
+        let taskList = ref([])//任务表单
         let btnSelect = ref(0)//选择的菜单
         let startMis = ref({})//开始检测
         function searchAllTask() {
             task.getTask({}).then(res => {
                 if (res.data) {
                     taskList.value = res.data
+                    console.log(taskList.value.length,'value');
                 }
             })
         }
@@ -84,7 +81,11 @@ export default {
             btnSelect.value = data
         }
         function haveBack(data){
-            taskList.value = data
+            if(typeof value === 'object' && value === null){
+                taskList.value = data
+            }else{
+                taskList.value = []
+            }
         }
         onMounted(() => {
             searchAllTask()

+ 20 - 24
src/pages/mission/components/CreateMis.vue

@@ -49,16 +49,13 @@
                                     type="primary" plain>点击选择scd文件</el-button>
                             </template>
                         </el-upload>
-                        <span v-loading="scdLoading">正在进行间隔装置分析
-                            <el-icon>
-                                <Loading />
-                            </el-icon>
+                        <span v-loading="scdLoading">{{ scdLoading ? '正在进行间隔装置分析' : '分析完成' }}
                         </span>
                     </el-form-item>
                 </el-form>
             </div>
             <!-- 间隔、装置列表 -->
-            <div class="gapAndUnit">
+            <div class="gapAndUnit" v-if="false">
                 <!-- 间隔列表 -->
                 <div class="gapBox">
                     <div style="display: flex;justify-content: flex-start;align-items: center;margin: 5px;">
@@ -143,18 +140,12 @@ export default {
             misName: [
                 { required: true, message: '请输入名称', trigger: 'blur' },
             ],
-            // misNum:[
-            //     {required:true,message:""}
-            // ]
             flashId: [
                 { required: true, message: "请选择变电站", trigger: "change" }
             ],
             reportNow: [
                 { required: true, message: "请选择模板", trigger: "change" }
             ],
-            // misMes: [
-            //     { required: true, message: "请输入说明", trigger: "blur" }
-            // ]
         })//表单验证
         let flashList = ref([])//表单选择的变电站
         let scdLooks = ref(false)//选择scd文件时的显示与否
@@ -173,6 +164,7 @@ export default {
         let cmodel = ref('')
         let fcModal = ref(false)//创建变电站模态框
         let scdLoading = ref(false)//上传scd文件后进行分析
+        let loadScdId = ref(0)//上传成功后拿到的scdid
         function searchAllFlash() {
             flashPower.getAllArea({}).then(res => {
                 flashPower.getAllFlashPower({ pid: res.data[0].pid }).then(res => {
@@ -184,9 +176,6 @@ export default {
                     })
                 })
             })
-            // scd.getScdMiddle({ scd_id: 312000086 }).then(res => {
-            //     jgList.value = res.data
-            // })
             report.getReport({}).then(res => {
                 rmList.value = res.data
             })
@@ -227,7 +216,7 @@ export default {
                 station_id: 861,
                 memo: newMission.value.misMes,
                 report_id: newMission.value.reportNow - 0,
-                scd_id: scdId.value - 0,
+                scd_id: loadScdId.value - 0,
                 modelids: mxId.value.toString()
             }).then(res => {
                 if (res.code == 0) {
@@ -235,26 +224,32 @@ export default {
                         message: "创建成功",
                         type: "success"
                     })
-                    emit("createBack", 0)
+                    // emit("createBack", 0)
+                    scd.getLoadScd({scd_id:loadScdId.value-0}).then(res=>{
+                        console.log(res,'rsssss');
+                    })
                 }
             })
         }
         function nowUpload(e) {
             const loading = ElLoading.service({
-                    lock: true,
-                    text: '文件上传中',
-                    background: 'rgba(0, 0, 0, 0.7)',
-                })
+                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');
+                    // scd.getLoadScd({ scd_id: the.data - 0 }).then(lod => {
+                    //     console.log(lod,'rsasdas');
+                    if (the.code == 0) {
+                        loadScdId.value = the.data - 0
                         scdLoading.value = false
-                    })
+                    }
+                    // })
                 })
             })
         }
@@ -325,6 +320,7 @@ export default {
             fcBack,//flashcreate.vue返回的模态框值
             nowUpload,//文件上传
             scdLoading,
+            loadScdId//上传成功后拿到的scdid
         }
     },
     components: {
@@ -354,7 +350,7 @@ em {
     width: 1136px;
     height: 339px;
     margin: 0 auto;
-    border-bottom: 1px dashed #dbdbdb;
+    /* border-bottom: 1px dashed #dbdbdb; */
 }
 
 .bestInput {