Selaa lähdekoodia

fix: bug调整

zh 2 vuotta sitten
vanhempi
commit
085a9b7d2a

+ 19 - 21
src/views/basic_data/sectorAllocation.vue

@@ -131,28 +131,26 @@ export default {
       resolve(data)
     },
     getTradeConfigList(parentId = '') {
-      return new Promise((resolve, reject) => {
-        getTradeConfigList({
-          keyword: this.keyword,
-          pageNum: this.currentPage,
-          pageSize: this.pageSize
-        })
-          .then(res => {
-            this.listLoading = true
-            if (!parentId) {
-              res.data.records.forEach(k => {
-                k.hasChildren = true
-              })
-              this.tableData = res.data.records
-              this.listTotal = res.data.total
-              this.listLoading = false
-            }
-            resolve(res.data.records)
-          })
-          .catch(err => {
-            reject(err)
-          })
+      getTradeConfigList({
+        keyword: this.keyword,
+        pageNum: this.currentPage,
+        pageSize: this.pageSize
       })
+        .then(res => {
+          this.listLoading = true
+          if (!parentId) {
+            res.data.records.forEach(k => {
+              if (!k.childList) {
+                k.childList = []
+              }
+            })
+            this.tableData = res.data.records
+            this.listTotal = res.data.total
+            this.listLoading = false
+          }
+        })
+        .catch(_err => {
+        })
     },
     handleEdit(level, row) {
       this.formData = { ...row }

+ 54 - 12
src/views/commercialEngineering/components/base.vue

@@ -253,11 +253,11 @@
         <el-col :xs="24" :sm="24" :lg="24" class="item">
           <div class="label">详细地址*:</div>
           <div class="value">
-            <el-input v-model="formData.address" placeholder="请填写" size="mini" clearable />
+            <el-input v-model="formData.address" :disabled="!formData.positionAddress" placeholder="请选择地理定位" size="mini" clearable />
             <geographicalPosi v-if="module !== 'detail'" :form-data="formData" @selectPosi="handleSelectPosi" />
           </div>
         </el-col>
-        <template v-if="isTradeExaminer">
+        <template>
           <el-col v-if="module !== 'add'" :xs="24" :sm="24" :lg="24" class="item" style="height: 400px">
             <div class="label" style="height: auto">地图位置</div>
             <div class="value" style="height: auto; padding: 0">
@@ -268,7 +268,16 @@
                 :markers="markers"
                 :electronic-fence="electronicFence"
                 @getPolygons="getPolygons"
-              />
+              >
+                <template #marker="{ marker }">
+                  <i class="el-icon-location-outline IP_font" />
+                  <div class="IP">
+                    <div>项目编号:{{ marker.no }}</div>
+                    <div>工程项目名称:{{ marker.name }}</div>
+                    <div>地址:{{ marker.address }}</div>
+                  </div>
+                </template>
+              </zj-amap-polygon>
             </div>
           </el-col>
         </template>
@@ -492,17 +501,29 @@ export default {
   watch: {
     async 'formData.id'(newValue, oldValue) {
       if (newValue) {
-        if (this.commonData.vicinityMarkers.length) {
-          this.markers = this.commonData.vicinityMarkers.map(k => {
-            return {
-              id: '',
-              name: k.projectName,
-              center: [k.lnt, k.lat]
+        if (this.isTradeExaminer) {
+          if (this.commonData.vicinityMarkers.length) {
+            this.markers = this.commonData.vicinityMarkers.map(k => {
+              return {
+                id: '',
+                name: k.projectName,
+                center: [k.lnt, k.lat],
+                address: k.address,
+                no: k.projectNo
+              }
+            })
+          }
+        } else {
+          this.markers = [
+            {
+              name: this.formData.projectName,
+              center: [this.formData.lnt, this.formData.lat],
+              address: this.formData.address,
+              no: this.formData.projectNo
             }
-          })
+          ]
         }
-        const item = this.tradeParentList.find(k => k.id === this.formData.tradeParentId)
-        this.tradeList = item.childList
+
         await this.getCallbackPosition(0, this.formData.provinceId, 'province', 'id')
         await this.getCallbackPosition(this.formData.provinceId, this.formData.cityId, 'city', 'id')
         await this.getCallbackPosition(this.formData.cityId, this.formData.areaId, 'area', 'id')
@@ -520,6 +541,9 @@ export default {
         this.formData.customerName = this.customerName
       }
     }
+    if (this.module === 'examine') {
+      this.formData.loginStatus = 'OK'
+    }
   },
   methods: {
     // 获取省市区街道
@@ -643,6 +667,12 @@ export default {
           return
         }
         this.tradeParentList = res.data.records
+        if (this.formData.id) {
+          const item = this.tradeParentList.find(k => k.id === this.formData.tradeParentId)
+          if (item.childList && item.childList.length) {
+            this.tradeList = item.childList
+          }
+        }
       })
     },
     handleService(e) {
@@ -750,4 +780,16 @@ export default {
 ::v-deep .el-upload-list__item-name{
   width: 200px !important;
 }
+.IP_font {
+  font-size: 28px;
+  color: #409eff;
+  position: absolute;
+  left: -13px;
+  top: -25px;
+}
+.IP {
+  width: 15vw;
+  background-color: #fff;
+  padding: 6px 0 6px 6px;
+}
 </style>

+ 2 - 1
src/views/commercialEngineering/components/examine.vue

@@ -42,9 +42,10 @@
         <el-col :xs="12" :sm="12" :lg="12" class="item">
           <div class="label">审核备注</div>
           <div class="value">
-            <el-select v-model="formData.note" placeholder="请选择" size="mini" clearable style="width: 100%">
+            <el-select v-model="formData.examineNote " placeholder="请选择" size="mini" clearable style="width: 100%">
               <el-option v-for="item in commonData.dict['TRADE_EXAMINE_NOTE']" :key="item.value" :label="item.label" :value="item.value" />
             </el-select>
+            <el-input v-if="['frock'].includes(pageType)" v-model="formData.note" placeholder="请填写" size="mini" clearable />
           </div>
         </el-col>
         <el-col :xs="12" :sm="12" :lg="12" class="item">

+ 2 - 2
src/views/commercialEngineering/components/operate.vue

@@ -59,7 +59,7 @@
           }"
           :table-events="tableEvents"
         />
-        <div class="fr">
+        <!-- <div class="fr">
           <el-pagination
             :current-page="currentPage"
             :page-sizes="[10, 20, 30, 50]"
@@ -69,7 +69,7 @@
             @size-change="handleSizeChange"
             @current-change="handleCurrentChange"
           />
-        </div>
+        </div> -->
       </div>
     </div>
     <div v-if="operateType === 'delete'">