Explorar o código

修复若干bug

liling hai 1 ano
pai
achega
06a1bd6385

+ 1 - 1
src/pages/components/drawModal/AbilityModal.vue

@@ -152,7 +152,7 @@ export default {
                 .then(blob => {
                     const url = window.URL.createObjectURL(blob);
                     const a = document.createElement('a');
-                    a.download = 'fanc_comp.xlsx'; // 修改文件名
+                    a.download = '端子关联关系配置_模板.xlsx'; // 修改文件名
                     a.href = url;
                     document.body.appendChild(a);
                     a.click();

+ 5 - 4
src/pages/components/drawModal/GroupModelAdd.vue

@@ -3,9 +3,10 @@
         <el-dialog v-model="dialogVisible" title="组合装置类型编码设置" width="30%" @close="handleClose"
             :close-on-click-modal="false">
             <span>组合装置编码:</span>
-            <el-input v-model="iedValue" :maxlength="5" :show-word-limit="true" style="width: 300px;"
-                placeholder="请输入编码,仅支持大写英文字母或#"></el-input>
+            <el-input v-model="iedValue" :maxlength="10" :show-word-limit="true" style="width: 300px;"
+                placeholder="请输入编码,仅支持大写英文字母、#、-"></el-input>
             <div>编码说明:区分电压等级时,使用编码#电压组合方式,其中高压为H,中压为M,低压为L,本体为0,差动为C,如:PT#H,PT#0,PT#C;</div>
+            <div>多套说明:当需要区分AB套时,使用横杠-连接套别代码,如:PT#H-A,PT-B;</div>
             <template #footer>
                 <span class="dialog-footer">
                     <el-button @click="cancels">取消</el-button>
@@ -51,11 +52,11 @@ export default {
         }
         // 确认按钮
         function modalSure() {
-            const reg= /^[A-Za-z#]+$/;
+            const reg= /^[A-Za-z#\-]+$/;
             const v = iedValue.value.replace(/ /g,'')
             if (v == '' || !reg.test(v)) {
                 ElMessage({
-                    message: "请输入正确的组合装置编码:仅支持纯英文字母",
+                    message: "请输入正确的组合装置编码:仅支持纯英文字母、#、-",
                     type: "error"
                 })
             } else {

+ 3 - 3
src/pages/mission/MissionVue.vue

@@ -80,7 +80,7 @@ export default {
         function searchAllTask() {
             // 0为待检测
             task.getTask({ pageno: 1, pagesize: 10, state: 0 }).then(res => {
-                if (res.data == null) {
+                if (res==null || res.data == null) {
                     return
                 } else {
                     // taskList.value = res.data
@@ -90,7 +90,7 @@ export default {
             })
             // 2为完成检测
             task.getTask({ pageno: 1, pagesize: 10, state: 2 }).then(res => {
-                if (res.data == null) {
+                if (res==null || res.data == null) {
                     return
                 } else {
                     // taskList.value = res.data
@@ -100,7 +100,7 @@ export default {
             })
             // 1为正在检测
             task.getTask({ pageno: 1, pagesize: 10, state: 1 }).then(res => {
-                if (res.data == null) {
+                if (res==null || res.data == null) {
                     return
                 } else {
                     // taskList.value = res.data

+ 5 - 4
src/pages/mission/components/HaveMis.vue

@@ -178,6 +178,7 @@ export default {
       lookingTask.value = row
       taskModels.value = []
       task.getTaskById({ id: row.id }).then(res => {
+        if(res==null) return
         if (res.code != 0) {
           ElMessage({
             message: res.msg,
@@ -249,7 +250,7 @@ export default {
       })
       // 0为待检测
       task.getTask({ pageno: 1, pagesize: 6, state: 0 }).then(res => {
-        if (res.data == null) {
+        if (res==null || res.data == null) {
           loading.close()
           misList.value = []
           return
@@ -271,7 +272,7 @@ export default {
       })
       // 2为完成检测
       task.getTask({ pageno: 1, pagesize: 6, state: 2 }).then(res => {
-        if (res.data == null) {
+        if (res==null || res.data == null) {
           passList.value = []
           return
         } else {
@@ -280,7 +281,7 @@ export default {
       })
       // 1为正在检测
       task.getTask({ pageno: 1, pagesize: 10, state: 1 }).then(res => {
-        if (res.data == null) {
+        if (res==null ||res.data == null) {
           nowRunList.value = []
           lookingTask.value = []
           return
@@ -294,7 +295,7 @@ export default {
       task.reladyTask({
         id: row.id
       }).then(res => {
-        if (res.code == 0) {
+        if (res!=null &&res.code == 0) {
           ElMessage({
             message: "任务已重置",
             type: "success"

+ 2 - 2
src/pages/mission/components/HistoryMis.vue

@@ -38,8 +38,8 @@
                     <template #default="scoped">
                         <!-- <el-popconfirm title="你确定删除吗?" @confirm="sureDelMis">
                             <template #reference> -->
-                        <el-button link type="primary" size="small" @click="relady(scoped.row)">重新检测</el-button>
-                        <el-button link type="danger" size="small" @click="delMis(scoped.row)">删除</el-button>
+                        <el-button v-if="scoped.row.state=='2'" link type="primary" size="small" @click="relady(scoped.row)">重新检测</el-button>
+                        <el-button v-if="scoped.row.state!='1'" link type="danger" size="small" @click="delMis(scoped.row)">删除</el-button>
                         <!-- </template>
                         </el-popconfirm> -->
                     </template>