|
@ -50,7 +50,6 @@ |
|
|
<el-button type="primary" |
|
|
<el-button type="primary" |
|
|
@click="beforeImportUser">导入</el-button> |
|
|
@click="beforeImportUser">导入</el-button> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
|
|
|
|
|
|
<el-form-item> |
|
|
<el-form-item> |
|
|
<el-upload ref="upload" |
|
|
<el-upload ref="upload" |
|
|
:action="uploadUrl" |
|
|
:action="uploadUrl" |
|
@ -62,6 +61,10 @@ |
|
|
type="primary">导入</el-button> |
|
|
type="primary">导入</el-button> |
|
|
</el-upload> |
|
|
</el-upload> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
|
|
|
<!-- <el-form-item>--> |
|
|
|
|
|
<!-- <el-button type="primary"--> |
|
|
|
|
|
<!-- @click="updateMa">更新数据码</el-button>--> |
|
|
|
|
|
<!-- </el-form-item>--> |
|
|
</el-form> |
|
|
</el-form> |
|
|
<el-table v-loading="dataListLoading" :data="dataList" border @selection-change="dataListSelectionChangeHandle" style="width: 100%;"> |
|
|
<el-table v-loading="dataListLoading" :data="dataList" border @selection-change="dataListSelectionChangeHandle" style="width: 100%;"> |
|
|
<el-table-column type="selection" header-align="center" align="center" width="50"></el-table-column> |
|
|
<el-table-column type="selection" header-align="center" align="center" width="50"></el-table-column> |
|
@ -80,6 +83,7 @@ |
|
|
<el-table-column :label="$t('handle')" fixed="right" header-align="center" align="center" width="150"> |
|
|
<el-table-column :label="$t('handle')" fixed="right" header-align="center" align="center" width="150"> |
|
|
<template slot-scope="scope"> |
|
|
<template slot-scope="scope"> |
|
|
<el-button type="text" size="small" @click="addOrUpdateHandle(scope.row.id)">{{ $t('update') }}</el-button> |
|
|
<el-button type="text" size="small" @click="addOrUpdateHandle(scope.row.id)">{{ $t('update') }}</el-button> |
|
|
|
|
|
<!-- <el-button type="text" size="small" @click="downloadMa(scope.row.id)">下载房屋二维码</el-button>--> |
|
|
<el-button type="text" size="small" @click="deleteHandle(scope.row.id)">{{ $t('delete') }}</el-button> |
|
|
<el-button type="text" size="small" @click="deleteHandle(scope.row.id)">{{ $t('delete') }}</el-button> |
|
|
</template> |
|
|
</template> |
|
|
</el-table-column> |
|
|
</el-table-column> |
|
@ -95,6 +99,27 @@ |
|
|
</el-pagination> |
|
|
</el-pagination> |
|
|
<!-- 弹窗, 新增 / 修改 --> |
|
|
<!-- 弹窗, 新增 / 修改 --> |
|
|
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update> |
|
|
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update> |
|
|
|
|
|
|
|
|
|
|
|
<el-dialog :visible.sync="faultDataVisible" |
|
|
|
|
|
title="请修改后重新导入"> |
|
|
|
|
|
<el-table :data="this.errordataList" |
|
|
|
|
|
border |
|
|
|
|
|
style="width: 100%;"> |
|
|
|
|
|
<el-table-column prop="errorLine" |
|
|
|
|
|
label="行数" |
|
|
|
|
|
header-align="center" |
|
|
|
|
|
align="center"></el-table-column> |
|
|
|
|
|
<el-table-column prop="errorInfo" |
|
|
|
|
|
label="错误信息" |
|
|
|
|
|
header-align="center" |
|
|
|
|
|
align="center"></el-table-column> |
|
|
|
|
|
</el-table> |
|
|
|
|
|
<template slot="footer"> |
|
|
|
|
|
<!--<el-button type="primary" @click="importResult">忽略错误</el-button>--> |
|
|
|
|
|
<el-button type="primary" |
|
|
|
|
|
@click="exportError">导出错误数据</el-button> |
|
|
|
|
|
</template> |
|
|
|
|
|
</el-dialog> |
|
|
</div> |
|
|
</div> |
|
|
</el-card> |
|
|
</el-card> |
|
|
</template> |
|
|
</template> |
|
@ -103,6 +128,7 @@ |
|
|
import mixinViewModule from '@/mixins/view-module' |
|
|
import mixinViewModule from '@/mixins/view-module' |
|
|
import AddOrUpdate from './epidemicbuildingunit-add-or-update' |
|
|
import AddOrUpdate from './epidemicbuildingunit-add-or-update' |
|
|
import Cookies from "js-cookie"; |
|
|
import Cookies from "js-cookie"; |
|
|
|
|
|
import qs from "qs"; |
|
|
export default { |
|
|
export default { |
|
|
mixins: [mixinViewModule], |
|
|
mixins: [mixinViewModule], |
|
|
data () { |
|
|
data () { |
|
@ -111,9 +137,12 @@ export default { |
|
|
getDataListURL: '/custom/epidemicbuildingunit/page', |
|
|
getDataListURL: '/custom/epidemicbuildingunit/page', |
|
|
getDataListIsPage: true, |
|
|
getDataListIsPage: true, |
|
|
deleteURL: '/custom/epidemicbuildingunit', |
|
|
deleteURL: '/custom/epidemicbuildingunit', |
|
|
deleteIsBatch: true |
|
|
deleteIsBatch: true, |
|
|
|
|
|
exportErrorInfoURL: '/custom/epidemicusererror/export' |
|
|
}, |
|
|
}, |
|
|
options: [], |
|
|
options: [], |
|
|
|
|
|
faultDataVisible: false, |
|
|
|
|
|
errordataList: [], |
|
|
deptIdListUpload: [], |
|
|
deptIdListUpload: [], |
|
|
roomTypeArr: [], |
|
|
roomTypeArr: [], |
|
|
roomUseArr: [], |
|
|
roomUseArr: [], |
|
@ -214,6 +243,38 @@ export default { |
|
|
this.uploeadLoeading = false |
|
|
this.uploeadLoeading = false |
|
|
this.$message.error('上传失败请重试') |
|
|
this.$message.error('上传失败请重试') |
|
|
}, |
|
|
}, |
|
|
|
|
|
updateMa () { |
|
|
|
|
|
this.$http.post(`/custom/epidemicbuildingunit/updateMaCode`).then(({ data: res }) => { |
|
|
|
|
|
if (res.code !== 0) { |
|
|
|
|
|
return this.$message.error(res.msg) |
|
|
|
|
|
} |
|
|
|
|
|
}).catch(() => {}) |
|
|
|
|
|
this.$http.post(`/custom/epidemicplotbuilding/updateMaCode`).then(({ data: res }) => { |
|
|
|
|
|
if (res.code !== 0) { |
|
|
|
|
|
return this.$message.error(res.msg) |
|
|
|
|
|
} |
|
|
|
|
|
}).catch(() => {}) |
|
|
|
|
|
}, |
|
|
|
|
|
downloadMa (id) { |
|
|
|
|
|
this.$http.post(`/custom/epidemicbuildingunit/createHouseQrcode`, {id: id}).then(({ data: res }) => { |
|
|
|
|
|
if (res.code !== 0) { |
|
|
|
|
|
return this.$message.error(res.msg) |
|
|
|
|
|
} |
|
|
|
|
|
}).catch(() => {}) |
|
|
|
|
|
}, |
|
|
|
|
|
// 导出错误数据 |
|
|
|
|
|
exportError () { |
|
|
|
|
|
var params = qs.stringify({ |
|
|
|
|
|
// 'token': window.localStorage.getItem('token'), |
|
|
|
|
|
'token': Cookies.get('token'), |
|
|
|
|
|
...this.dataForm |
|
|
|
|
|
}) |
|
|
|
|
|
window.location.href = `${window.SITE_CONFIG['apiURL']}${this.mixinViewModuleOptions.exportErrorInfoURL}?${params}` |
|
|
|
|
|
this.$message({ |
|
|
|
|
|
type: 'success', |
|
|
|
|
|
message: '下载成功' |
|
|
|
|
|
}); |
|
|
|
|
|
}, |
|
|
beforeImportUser () { |
|
|
beforeImportUser () { |
|
|
//所属组织全都不选,直接上传 |
|
|
//所属组织全都不选,直接上传 |
|
|
if (this.gridIdImport === '') { |
|
|
if (this.gridIdImport === '') { |
|
|