yijianjun 1 месяц назад
Родитель
Сommit
c7aecf0795

+ 7 - 2
src/views/modules/station/components/add-or-update-line.vue

@@ -68,7 +68,9 @@ export default {
       open: false,
       ruleForm: {
         id: undefined,
-        subName: "",
+        subId: undefined,
+        lineName: "",
+        conductMode: "",
         mainCapacity: undefined,
         alarmThreshold: undefined,
         remark: undefined,
@@ -104,7 +106,8 @@ export default {
       this.type = type;
       this.open = true;
       this.resetForm();
-      if (id) this.info(id);
+      if (type === "add") this.ruleForm.subId = id;
+      if (id && type !== "add") this.info(id);
     },
     info(id) {
       this.$http({
@@ -122,6 +125,8 @@ export default {
       this.ruleForm = {
         id: undefined,
         lineName: "",
+        subId: undefined,
+        conductMode: "",
         mainCapacity: undefined,
         alarmThreshold: undefined,
         remark: undefined,

+ 1 - 18
src/views/modules/station/components/line-list.vue

@@ -85,7 +85,7 @@
         <el-button
           class="add"
           type="success"
-          @click="addOrUpdateHandler(null, 'add')"
+          @click="addOrUpdateHandler(stationInfo.id, 'add')"
         >
           <span
             class="icon iconfont icon-xihuan"
@@ -263,23 +263,6 @@
               ></span>
               删除
             </el-button>
-            <el-button
-              class="del"
-              type="primary"
-              @click="lineHandler(scope.row.id)"
-            >
-              <span
-                class="icon iconfont icon-xihuan"
-                :style="{
-                  margin: '0 2px',
-                  fontSize: '14px',
-                  color: '#fff',
-                  display: 'none',
-                  height: '40px',
-                }"
-              ></span>
-              线路
-            </el-button>
           </template>
         </el-table-column>
       </el-table>