|
@ -8,6 +8,7 @@ |
|
|
<div class="head-search"> |
|
|
<div class="head-search"> |
|
|
<date-range-picker v-model="blurryTime" class="date-item" /> |
|
|
<date-range-picker v-model="blurryTime" class="date-item" /> |
|
|
<rrOperation /> |
|
|
<rrOperation /> |
|
|
|
|
|
<el-button class="filter-item filter-refresh" size="mini" type="warning" icon="el-icon-refresh-left" @click="resetQuery">重置</el-button> |
|
|
</div> |
|
|
</div> |
|
|
<crudOperation> |
|
|
<crudOperation> |
|
|
<template v-slot:right> |
|
|
<template v-slot:right> |
|
@ -24,18 +25,31 @@ |
|
|
</div> |
|
|
</div> |
|
|
<el-table ref="table" v-loading="crud.loading" :data="crud.data" style="width: 100%;" @selection-change="crud.selectionChangeHandler" @row-dblclick="handleDetail"> |
|
|
<el-table ref="table" v-loading="crud.loading" :data="crud.data" style="width: 100%;" @selection-change="crud.selectionChangeHandler" @row-dblclick="handleDetail"> |
|
|
<el-table-column type="selection" align="center" width="55" /> |
|
|
<el-table-column type="selection" align="center" width="55" /> |
|
|
<el-table-column prop="code" label="编号" width="300" /> |
|
|
|
|
|
<el-table-column prop="create_by" label="操作人" width="100" /> |
|
|
|
|
|
<el-table-column prop="create_time" label="操作时间"> |
|
|
|
|
|
|
|
|
<el-table-column prop="id" label="编号" width="120" show-overflow-tooltip /> |
|
|
|
|
|
<el-table-column prop="createBy" label="操作人" /> |
|
|
|
|
|
<el-table-column prop="createTime" label="操作时间" width="200"> |
|
|
<template slot-scope="scope"> |
|
|
<template slot-scope="scope"> |
|
|
<div>{{ scope.row.create_time | parseTime }}</div> |
|
|
|
|
|
|
|
|
<div>{{ scope.row.createTime | parseTime }}</div> |
|
|
|
|
|
</template> |
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
<el-table-column prop="checkRepeatType" label="重复检验方式" align="center"> |
|
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
|
{{ scope.row.checkRepeatType === 1 ? '跳过' : (scope.row.checkRepeatType === 2 ? '覆盖' : '追加') }} |
|
|
|
|
|
</template> |
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
<el-table-column prop="queryDetails" label="挂接字段" min-width="200"> |
|
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
|
{{ scope.row.queryDetails.split(",").map(item => "$" + item + "$").join("") }} |
|
|
|
|
|
</template> |
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
<el-table-column prop="matchingMode" label="匹配模式" align="center"> |
|
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
|
{{ scope.row.matchingMode === 1 ? '全量匹配' : (scope.row.checkRepeatType === 2 ? '前缀模糊匹配' : '后缀模糊匹配') }} |
|
|
</template> |
|
|
</template> |
|
|
</el-table-column> |
|
|
</el-table-column> |
|
|
<el-table-column prop="type" label="重复检验方式" /> |
|
|
|
|
|
<el-table-column prop="filed" label="挂接字段" /> |
|
|
|
|
|
<el-table-column prop="total" label="挂接结果" width="240"> |
|
|
<el-table-column prop="total" label="挂接结果" width="240"> |
|
|
<template slot-scope="scope"> |
|
|
<template slot-scope="scope"> |
|
|
<div>共 {{ scope.row.total }} 条原文,成功<span class="success-status"> {{ scope.row.success }} </span>条,失败<span class="error-status"> {{ scope.row.error }} </span>条</div> |
|
|
|
|
|
|
|
|
<div>共 {{ scope.row.total }} 条原文,成功<span class="success-status"> {{ scope.row.successNum }} </span>条,失败<span class="error-status"> {{ scope.row.failNum }} </span>条</div> |
|
|
</template> |
|
|
</template> |
|
|
</el-table-column> |
|
|
</el-table-column> |
|
|
</el-table> |
|
|
</el-table> |
|
@ -49,8 +63,7 @@ |
|
|
</template> |
|
|
</template> |
|
|
|
|
|
|
|
|
<script> |
|
|
<script> |
|
|
// import crudConnection from '@/api/system/role' |
|
|
|
|
|
import crudRoles from '@/api/system/role' |
|
|
|
|
|
|
|
|
|
|
|
import CRUD, { presenter, header, crud } from '@crud/crud' |
|
|
import CRUD, { presenter, header, crud } from '@crud/crud' |
|
|
import DateRangePicker from '@/components/DateRangePicker' |
|
|
import DateRangePicker from '@/components/DateRangePicker' |
|
|
import rrOperation from '@crud/RR.operation' |
|
|
import rrOperation from '@crud/RR.operation' |
|
@ -59,25 +72,23 @@ import pagination from '@crud/Pagination' |
|
|
import CategoryTree from '@/views/components/categoryTree' |
|
|
import CategoryTree from '@/views/components/categoryTree' |
|
|
import LocalForm from './module/form' |
|
|
import LocalForm from './module/form' |
|
|
import HitchDetail from './module/detail' |
|
|
import HitchDetail from './module/detail' |
|
|
// import { exportFile } from '@/utils/index' |
|
|
|
|
|
// import qs from 'qs' |
|
|
|
|
|
|
|
|
import { exportFile } from '@/utils/index' |
|
|
|
|
|
import qs from 'qs' |
|
|
import { mapGetters } from 'vuex' |
|
|
import { mapGetters } from 'vuex' |
|
|
|
|
|
|
|
|
import tableData from './table.json' |
|
|
|
|
|
|
|
|
|
|
|
export default { |
|
|
export default { |
|
|
name: 'BatchConnection', |
|
|
name: 'BatchConnection', |
|
|
components: { CategoryTree, LocalForm, HitchDetail, DateRangePicker, rrOperation, crudOperation, pagination }, |
|
|
components: { CategoryTree, LocalForm, HitchDetail, DateRangePicker, rrOperation, crudOperation, pagination }, |
|
|
cruds() { |
|
|
cruds() { |
|
|
return [ |
|
|
return [ |
|
|
CRUD({ |
|
|
CRUD({ |
|
|
title: '批量挂接', url: 'api/role/initRoleList', |
|
|
|
|
|
crudMethod: { ...crudRoles }, |
|
|
|
|
|
|
|
|
title: '批量挂接', url: 'api/collect/initMountList', |
|
|
|
|
|
crudMethod: {}, |
|
|
optShow: { |
|
|
optShow: { |
|
|
add: false, |
|
|
add: false, |
|
|
edit: false, |
|
|
edit: false, |
|
|
del: false, |
|
|
del: false, |
|
|
reset: true, |
|
|
|
|
|
|
|
|
reset: false, |
|
|
download: false, |
|
|
download: false, |
|
|
group: false |
|
|
group: false |
|
|
} |
|
|
} |
|
@ -97,7 +108,17 @@ export default { |
|
|
computed: { |
|
|
computed: { |
|
|
...mapGetters([ |
|
|
...mapGetters([ |
|
|
'baseApi' |
|
|
'baseApi' |
|
|
]) |
|
|
|
|
|
|
|
|
]), |
|
|
|
|
|
collectLevel() { |
|
|
|
|
|
if (this.currentCategory.arrangeType === 1) { |
|
|
|
|
|
return 3 |
|
|
|
|
|
} else if (this.currentCategory.arrangeType === 2) { |
|
|
|
|
|
return 2 |
|
|
|
|
|
} else if (this.currentCategory.arrangeType === 3) { |
|
|
|
|
|
return 1 |
|
|
|
|
|
} |
|
|
|
|
|
return null |
|
|
|
|
|
} |
|
|
}, |
|
|
}, |
|
|
created() { |
|
|
created() { |
|
|
}, |
|
|
}, |
|
@ -111,18 +132,32 @@ export default { |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
[CRUD.HOOK.afterRefresh]() { |
|
|
[CRUD.HOOK.afterRefresh]() { |
|
|
this.crud.data = tableData |
|
|
|
|
|
|
|
|
}, |
|
|
|
|
|
resetQuery() { |
|
|
|
|
|
this.blurryTime = [] |
|
|
|
|
|
this.crud.query.startTime = '' |
|
|
|
|
|
this.crud.query.endTime = '' |
|
|
|
|
|
this.crud.refresh() |
|
|
}, |
|
|
}, |
|
|
handleNodeClick(data) { |
|
|
handleNodeClick(data) { |
|
|
this.currentCategory = data |
|
|
this.currentCategory = data |
|
|
|
|
|
if (data) { |
|
|
|
|
|
this.crud.query.categoryId = data.id |
|
|
|
|
|
this.crud.refresh() |
|
|
|
|
|
} |
|
|
}, |
|
|
}, |
|
|
doLoalHitch() { |
|
|
doLoalHitch() { |
|
|
this.$nextTick(() => { |
|
|
this.$nextTick(() => { |
|
|
this.$refs.localForm.localHitchVisible = true |
|
|
this.$refs.localForm.localHitchVisible = true |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
handleDetail() { |
|
|
|
|
|
|
|
|
handleDetail(row) { |
|
|
this.$refs.mDetail.hitchDetialVisible = true |
|
|
this.$refs.mDetail.hitchDetialVisible = true |
|
|
|
|
|
this.$nextTick(() => { |
|
|
|
|
|
this.$refs.mDetail.hitchObject = row |
|
|
|
|
|
this.$refs.mDetail.mountId = row.id |
|
|
|
|
|
this.$refs.mDetail.getInitMountDetailsList(row.id) |
|
|
|
|
|
}) |
|
|
}, |
|
|
}, |
|
|
doExport(data) { |
|
|
doExport(data) { |
|
|
crud.downloadLoading = true |
|
|
crud.downloadLoading = true |
|
@ -132,14 +167,11 @@ export default { |
|
|
type: 'warning', |
|
|
type: 'warning', |
|
|
dangerouslyUseHTMLString: true |
|
|
dangerouslyUseHTMLString: true |
|
|
}).then(() => { |
|
|
}).then(() => { |
|
|
const ids = [] |
|
|
|
|
|
data.forEach(val => { |
|
|
|
|
|
ids.push(val.id) |
|
|
|
|
|
}) |
|
|
|
|
|
// const params = { |
|
|
|
|
|
// 'roleIds': ids |
|
|
|
|
|
// } |
|
|
|
|
|
// exportFile(this.baseApi + '/api/role/exportRole?' + qs.stringify(params, { indices: false })) |
|
|
|
|
|
|
|
|
const ids = data.map(item => item.id) |
|
|
|
|
|
const params = { |
|
|
|
|
|
'mountIds': ids |
|
|
|
|
|
} |
|
|
|
|
|
exportFile(this.baseApi + '/api/collect/exportMount?' + qs.stringify(params, { indices: false })) |
|
|
}).catch(() => { |
|
|
}).catch(() => { |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|