Kaynağa Gözat

增加模型的位置信息

liaoyitao 3 ay önce
ebeveyn
işleme
091543e689

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

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

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

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