diff --git a/src/views/components/checkBox.vue b/src/views/components/checkBox.vue index 1f2d19a2..41bc5cfa 100644 --- a/src/views/components/checkBox.vue +++ b/src/views/components/checkBox.vue @@ -1,15 +1,16 @@ @@ -37,6 +38,7 @@ export default { checkedList: [], isIndeterminate: false, pid: '', + loading: false } }, created() { @@ -53,8 +55,9 @@ export default { this.$emit('change', { list: this.filterArr(this.checkedList), pid: this.pid }) }, handleChange(value) { + console.log('value----', value) let checkedCount = value.length; - this.checkAll = checkedCount === this.list.length; + this.checkAll = checkedCount === this.boxList.length; this.isIndeterminate = checkedCount > 0 && checkedCount < this.boxList.length; this.$emit('change', { list: this.filterArr(this.checkedList), pid: this.pid }) }, @@ -75,4 +78,10 @@ export default { .mb10 { margin-bottom: 10px; } +.no-data { + padding-top: 30px; + font-size: 14px; + text-align: center; + color: #999; +} \ No newline at end of file diff --git a/src/views/modules/base/diyInfo.vue b/src/views/modules/base/diyInfo.vue index ec4a3eb3..0fd29a40 100644 --- a/src/views/modules/base/diyInfo.vue +++ b/src/views/modules/base/diyInfo.vue @@ -4,10 +4,10 @@
- - + +
-
@@ -19,7 +19,7 @@
导出信息
预览
-
+
@@ -83,7 +83,7 @@
模板名称:
- + 保存为常用模板
@@ -129,6 +129,7 @@ import checkBox from '../../components/checkBox.vue' import dragItem from '../../components/dragItem.vue' import Sortable from 'sortablejs' +import { requestPost } from "@/js/dai/request" export default { props: { list: { @@ -149,8 +150,10 @@ export default { exportLoading: false, activeCollapse: ['1'], activeName: 'first', + leftActive: '', info: {}, rightList: [], + leftList: [], form: { isSaveTemp: false, name: '', @@ -161,11 +164,14 @@ export default { diyDialog: false, } }, - created() { + async created() { this.list.forEach(item => { this.$set(this.info, item.id, []) }) - console.log('infodiy----', this.list) + this.leftActive = this.list[0].id + this.leftList = [...this.list] + this.leftList[0].queryItemList = await this.getExportChildList(this.leftList[0].id) + console.log('infodiy----', this.leftList) this.getTemplateList() }, watch: { @@ -175,14 +181,24 @@ export default { }, deep: true - } + }, + // list: { + // handler(val) { + // if (val.length > 0) { + // this.leftList = [...val] + // this.leftList[0].queryItemList = this.getExportChildList(this.leftList[0].id) + // } + // }, + // deep: true, + // // immediate: true + // }, }, methods: { handleChangeBox({list, pid}) { console.log('ccccc----', list) // if (list.length == 0) return let obj = {} - this.list.forEach(item =>{ + this.leftList.forEach(item =>{ if (item.id == pid) obj = { ...item, queryItemList: [...list] } }) const groups = this.rightList.map(item => item.id) @@ -203,12 +219,23 @@ export default { } this.activeCollapse = [...this.activeCollapse, pid] }, + handleTabsClick(val) { + console.log('tabs-----', val) + this.leftList.forEach(async item => { + if (item.id == val.name) { + if (item.queryItemList.length == 0) item.queryItemList = await this.getExportChildList(item.id) + } + }) + }, handleDelItem(val) { const { item, index } = val console.log('item------', item, this.$refs[`checkbox${item.itemGroupId}`]) - const checkList = this.$refs[`checkbox${item.itemGroupId}`][0].checkedList + let checkList = this.$refs[`checkbox${item.itemGroupId}`][0].checkedList checkList.forEach((n, i) => { - if (n == item.itemId) this.$refs[`checkbox${item.itemGroupId}`][0].checkedList.splice(i, 1) + if (n == item.itemId) { + checkList.splice(i, 1) + this.$refs[`checkbox${item.itemGroupId}`][0].handleChange(checkList) + } }) this.rightList.forEach((n, i) => { if (n.id === item.itemGroupId) { @@ -303,13 +330,17 @@ export default { await this.$http({ method: 'POST', url, - responseType: 'blob', + // responseType: 'blob', data: params }) .then(res => { console.log('res----dddd', res) // this.download(res.data, title + '.xls') - this.getTemplateList() + // this.getTemplateList() + this.exportLoading = false + if (res.data.code && res.data.code == 9999) { + return this.$message.error(res.data.msg) + } if (res.headers["content-disposition"]) { let fileName = window.decodeURI(res.headers["content-disposition"].split(";")[1].split("=")[1]) console.log('filename', fileName) @@ -326,7 +357,6 @@ export default { this.$message.success('导出成功') this.$emit('close') } else this.$message.error('下载失败') - this.exportLoading = false }) .catch(err => { console.log('err', err) @@ -387,6 +417,20 @@ export default { return this.$message.error('网络错误') }) }, + async getExportChildList (groupId) { + const url = `/oper/customize/icformitem/getItemList/${groupId}` + let params = {} + + const { data, code, msg } = await requestPost(url, params) + + if (code === 0) { + + return data + + } else { + this.$message.error(msg) + } + }, } } @@ -422,6 +466,10 @@ export default { } } } +.h80 { + height: calc(80vh - 160px); + overflow: auto; +} .diy-footer { display: flex; align-items: center; diff --git a/src/views/modules/base/resi.vue b/src/views/modules/base/resi.vue index 391035b1..01335d6c 100644 --- a/src/views/modules/base/resi.vue +++ b/src/views/modules/base/resi.vue @@ -1260,7 +1260,8 @@ export default { data.forEach(item => { (async (id) => { - item.queryItemList = await this.getExportChildList(id) + // item.queryItemList = await this.getExportChildList(id) + item.queryItemList = [] })(item.id) }) this.exportList = [...data] diff --git a/src/views/modules/visual/basicinfo/basicInfoMain.vue b/src/views/modules/visual/basicinfo/basicInfoMain.vue index 3358597d..77950ef5 100644 --- a/src/views/modules/visual/basicinfo/basicInfoMain.vue +++ b/src/views/modules/visual/basicinfo/basicInfoMain.vue @@ -316,7 +316,9 @@ const vueGis = { path: `/main-shuju/visual-basicinfo-people-list`, query: { columnName: item.columnName, - label: item.label + label: item.label, + id: this.orgId, + level: this.orgLevel } }); }, diff --git a/src/views/modules/visual/basicinfo/peopleList.vue b/src/views/modules/visual/basicinfo/peopleList.vue index b6757fb4..1438a50d 100644 --- a/src/views/modules/visual/basicinfo/peopleList.vue +++ b/src/views/modules/visual/basicinfo/peopleList.vue @@ -127,10 +127,10 @@ export default { this.searchName = '' this.tableData = [] - const { columnName, label } = this.$route.query + const { columnName, label, id, level } = this.$route.query this.searchName = columnName this.tableTitle = label - this.loadList() + this.loadList(id, level) }, beforeRouteEnter(to, from, next) { @@ -146,11 +146,13 @@ export default { - async loadList () { + async loadList (id, level) { this.loading = true const url = "/epmetuser/icresiuser/searchbycategory" let params = { columnName: this.searchName, + id, + level, pageSize: this.pageSize, pageNo: this.pageNo }