Browse Source

组织回显问题(no解决)

feature
是小王呀\24601 1 year ago
parent
commit
8a28a0fbbb
  1. 2
      src/views/components/checkBox.vue
  2. 23
      src/views/modules/base/smartExport/exset.vue

2
src/views/components/checkBox.vue

@ -34,7 +34,7 @@ export default {
return { return {
boxList: [], boxList: [],
checkAll: false, checkAll: false,
checkedList: [], checkedList: ["20230902094509_3048"],
isIndeterminate: false, isIndeterminate: false,
pid: '', pid: '',
loading: false loading: false

23
src/views/modules/base/smartExport/exset.vue

@ -813,6 +813,10 @@ specialCategoryList: [
val, val,
"agencyId" "agencyId"
); );
if (this.sarr.length == 0) {
this.form.agencyId=''
}
console.log(this.sarr,'seee'); console.log(this.sarr,'seee');
this.form.level = this.sarr[this.sarr.length - 1].level; this.form.level = this.sarr[this.sarr.length - 1].level;
this.form.agencyId = this.sarr[this.sarr.length - 1].agencyId; this.form.agencyId = this.sarr[this.sarr.length - 1].agencyId;
@ -913,9 +917,11 @@ specialCategoryList: [
}, },
// //
async exportTemplate() { async exportTemplate() {
debugger
if(!this.form.name){ if(!this.form.name){
return this.$message.error("请输入模板名称") return this.$message.error("请输入模板名称")
} }
debugger
let url = "/actual/base/residentBaseInfo/exportExcelCustom" let url = "/actual/base/residentBaseInfo/exportExcelCustom"
let params = { let params = {
templateId: this.originId, templateId: this.originId,
@ -935,9 +941,12 @@ specialCategoryList: [
}) })
} }
} }
debugger
if(this.virtualResi){ if(this.virtualResi){
params.searchForm.gridType = 'virtual' params.searchForm.gridType = 'virtual'
} }
debugger
await this.$http({ await this.$http({
method: 'POST', method: 'POST',
url, url,
@ -945,9 +954,10 @@ specialCategoryList: [
data: params data: params
}) })
.then(res => { .then(res => {
// this.download(res.data, title + '.xls') // this.download(res.data, title + '.xls')
// this.getTemplateList() // this.getTemplateList()
console.log("dslkfskjfn jsklf "); console.log(res,"dslkfskjfn jsklf ");
this.exportLoading = false this.exportLoading = false
// if (res.data.code && res.data.code == 9999) { // if (res.data.code && res.data.code == 9999) {
// return this.$message.error(res.data.msg) // return this.$message.error(res.data.msg)
@ -1221,19 +1231,26 @@ specialCategoryList: [
} }
}, },
formatData(res) { formatData(res) {
debugger
const fileReader = new FileReader() const fileReader = new FileReader()
console.log(fileReader.result,);
debugger
fileReader.onloadend = () => { fileReader.onloadend = () => {
try { try {
const jsonData = JSON.parse(fileReader.result) // if (fileReader.result) {
const jsonData = JSON.parse(fileReader.result) //
// //
console.log('jsonData---1', jsonData) console.log('jsonData---1', jsonData)
return this.$message.error(jsonData.msg)
}
return this.$message.error(jsonData.msg)
} catch (err) { // } catch (err) { //
// //
console.log('errr-----', err, this) console.log('errr-----', err, this)
this.downloadFile(res) this.downloadFile(res)
} }
} }
debugger
fileReader.readAsText(res.data) fileReader.readAsText(res.data)
}, },
downloadFile(res) { downloadFile(res) {

Loading…
Cancel
Save