Browse Source

Merge branch 'dev-220228' of http://git.elinkit.com.cn:7070/r/epmet-oper-gov into dev-220228

shibei_master
jiangyy 4 years ago
parent
commit
a0df7e4b46
  1. 4
      src/views/modules/communityParty/elegant/index.vue
  2. 65
      src/views/modules/communityService/sqzzz/index.vue
  3. 25
      src/views/modules/visual/communityParty/community.vue

4
src/views/modules/communityParty/elegant/index.vue

@ -226,7 +226,7 @@ export default {
data() {
return {
uploadUlr: window.SITE_CONFIG['apiURL'] + '/oss/file/uploadqrcodeV2',
importBtnTitle: '导入人员数据',
importBtnTitle: '导入数据',
importLoading: false,
exportBtn: false,
exportBtnTitle: '导出',
@ -424,7 +424,7 @@ export default {
// this.$message.error('')
// })
this.importLoading = false
this.importBtnTitle = '导入人员数据'
this.importBtnTitle = '导入数据'
this.$refs.upload.clearFiles()
},
async handleExport() {

65
src/views/modules/communityService/sqzzz/index.vue

@ -270,34 +270,53 @@ export default {
}
return fileType && isLt1M;
},
uploadHttpRequest(file) {
async uploadHttpRequest(file) {
this.importLoading = true;
this.importBtnTitle = "正在上传中...";
this.$message({
showClose: true,
message: '导入中,请到系统管理-导入记录中查看进度',
duration: 0
})
const formData = new FormData(); //FormDataappend('key', value)
formData.append("file", file.file); //
axios({
url:
window.SITE_CONFIG["apiURL"] +
"/heart/iccommunityselforganization/importcommunityselforganization",
method: "post",
data: formData,
// responseType: "blob",
})
.then((res) => {
this.importLoading = false;
this.importBtnTitle = "excel导入";
console.log("resresresresresresres", res);
this.getTableData();
if (res.data.code == 0) {
return this.$message.success(res.data.data || "导入成功");
} else {
return this.$message.error(res.data.msg);
}
await this.$http
.post('/heart/iccommunityselforganization/importcommunityselforganization', formData).then(res => {
console.log('res-up', res)
if (res.data.code == 0 && res.data.msg == 'success') {
this.$message.success('导入成功')
this.getTableData()
} else this.$message.error(res.data.msg)
}).catch(err => {
console.log('失败', err)
file.onError() //
this.$message.error('导入失败')
})
.catch((err) => {
console.log("失败", err);
});
// axios({
// url:
// window.SITE_CONFIG["apiURL"] +
// "/heart/iccommunityselforganization/importcommunityselforganization",
// method: "post",
// data: formData,
// // responseType: "blob",
// })
// .then((res) => {
// this.importLoading = false;
// this.importBtnTitle = "excel";
// console.log("resresresresresresres", res);
// this.getTableData();
// if (res.data.code == 0) {
// return this.$message.success(res.data.data || "");
// } else {
// return this.$message.error(res.data.msg);
// }
// })
// .catch((err) => {
// console.log("", err);
// });
this.importLoading = false
this.importBtnTitle = 'excel导入'
this.$refs.upload.clearFiles();
},

25
src/views/modules/visual/communityParty/community.vue

@ -36,7 +36,8 @@
prefix-icon="el-icon-caret-bottom"
value-format="yyyy-MM-dd HH:mm:ss"
:clearable="false"
:default-time="['00:00:00', '23:59:59']">
:default-time="['00:00:00', '23:59:59']"
@change="handleTimeChange">
</el-date-picker>
</div>
</div>
@ -121,6 +122,7 @@
<script>
import { requestPost } from "@/js/dai/request";
import util from '@js/util.js';
import screenTable from "../components/screen-table/index";
import cptCard from "@/views/modules/visual/cpts/card";
import nextTick from "dai-js/tools/nextTick";
@ -232,12 +234,27 @@ export default {
watch: {
timeRange (val) {
console.log('val-www', val)
this.getList(this.agencyId);
this.getCateCount(this.agencyId)
// this.getList(this.agencyId);
// this.getCateCount(this.agencyId)
}
},
methods: {
handleTimeChange (time) {
if (time) {
const startTimeArray = util.dateFormatter(time[0], 'date').split('-')
const endTimeArray = util.dateFormatter(time[1], 'date').split('-')
const startTime = startTimeArray[0] + '-' + startTimeArray[1] + '-' + startTimeArray[2] + ' 00:00:00'
const endTime = endTimeArray[0] + '-' + endTimeArray[1] + '-' + endTimeArray[2] + ' 23:59:59'
this.timeRange = [startTime, endTime]
// this.startTimeShow = startTimeArray[0] + '' + startTimeArray[1] + '' + startTimeArray[2] + ''
// this.endTimeShow = endTimeArray[0] + '' + endTimeArray[1] + '' + endTimeArray[2] + ''
} else {
this.initTime()
}
this.getList(this.agencyId);
this.getCateCount(this.agencyId)
},
//
async getList (agencyId) {
this.visibleLoading = true

Loading…
Cancel
Save