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