Преглед на файлове

增加模型的位置信息

liaoyitao преди 3 месеца
родител
ревизия
091543e689
променени са 2 файла, в които са добавени 21 реда и са изтрити 12 реда
  1. 1 1
      src/views/info/areaInfo/index.vue
  2. 20 11
      src/views/info/modelInfo/index.vue

+ 1 - 1
src/views/info/areaInfo/index.vue

@@ -357,7 +357,7 @@ export default {
357 357
       this.reset();
358 358
       this.open = true;
359 359
       this.title = "添加区域对象";
360
-      this.clearmian();
360
+      // this.clearmian();
361 361
     },
362 362
     /** 修改按钮操作 */
363 363
     handleUpdate(row) {

+ 20 - 11
src/views/info/modelInfo/index.vue

@@ -120,6 +120,18 @@
120 120
     <!-- 添加或修改模型信息对话框 -->
121 121
     <el-dialog :title="title" :visible.sync="open" width="800px" append-to-body>
122 122
       <el-form ref="form" :model="form" :rules="rules" label-width="120px">
123
+        <el-form-item label="方案" prop="planId">
124
+          <template>
125
+            <el-select v-model="form.planId" filterable placeholder="请选择">
126
+              <el-option
127
+                v-for="item in planList"
128
+                :key="item.planId"
129
+                :label="item.planName"
130
+                :value="item.planId">
131
+              </el-option>
132
+            </el-select>
133
+          </template>
134
+        </el-form-item>
123 135
         <el-form-item label="模型名称" prop="modelName">
124 136
           <el-input v-model="form.modelName" placeholder="请输入模型名称" />
125 137
         </el-form-item>
@@ -129,18 +141,10 @@
129 141
         <el-form-item label="模型图标文件">
130 142
           <imageUpload v-model="form.modelIcon"/>
131 143
         </el-form-item>
132
-        <el-form-item label="方案id" prop="planId">
133
-          <template>
134
-          <el-select v-model="form.planId" filterable placeholder="请选择">
135
-            <el-option
136
-              v-for="item in planList"
137
-              :key="item.planId"
138
-              :label="item.planName"
139
-              :value="item.planId">
140
-            </el-option>
141
-          </el-select>
142
-        </template>
144
+        <el-form-item label="位置信息" prop="trans">
145
+          <el-input v-model="form.trans" />
143 146
         </el-form-item>
147
+
144 148
       </el-form>
145 149
       <div slot="footer" class="dialog-footer">
146 150
         <el-button type="primary" @click="submitForm">确 定</el-button>
@@ -240,6 +244,7 @@ export default {
240 244
         originalPath: null,
241 245
         modelIcon: null,
242 246
         planId: null
247
+        , trans: {}
243 248
       };
244 249
       this.resetForm("form");
245 250
     },
@@ -277,6 +282,10 @@ export default {
277 282
     },
278 283
     /** 提交按钮 */
279 284
     submitForm() {
285
+      if (this.form.trans){
286
+        this.form.trans = JSON.parse(this.form.trans)
287
+      }
288
+      console.log(this.form)
280 289
       this.$refs["form"].validate(valid => {
281 290
         if (valid) {
282 291
           if (this.form.modelId != null) {