2 커밋 eb95cc1592 ... c83a15c820

작성자 SHA1 메시지 날짜
  qule c83a15c820 Merge branch 'master' of http://39.106.8.246:3003/BDTP/adm-front 2 년 전
  qule 438ab9b5a7 增加时间筛选 2 년 전
3개의 변경된 파일50개의 추가작업 그리고 15개의 파일을 삭제
  1. 1 1
      src/views/ledger/facility/addfacility.vue
  2. 7 0
      src/views/syncManage/constant.js
  3. 42 14
      src/views/syncManage/index.vue

+ 1 - 1
src/views/ledger/facility/addfacility.vue

@@ -6,7 +6,7 @@
                 <el-option v-for="item in showTypes" :key="item.value" :label="item.label" :value="item.value"></el-option>
             </el-select>
             <span>增加</span>
-            <el-input-number v-model="addNum" :controls="false" style="width: 50px" :min="1" :max="50"></el-input-number>
+            <el-input-number v-model="addNum" :controls="false" style="width: 50px" :min="1" :max="500"></el-input-number>
             <span>个{{ category.name }}</span>
             <el-button @click="handleAddTableRow">增加</el-button>
         </el-row>

+ 7 - 0
src/views/syncManage/constant.js

@@ -4,6 +4,13 @@ export const ENUM_OBJECT_TABLE = {
     dt_object: '对象实例表',
     dt_relation: '关系实例表'
 }
+// 表头名称map
+export const TABLE_NAME = {
+    dt_define_type: '对象类型',
+    dt_define_info: '信息点',
+    dt_object: '对象',
+    dt_relation: '关系'
+}
 // 对象类型map
 export const OBJ_TYPE = {
     building: '建筑',

+ 42 - 14
src/views/syncManage/index.vue

@@ -35,19 +35,19 @@
                         </el-select>
                     </li>
                     <li>
-                        <span>状态:</span>
+                        <span>&emsp;&emsp;状态:</span>
                         <el-select v-model="sign"  @change="signChange">
                             <el-option label="成功" :value="2"> </el-option>
                             <el-option label="失败" :value="1"> </el-option>
                         </el-select>
                     </li>
                     <li>
-                        <span>目标id:</span>
+                        <span>&emsp;目标id:</span>
                         <el-input v-model="targetId" :clearable="true" placeholder="请输入对象id" style="width: 220px" @change="objIdChange"></el-input>
                     </li>
                     
                     <li>
-                        <span>对象表:</span>
+                        <span>&emsp;对象表:</span>
                         <el-select v-model="tableName" @change="objTableChange" placeholder="请选择">
                             <el-option v-for="(item, key) in ENUM_OBJECT_TABLE" :key="key" :label="item"  :value="key"></el-option>
                         </el-select>
@@ -55,12 +55,26 @@
                    
                 </ul>
                 <ul class="screen-list">
-                     <li v-if="tableName === 'dt_object'">
+                    <li v-if="tableName === 'dt_object'">
                         <span>对象类型:</span>
                         <el-select v-model="objTypeValue" :clearable="true" @change="objTypeChange" placeholder="请选择">
                             <el-option v-for="item in objType" :key="item.value" :label="item.label" :value="item.value"> </el-option>
                         </el-select>
                     </li>
+                    <li>
+                        <span>同步时间:</span>
+                        <el-date-picker
+                            v-model="timeParam"
+                            type="datetimerange"
+                            format="yyyy-MM-dd HH:mm"
+                            start-placeholder="开始日期"
+                            end-placeholder="结束日期"
+                            @change="timeChange"
+                        >
+                        </el-date-picker>
+                    </li>
+                    <li></li>
+                    <li></li>
                 </ul>
 
                 <el-table
@@ -78,7 +92,7 @@
                             <span style="margin-left: 10px">{{ scope.row.targetId ? scope.row.targetId : "--" }}</span>
                         </template>
                     </el-table-column>
-                    <el-table-column label="名称" >
+                    <el-table-column :label='TABLE_NAME[tableName]' >
                         <template slot-scope="scope">
                             <span style="margin-left: 10px">{{ scope.row.name ? scope.row.name : "--" }}</span>
                         </template>
@@ -166,7 +180,6 @@
 <script>
 import { mapGetters } from 'vuex'
 import {
-    queryGroupCode,
     queryobjType,
     syncDataLogList,
     syncData,
@@ -175,11 +188,13 @@ import {
     exportSql
 } from "@/api/synclog";
 import moment from 'moment'
-import { ENUM_OBJECT_TABLE, OBJ_TYPE } from './constant'
-import { message } from '../../api/scan/config';
+import { ENUM_OBJECT_TABLE, OBJ_TYPE, TABLE_NAME } from './constant'
 export default {
     data() {
         return {
+            ENUM_OBJECT_TABLE,
+            OBJ_TYPE,
+            TABLE_NAME,
             groupCode: "", //集团id
             isShowTable: false, //是否显示table
             data: [],
@@ -256,7 +271,8 @@ export default {
             isExported: false,  //是否已导出excel,未导出则不可同步
 
             syncBtnLoading: false,  //同步按钮状态
-            sqlBtnLoading: false   //导出sql文件按钮状态
+            sqlBtnLoading: false,   //导出sql文件按钮状态
+            timeParam: []
         }
     },
     computed: {
@@ -356,7 +372,7 @@ export default {
             this.loading = true;
           
         },
-        
+       
         // 获取对象类型下拉框
         getObjTypeList() {
             const data = {
@@ -402,6 +418,11 @@ export default {
         // 对象表变化
         objTableChange(val) {
             this.tableName = val;
+            
+        },
+         // 时间变动
+        timeChange() {
+            
             this.getTable();
         },
         // 对象id变化
@@ -432,12 +453,16 @@ export default {
                 // 对象id
                 const targetId = this.targetId ? `;targetId='${this.targetId}'` : ''
 
+                // 时间范围
+                let creationTime = this.timeParam && this.timeParam.map(item => moment(item).format('YYYYMMDDHHmm'))
+                creationTime = creationTime && !!creationTime.length ? `;creationTime in [${creationTime}]` : ''
+
 
                 const postParam = {
-                    order: this.order,
+                    orders: this.order,
                     pageNumber: this.pageObj.pageNumber,
                     pageSize: this.pageObj.pageSize,
-                    filters: `projectId='${this.projectId}';sign=${this.sign}${type}${classCodeName}${objectType}${tableName}${targetId}`,
+                    filters: `projectId='${this.projectId}';sign=${this.sign}${type}${classCodeName}${objectType}${tableName}${targetId}${creationTime}`,
                 };
 
 
@@ -523,8 +548,8 @@ export default {
     },
     mounted() {
         this.getData();
-        this.ENUM_OBJECT_TABLE = ENUM_OBJECT_TABLE;
-        this.OBJ_TYPE = OBJ_TYPE
+        // this.ENUM_OBJECT_TABLE = ;
+        // this. = OBJ_TYPE
     },
     watch: {
         projectId() {
@@ -598,6 +623,9 @@ export default {
     align-items: center;
     justify-content: space-between;
     padding: 12px;
+    li {
+        width: 25%;
+    }
 }
 .screen ul li {
     margin-left: 12px;