diff --git a/epmet-oper-web/src/js/columns/columns.js b/epmet-oper-web/src/js/columns/columns.js index 3bc0663..8a0e545 100644 --- a/epmet-oper-web/src/js/columns/columns.js +++ b/epmet-oper-web/src/js/columns/columns.js @@ -1,6 +1,9 @@ import Temp from './code/temp' +import RegisterInfo from './customer/customer' export default { - Temp: Temp // 代码上传——上传代码 + Temp: Temp, // 代码上传——上传代码 + + RegisterInfo: RegisterInfo // 客户管理——客户注册信息 } diff --git a/epmet-oper-web/src/js/columns/customer/customer.js b/epmet-oper-web/src/js/columns/customer/customer.js new file mode 100644 index 0000000..948dad5 --- /dev/null +++ b/epmet-oper-web/src/js/columns/customer/customer.js @@ -0,0 +1,50 @@ +export default [ + { + key: 'agencyName', + title: '组织名称', + display: ['formA', 'formU', 'table', 'model'], + fixed: true, + block: true, + width: 120 + }, + { + key: 'level', + title: '组织级别', + display: ['formA', 'formU', 'table', 'model'], + fixed: true, + block: true, + width: 120 + }, + { + key: 'location', + title: '所在地区', + display: ['formA', 'formU', 'table', 'model'], + fixed: true, + block: true, + width: 120 + }, + { + key: 'partybranchnum', + title: '党支部数量', + display: ['formA', 'formU', 'table', 'model'], + block: true + }, + { + key: 'resiAuth', + title: '居民端', + display: ['formA', 'formU', 'table', 'model'], + block: true + }, + { + key: 'workAuth', + title: '工作端', + display: ['formA', 'formU', 'table', 'model'], + block: true + }, + { + key: 'initState', + title: '初始化状态', + display: ['formA', 'formU', 'table', 'model'], + block: true + } +] diff --git a/epmet-oper-web/src/views/components/CTable.vue b/epmet-oper-web/src/views/components/CTable.vue index 3a5a773..8e4d60a 100644 --- a/epmet-oper-web/src/views/components/CTable.vue +++ b/epmet-oper-web/src/views/components/CTable.vue @@ -111,18 +111,18 @@ export default { data () { return { tableData: [], - tableColumn: app.service.getColumns(this.keyword, 'table'), + tableColumn: window.app.service.getColumns(this.keyword, 'table'), loading: false, table: { height: this.tableHeight, params: { - size: this.size,//当前页数显示记录数 - page: this.page //当前页数 + size: this.size, // 当前页数显示记录数 + page: this.page // 当前页数 } }, total: 0, selected: false, - visiblePopover: false,// 删除弹出层开关 + visiblePopover: false, // 删除弹出层开关 templateRadio: '' } }, @@ -175,26 +175,23 @@ export default { tableHeight: { type: Number }, - pageVisible: Boolean //是否显示page分页 lyx 20190411 + pageVisible: Boolean // 是否显示page分页 lyx 20190411 }, computed: { - //操作列宽度 + // 操作列宽度 operationWidth: function () { - // return this.operations.includes('add') - // ? (this.operations.length - 1) * 80 - // : this.operations.length * 80 + // return this.operations.includes('add') + // ? (this.operations.length - 1) * 80 + // : this.operations.length * 80 if (this.operations.includes('add')) { - return (this.operations.length - 1) * 80 //操作列包含add类型按钮时返回 - } - else if (this.operations.includes('analyze')) { - return (this.operations.length + 0.5) * 80 //操作列包含analyze类型按钮时返回 - } - else { + return (this.operations.length - 1) * 80 // 操作列包含add类型按钮时返回 + } else if (this.operations.includes('analyze')) { + return (this.operations.length + 0.5) * 80 // 操作列包含analyze类型按钮时返回 + } else { return this.operations.length * 80 } }, tableSize () { - if (this.resolution === 'small') { return 10 } else { @@ -215,7 +212,7 @@ export default { render () { this.loadData() }, - loadData () { debugger + loadData () { this.loading = true Object.keys(this.params).forEach(key => { if (this.params[key] instanceof Array) { @@ -224,14 +221,13 @@ export default { }) Object.assign(this.table.params, this.params) - // 获取数据 - app.ajax.get( + // 获取数据 + window.app.ajax.get( this.url, this.table.params, (data, rspMsg) => { if (data) { - - //debugger + // debugger this.tableData = data.content this.total = data.totalElements } @@ -239,49 +235,48 @@ export default { }, (rspMsg, data) => { this.$message.error(rspMsg) - this.loading = false } ) }, handleClearSelection () { - // 清空选择 + // 清空选择 this.$refs['table'].clearSelection() }, - //选中复选框 + // 选中复选框 handleSelect (selection, row) { this.$emit('select', selection) - //console.log(selection, row) + // console.log(selection, row) }, - //全选复选框 + // 全选复选框 handleSelectAll (selection) { this.$emit('selectAll', selection) }, handleCellClick (row, column, cell, event) { }, handleRowClick (row) { - // 切换该列的勾选状态 + // 切换该列的勾选状态 this.selected = !this.selected this.$refs['table'].toggleRowSelection(row, this.selected) }, handleEdit (index, row) { - // 因为操作列与数据列属于同一行,编辑某一列后会继续触发table的row-click事件,所以在按钮上添加stop修饰符阻止事件的继续传播 + // 因为操作列与数据列属于同一行,编辑某一列后会继续触发table的row-click事件,所以在按钮上添加stop修饰符阻止事件的继续传播 this.handleClearSelection() this.$refs['table'].toggleRowSelection(row) this.$emit('update', row) }, handleAnalyze (index, row) { - this.handleClearSelection() // 清空选择 + this.handleClearSelection() // 清空选择 this.$refs['table'].toggleRowSelection(row, true) this.$emit('analyze', row) }, handleDelete (index, row) { - this.handleClearSelection() // 删除选择 + this.handleClearSelection() // 删除选择 this.$refs['table'].toggleRowSelection(row, true) this.$emit('delete', row) }, handleDeleteCancel (scope) { - // 关闭popover弹出层 + // 关闭popover弹出层 scope._self.$refs[`popover-${scope.$index}`].doClose() }, handleSizeChange (size) { @@ -291,52 +286,47 @@ export default { this.loadData() }) }, - //改变当前页 + // 改变当前页 handleCurrentChange (page) { - debugger this.table.params.page = page - 1 this.$nextTick(() => { this.loadData() }) }, - //点击上一页 + // 点击上一页 handlePrevClick (page) { - }, - //点击下一页 + // 点击下一页 handleNextClick (page) { - }, - //单选选中 - getRadioRow (index, row) { //获取选中数据 - + // 单选选中 + getRadioRow (index, row) { // 获取选中数据 this.$emit('selectRadioRow', row) }, - //导出表格 + // 导出表格 handleOutTable (name) { - app.util.exportExcel(name, '#out-table') + // app.util.exportExcel(name, '#out-table') }, - exportExcel (tHeader, filterVal) { - require.ensure([], () => { - const { export_json_to_excel } = require('@js/excel/Export2Excel') + // exportExcel (tHeader, filterVal) { + // require.ensure([], () => { + // const { export_json_to_excel } = require('@js/excel/Export2Excel') - const list = this.tableData - const data = this.formatJson(filterVal, list) - export_json_to_excel(tHeader, data, '列表excel') - }) - }, + // const list = this.tableData + // const data = this.formatJson(filterVal, list) + // export_json_to_excel(tHeader, data, '列表excel') + // }) + // }, formatJson (filterVal, jsonData) { return jsonData.map(v => filterVal.map(j => v[j])) }, - //操作列点击实现方法 lyx 20190411 + // 操作列点击实现方法 lyx 20190411 handleMethod (index, row, methodName) { this.handleClearSelection() this.$refs['table'].toggleRowSelection(row, true) this.$emit(methodName, row) - }, - }, - + } + } }