Browse Source

选址因子接口参数值调整

lkk 1 year ago
parent
commit
584598ae43

+ 4 - 2
src/views/siteselection/components/fzxz.vue

@@ -115,15 +115,17 @@
         </el-table-column>
         <el-table-column label="条件" show-overflow-tooltip>
           <template slot-scope="scope">
-            <span>{{ yztj(scope.row.default) }}</span>
+            <span>{{ yztj(scope.row.conditionInfo.default) }}</span>
           </template>
         </el-table-column>
 
         <el-table-column
-          prop="defaultValue"
           label="约束值(m/°)"
           show-overflow-tooltip
         >
+        <template slot-scope="scope">
+            <span>{{scope.row.conditionInfo.defaultValue }}</span>
+          </template>
         </el-table-column>
       </el-table>
     </div>

+ 14 - 11
src/views/siteselection/components/yxyzPop.vue

@@ -48,15 +48,15 @@
             <el-table-column type="selection" width="55" align="center">
             </el-table-column>
             <el-table-column prop="name" label="因子名称"> </el-table-column>
-            <el-table-column prop="spatial_type" label="条件" width="150">
+            <el-table-column prop="conditionInfo" label="条件" width="150">
               <template slot-scope="scope">
                 <el-select
-                  v-model="scope.row.default"
+                  v-model="scope.row.conditionInfo.default"
                   placeholder="请选择"
                   class="input-style"
                 >
                   <el-option
-                    v-for="item in scope.row.spatial_types"
+                    v-for="item in scope.row.conditionInfo.items"
                     :key="item.key"
                     :label="item.name"
                     :value="item.key"
@@ -73,12 +73,12 @@
               <template slot-scope="scope">
                 <el-input
                   Onkeyup="this.value=this.value.replace(/[^\d^\.]+/g,'').replace(/^0+(\d)/,'$1').replace(/^\./,'0.').match(/\d+.?\d{0,2}/);this.dispatchEvent(new Event('input'))"
-                  v-model.number="scope.row.defaultValue"
+                  v-model.number="scope.row.conditionInfo.defaultValue"
                   placeholder="距离"
                   class="input-style font-14"
-                  :disabled="scope.row.hasValue"
+                  :disabled="scope.row.conditionInfo.hasValue"
                   type="number"
-                  @input="testInput(scope.row.hasValue)"
+                  @input="testInput(scope.row.conditionInfo.hasValue)"
                 ></el-input>
                 <!-- :disabled="scope.row.condition == 'F'" -->
               </template>
@@ -185,6 +185,7 @@ export default {
       let tableList = [];
       selectdata.forEach((item) => {
         let JSONItem = JSON.parse(item.conditionInfo);
+        console.log(JSONItem);
         tableList.push({
           id: item.id,
           // name: item.yxyzmc,
@@ -195,11 +196,12 @@ export default {
           // yzbsm: item.bsm,
           name: item.name,
           bsm: item.bsm,
-          spatial_types: JSONItem.items,
-          spatial_type: JSONItem.spatial_type,
-          hasValue: JSONItem.hasValue, //是否可以填写约束值
-          defaultValue: Number(JSONItem.defaultValue), //约束值默认值
-          default: JSONItem.default, //默认选中条件
+          conditionInfo:JSONItem,
+          // spatial_types: JSONItem.items,
+          // spatial_type: JSONItem.spatial_type,
+          // hasValue: JSONItem.hasValue, //是否可以填写约束值
+          // defaultValue: Number(JSONItem.defaultValue), //约束值默认值
+          // default: JSONItem.default, //默认选中条件
         });
       });
       tableList.forEach((item) => {
@@ -275,6 +277,7 @@ export default {
       });
       if (sign) {
         this.$parent.tableData = this.dialogData;
+        console.log(this.dialogData);
         this.dialogVisible = false;
       } else {
         this.$message.warning("请将信息补充完整!");