liyangzheng hace 1 año
padre
commit
73f5cf62b3

BIN
src/assets/fontStyle/DINNextLTPro-Bold.ttf


BIN
src/assets/fontStyle/DS-DIGIB-2.ttf


BIN
src/assets/fontStyle/Inter-Bold-4.otf


BIN
src/assets/fontStyle/Inter-Medium-8.otf


BIN
src/assets/fontStyle/Inter-Regular-9.otf


BIN
src/assets/fontStyle/PangMenZhengDaoBiaoTiTiMianFeiBan-2.ttf


BIN
src/assets/fontStyle/SourceHanSansCN-Bold_0.otf


BIN
src/assets/fontStyle/SourceHanSansCN-Medium_0.otf


BIN
src/assets/fontStyle/SourceHanSansCN-Regular_0.otf


+ 61 - 28
src/pages/components/drawModal/LineDouble.vue

@@ -1,7 +1,7 @@
 <template>
     <div>
         <el-dialog v-model="dialogVisible" title="装置端子关系配置" width="60%" @close="handleClose" :close-on-click-modal="false">
-            <div class="masBox">
+            <div class="masBox" v-loading="pastLoading">
                 <div class="leftBox">
                     <h1 style="
                     border-bottom: 1px solid #7484AB;
@@ -96,9 +96,9 @@ export default {
             type: String,
             required: true
         },//结束文本
-        lineType:{
-            type:String,
-            required:true
+        lineType: {
+            type: String,
+            required: true
         },//用于判断goose还是sv
     },
     setup(props, { emit }) {
@@ -120,6 +120,7 @@ export default {
         let loading = ref(false)
         let arrNew = ref([])//新的存储fdcdids
         let gv = ref('')
+        let pastLoading = ref(false)
         watch(() => props.modelId, (newVal) => {
             modelIds.value = newVal
         })
@@ -132,11 +133,11 @@ export default {
         watch(() => props.numCase, (newVal) => {
             numStatus.value = newVal
         })
-        watch(()=>props.lineType,(newVal)=>{
+        watch(() => props.lineType, (newVal) => {
             gv.value = newVal
         })
         // 初始化函数
-        function reload() {
+        async function reload() {
             dialogVisible.value = props.ldModal
             modelIds.value = props.modelId
             starts.value = props.startTarget
@@ -145,7 +146,7 @@ export default {
             endTxt.value = props.endText
             numStatus.value = props.numCase
             gv.value = props.lineType
-            flow.getModelAndIed({
+            await flow.getModelAndIed({
                 model_id: modelIds.value - 0,
                 ied_type: starts.value.ied_type,
             }).then(res => {
@@ -158,7 +159,7 @@ export default {
                     })
                 }
             })
-            flow.getModelAndIed({
+            await flow.getModelAndIed({
                 model_id: modelIds.value - 0,
                 ied_type: ends.value.ied_type,
             }).then(res => {
@@ -232,26 +233,54 @@ export default {
         // 下标选择
         function setIndex(row, num) {
             loading.value = true
-            flow.getModelOn({
-                model_id: modelIds.value - 0,
-                from_fcda_id: row.id - 0
-            }).then(res => {
-                if (res.data != null) {
-                    together.value = res.data
-                    checkList.value = together.value.map(item => item.to_fcda_id);
-                    fcdaIds.value = res.data.map(item => {
-                        return item.to_fcda_id
-                    }).join(",")
-                    loading.value = false
-                } else {
-                    together.value = []
-                    checkList.value = []
-                    loading.value = false
-                }
-            })
-            if (row || num) {
+            if (row && num) {
                 leftFcda.value = row.id
                 leftIndex.value = num
+                flow.getModelOn({
+                    model_id: modelIds.value - 0,
+                    from_fcda_id: row.id - 0
+                }).then(res => {
+                    if (res.data != null) {
+                        together.value = res.data
+                        checkList.value = together.value.map(item => item.to_fcda_id);
+                        fcdaIds.value = res.data.map(item => {
+                            return item.to_fcda_id
+                        }).join(",")
+                        loading.value = false
+                    } else {
+                        together.value = []
+                        checkList.value = []
+                        loading.value = false
+                    }
+                })
+            } else {
+                if (curList.value.length > 0) {
+                    leftFcda.value = curList.value[0].id
+                    leftIndex.value = 0
+                    flow.getModelOn({
+                        model_id: modelIds.value - 0,
+                        from_fcda_id: curList.value[0].id - 0
+                    }).then(res => {
+                        if (res.data != null) {
+                            together.value = res.data
+                            checkList.value = together.value.map(item => item.to_fcda_id);
+                            fcdaIds.value = res.data.map(item => {
+                                return item.to_fcda_id
+                            }).join(",")
+                            loading.value = false
+                        } else {
+                            together.value = []
+                            checkList.value = []
+                            loading.value = false
+                        }
+                    })
+                }else{
+                    ElMessage({
+                        type:"info",
+                        message:"您还没有配置装置"
+                    })
+                    loading.value = false
+                }
             }
         }
         // function isVisible(item) {
@@ -281,8 +310,11 @@ export default {
         function checkChange(e) {
             fcdaIds.value = e.join(",")
         }
-        onMounted(() => {
-            reload()
+        onMounted(async () => {
+            await reload()
+            pastLoading.value = true
+            setIndex()
+            pastLoading.value = false
         })
         return {
             dialogVisible,//模态框开关
@@ -314,6 +346,7 @@ export default {
             checkChange,
             arrNew,//新的存储ids
             gv,
+            pastLoading,//maxbox加载动画
         }
     }
 }

+ 82 - 32
src/pages/mission/components/CreateMis.vue

@@ -25,11 +25,11 @@
                         <img @click="addFlash" style="width: 40px;height: 40px;"
                             src="../../../assets/icon/create_misBtn.png" alt="">
                     </el-form-item>
-                    <el-form-item label="检测模型" prop="">
+                    <el-form-item label="检测模型" prop="cmodel">
                         <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-icon>
-                                <Coin />
+                                <Coin style="color: #449DFD;" />
                             </el-icon>选择模型</el-button>
                     </el-form-item>
                     <el-form-item label="报告模板" prop="reportNow">
@@ -88,11 +88,17 @@
                         </div>
                         <div style="margin-left: 5px;">
                             <span>装置列表——间隔:<em>{{ jg }}</em></span>
+                            <span>检测模型:<em>{{ flashLevel ? flashLevel + '线路保护模型' : '' }}</em></span>
                         </div>
-                        <div style="position: absolute;top: 0px;right: 0px;">
-                            <!-- <span>检测模型:<em v-for="(item, index) in mx">{{ mx[index] }}</em></span> -->
-                            <el-checkbox label="开启检测" size="large" />
-                            <el-button type="primary" size="small" plain @click="checkTime">选择装置</el-button>
+                        <div
+                            style="position: absolute;top: 0px;right: 0px;display: flex;justify-content: center;align-items: center;">
+
+                            <div style="margin: 0 10px;">
+                                <el-checkbox label="开启检测" size="large" />
+                            </div>
+                            <div>
+                                <el-button type="primary" size="small" plain @click="checkTime">选择装置</el-button>
+                            </div>
                         </div>
 
                     </div>
@@ -100,14 +106,16 @@
                         <!-- <div v-for="(item, index) in mx">
                             {{ item.ied_name }}
                         </div> -->
-                        <el-tag v-for="(item, index) in mx" :key="item.ied_name" size="large" class="mx-1" type="info"
-                            closable effect="plain" @close="tagClose(item, index)">
+                        <el-tag v-for="(item, index) in mx" :key="item.ied_name" @click="tagClick(item, index)" size="large"
+                            :class="item.isChoose ? 'mx-2' : 'mx-1'" type="info" :closable="item.isChoose" effect="plain"
+                            @close="tagClose(item, index)">
                             {{ item.ied_name }}
                         </el-tag>
                     </div>
                 </div>
             </div>
             <div v-if="successScd">
+                <el-button style="width: 200px;height: 30px;" @click="backMent">返回</el-button>
                 <el-button style="width: 200px;height: 30px;" type="primary" @click="iedSave">保存</el-button>
             </div>
         </div>
@@ -165,19 +173,23 @@ export default {
             misMes: "",
             scdFolder: "",
             misId: "",
+            cmodel:"",
         })//创建任务提交表单
         let missionRules = ref({
             misName: [
                 { required: true, message: '请输入名称', trigger: 'blur' },
             ],
             flashId: [
-                { required: true, message: "请选择变电站", trigger: "change" }
+                { required: true, message: "请选择变电站", trigger: "blur" }
             ],
             reportNow: [
-                { required: true, message: "请选择模板", trigger: "change" }
+                { required: true, message: "请选择模板", trigger: "blur" }
             ],
             misMes: [
-                { required: true, message: "请输入任务说明", trigger: "change" }
+                { required: true, message: "请输入任务说明", trigger: "blur" }
+            ],
+            cmodel: [
+                { required: true, message: "请选择检测模型", trigger: "blur" }
             ],
         })//表单验证
         let flashList = ref([])//表单选择的变电站
@@ -211,6 +223,7 @@ export default {
         let treeNeed = ref([])//modelTree.vue需要的回显数据
         let anyData = ref([])
         let states = ref(0)
+        let flashLevel = ref("")
         const myForm = ref(null)//表单ref
         watch(() => props.editRow, (newVal) => {
             needEdit.value = newVal
@@ -303,30 +316,35 @@ export default {
             }
         }
         function saveMent() {//保存检测任务
-            task.createTask({
-                id: newMission.value.misNum - 0,
-                name: newMission.value.misName,
-                station_id: newMission.value.flashId - 0,
-                memo: newMission.value.misMes,
-                report_id: newMission.value.reportNow - 0,
-                scd_id: loadScdId.value - 0,
-                modelids: mxId.value.toString()
-            }).then(res => {
-                if (res.code == 0) {
-                    ElMessage({
-                        message: "创建成功",
-                        type: "success"
-                    })
-                    // emit("createBack", 0)
-                    scd.getLoadScd({ scd_id: loadScdId.value - 0 }).then(res => {
+            myForm.value.validate((val) => {
+                if (val) {
+                    task.createTask({
+                        id: newMission.value.misNum - 0,
+                        name: newMission.value.misName,
+                        station_id: newMission.value.flashId - 0,
+                        memo: newMission.value.misMes,
+                        report_id: newMission.value.reportNow - 0,
+                        scd_id: loadScdId.value - 0,
+                        modelids: mxId.value.toString()
+                    }).then(res => {
                         if (res.code == 0) {
-                            successScd.value = true
-                            anyData.value = res.data
-                            console.log(anyData.value, 'any')
+                            ElMessage({
+                                message: "创建成功",
+                                type: "success"
+                            })
+                            // emit("createBack", 0)
+                            scd.getLoadScd({ scd_id: loadScdId.value - 0 }).then(res => {
+                                if (res.code == 0) {
+                                    successScd.value = true
+                                    anyData.value = res.data
+                                    console.log(anyData.value, 'any')
+                                }
+                            })
                         }
                     })
                 }
             })
+
         }
         function nowUpload(e) {
             const loading = ElLoading.service({
@@ -351,11 +369,13 @@ export default {
             })
         }
         function handleCheckChange(e) {
+            jg.value = e.area_name
             loadAreaId.value = e.area_id
+            flashLevel.value = e.vol_name
             iedLoading.value = true
             scd.getTikIed({ scd_id: loadScdId.value - 0, area_id: e.area_id - 0 }).then(res => {
                 if (res.data != null) {
-                    mx.value = res.data
+                    mx.value = res.data.map(item => ({ ...item, isChoose: false }));
                     iedName.value = mx.value.map(item => item.ied_name).join(',')
                     iedLoading.value = false
                 } else {
@@ -387,6 +407,14 @@ export default {
             mx.value.splice(mx.value.indexOf(row), 1)
             iedName.value = mx.value.map(item => item.ied_name).join(',');
         }
+        function tagClick(row, num) {
+            // 将所有对象的 isChoose 属性设置为 false
+            mx.value.forEach(item => {
+                item.isChoose = false;
+            });
+            // 将当前点击的对象的 isChoose 属性设置为 true
+            row.isChoose = true;
+        }
         function checkTime() {
             iedModal.value = true
         }
@@ -404,8 +432,8 @@ export default {
         }
         function treeNum(data, name) {
             mxId.value = data
-            // mx.value = name
             cmodel.value = name.toString()
+            newMission.value.cmodel = name.toString()
         }
         function lookNum(name, id) {
             scdId.value = id
@@ -487,6 +515,8 @@ export default {
             states,
             myForm,//表单ref
             resetForm,
+            flashLevel,
+            tagClick,//tag标签的点击事件
         }
     },
     components: {
@@ -570,6 +600,17 @@ em {
     margin-right: 10px;
     margin-top: 5px;
     border: 1px solid #5779D7;
+    color: black;
+}
+
+.mx-2 {
+    width: 100px;
+    height: 30px;
+    margin-right: 10px;
+    margin-top: 5px;
+    border: 1px solid #5779D7;
+    background-color: rgba(89, 120, 213, 0.3);
+    color: #5779D7;
 }
 
 :deep(.el-form--inline .el-form-item) {
@@ -586,4 +627,13 @@ em {
 
 .my-red-label {
     color: red;
+}
+
+:deep(.el-tag--large .el-tag__close) {
+    margin-left: 25px;
+    pointer-events: none;
+}
+
+:deep(.el-icon svg) {
+    /* color: red; */
 }</style>

+ 12 - 4
src/pages/mission/modalComp/CheckIed.vue

@@ -1,6 +1,7 @@
 <template>
     <div>
-        <el-dialog v-model="dialogVisible" draggable title="选择ied" width="30%" @close="sureclose" :close-on-click-modal="false">
+        <el-dialog v-model="dialogVisible" draggable title="选择ied" width="30%" @close="sureclose"
+            :close-on-click-modal="false">
             <el-tree :data="treeList" :props="treeProps" @check-change="handleNodeClick" show-checkbox
                 style="height: 300px;overflow-y: auto;" />
             <template #footer>
@@ -35,8 +36,8 @@ export default {
         let treeList = ref([])
         let checkArr = ref([])
         let treeProps = ref({
-            label: "ied_name",
-            id: "area_id",
+            label: "label",
+            id: "id",
         })
         watch(() => props.loadScdId, (newVal) => {
             resultId.value = newVal
@@ -45,7 +46,14 @@ export default {
             dialogVisible.value = props.iedModal
             resultId.value = props.loadScdId
             scd.scdAllIed({ scd_id: resultId.value - 0 }).then(res => {
-                treeList.value = res.data
+                if (res.data != null) {
+                    treeList.value = res.data.map(item => {
+                        return {
+                            label: item.ied_name + " " + item.name,
+                            id: item.area_id,
+                        }
+                    })
+                }
             })
         }
         function modalClose() {

+ 13 - 15
src/pages/setting/components/ReportModule.vue

@@ -39,26 +39,27 @@
                     <el-table ref="multipleTableRef" :data="reportList" style="width: 100%;height: calc(100vh - 260px);"
                         @selection-change="handleSelectionChange">
                         <el-table-column type="selection" width="55" />
-                        <el-table-column label="编号" width="auto">
+                        <!-- <el-table-column label="编号" width="auto">
                             <template #default="scope">
                                 {{ scope.$index + 1 }}
                             </template>
-                        </el-table-column>
-                        <el-table-column property="name" label="模板名称" width="auto" show-overflow-tooltip />
-                        <el-table-column property="memo" label="模板描述" width="auto" show-overflow-tooltip />
-                        <el-table-column property="ct" label="上传时间" width="auto" show-overflow-tooltip />
+                        </el-table-column> -->
+                        <el-table-column property="doc_id" label="编号" width="200" show-overflow-tooltip />
+                        <el-table-column property="name" label="模板名称" width="260" show-overflow-tooltip />
+                        <el-table-column property="memo" label="模板描述" width="600" show-overflow-tooltip />
+                        <el-table-column property="ct" label="上传时间" width="200" show-overflow-tooltip />
                         <el-table-column property="state" label="状态" width="auto" show-overflow-tooltip>
                             <template #default="scope">
                                 <span>{{ reState(scope.row.state) }}</span>
                             </template>
                         </el-table-column>
-                        <el-table-column fixed="right" label="操作" width="180">
+                        <el-table-column fixed="right" label="操作" width="auto">
                             <template #default="scope">
-                                <el-button link type="primary" size="small" @click="openAdd(1, scope.row)">
+                                <el-button style="color: #255CE7;" link type="primary" size="small" @click="openAdd(1, scope.row)">
                                     <el-icon>
                                         <EditPen />
                                     </el-icon>编辑</el-button>
-                                <el-button link type="primary" size="small" @click="downFile(scope.row)">
+                                <el-button style="color: #255CE7;" link type="primary" size="small" @click="downFile(scope.row)">
                                     <el-icon>
                                         <Download />
                                     </el-icon>下载</el-button>
@@ -171,15 +172,12 @@ export default {
             system.downLoad({
                 ids: row.doc_id - 0
             }).then(res => {
-                if (res.code == 0) {
+                if(res.code == 0){
+                    location.href = window.ApiServer + res.data
                     ElMessage({
-                        message: "正在下载",
-                        type: "success",
-                        duration: 1000
+                        message:"正在下载",
+                        type:"success",
                     })
-                    const la = window.location.hostname
-                    let result = la + ':8080' + res.data
-                    console.log(result, 'result');
                 }
             })
         }

+ 5 - 4
src/pages/setting/modalComp/AddSn.vue

@@ -117,10 +117,11 @@ export default {
                 })
             } else {
                 if (numForm.value.name == '' || numForm.value.memo == "") {
-                    ElMessage({
-                        type: "error",
-                        message: "还有内容未填写"
-                    })
+                    return
+                    // ElMessage({
+                    //     type: "error",
+                    //     message: "还有内容未填写"
+                    // })
                 } else {
                     system.editSystemCode({
                         param_name: numForm.value.name,

+ 14 - 9
src/pages/system/components/InsideModule.vue

@@ -8,15 +8,15 @@
                 <div style="height: 100%;width: calc(100% - 0px);position: relative;">
                     <div class="setBox">
                         <div
-                            style="width: 60%;display: flex;justify-content: flex-start;align-items: center;margin-left: 10px;">
-                            <div style="width: calc(40%);">
+                            style="width: 80%;display: flex;justify-content: flex-start;align-items: center;margin-left: 10px;">
+                            <div style="width: calc(20%);">
                                 <span style="font-size: 14px;color: #7484AB;">连接线:</span>
                                 <span class="sv" :style="{ opacity: lineMenuColor == 'orange' ? 1 : 0.4 }"
                                     @click="svClick">SV</span>
                                 <span class="goose" :style="{ opacity: lineMenuColor == 'orange' ? 0.4 : 1 }"
                                     @click="gooseClick">GOOSE</span>
                             </div>
-                            <div style="display: flex;width: calc(30%);">
+                            <div style="display: flex;width: calc(15%);">
                                 <span style="font-size: 14px;color: #7484AB;margin-left: 20px;">操作:</span>
                                 <div class="cutPoint">
                                     <!-- <img style="width: 22px;height: 22px;display: block;"
@@ -29,7 +29,7 @@
                                     <span style="display: block;">删除</span>
                                 </div>
                             </div>
-                            <div style="display: flex;width: 30%;">
+                            <div style="display: flex;width: 20%;">
                                 <div>
                                     <span style="font-size: 14px;color: #7484AB;">位置:</span>
                                 </div>
@@ -44,16 +44,21 @@
                                         @change="yChange"></el-input>
                                 </div>
                             </div>
+                            <div style="width: calc(20%);display: flex;justify-content: center;align-items: center;">
+                                <el-icon style="display: block;color: #255CE7;font-size: 18px;">
+                                    <WarningFilled />
+                                </el-icon>
+                                <span
+                                    style="font-size: 14px;color: #7484AB;display: block;color: #255CE7;">双击节点或连接线可配置属性</span>
+                            </div>
                         </div>
                         <div style="width: calc(15%);">
                             <div style="width: calc(100%);">
-                                <el-button type="primary" @click="cleanAll" plain>关闭</el-button>
-                                <el-button type="primary" @click="saveMap">保存</el-button>
+                                <el-button style="width: 80px;height: 30px;" type="primary" @click="cleanAll"
+                                    plain>关闭</el-button>
+                                <el-button style="width: 80px;height: 30px;" type="primary" @click="saveMap">保存</el-button>
                             </div>
                         </div>
-                        <div style="width: calc(15%);">
-                            <span style="font-size: 14px;color: #7484AB;">双击节点或连接线可配置属性</span>
-                        </div>
                     </div>
                     <div class="iedBox">
                         <img style="display: block;" src="../../../assets/icon/HardDrives.png" alt="">