Browse Source

客户注册信息

dev
jiangyuying 5 years ago
parent
commit
921e4ad3e6
  1. 5
      epmet-oper-web/src/js/columns/columns.js
  2. 50
      epmet-oper-web/src/js/columns/customer/customer.js
  3. 98
      epmet-oper-web/src/views/components/CTable.vue
  4. 33
      epmet-oper-web/src/views/main-content.vue
  5. 6
      epmet-oper-web/src/views/modules/code/CommitForm.vue
  6. 29
      epmet-oper-web/src/views/modules/code/CommitList.vue
  7. 249
      epmet-oper-web/src/views/modules/customer-manage/RegisterList.vue

5
epmet-oper-web/src/js/columns/columns.js

@ -1,6 +1,9 @@
import Temp from './code/temp' import Temp from './code/temp'
import RegisterInfo from './customer/customer'
export default { export default {
Temp: Temp // 代码上传——上传代码 Temp: Temp, // 代码上传——上传代码
RegisterInfo: RegisterInfo // 客户管理——客户注册信息
} }

50
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
}
]

98
epmet-oper-web/src/views/components/CTable.vue

@ -111,18 +111,18 @@ export default {
data () { data () {
return { return {
tableData: [], tableData: [],
tableColumn: app.service.getColumns(this.keyword, 'table'), tableColumn: window.app.service.getColumns(this.keyword, 'table'),
loading: false, loading: false,
table: { table: {
height: this.tableHeight, height: this.tableHeight,
params: { params: {
size: this.size,// size: this.size, //
page: this.page // page: this.page //
} }
}, },
total: 0, total: 0,
selected: false, selected: false,
visiblePopover: false,// visiblePopover: false, //
templateRadio: '' templateRadio: ''
} }
}, },
@ -175,26 +175,23 @@ export default {
tableHeight: { tableHeight: {
type: Number type: Number
}, },
pageVisible: Boolean //page lyx 20190411 pageVisible: Boolean // page lyx 20190411
}, },
computed: { computed: {
// //
operationWidth: function () { operationWidth: function () {
// return this.operations.includes('add') // return this.operations.includes('add')
// ? (this.operations.length - 1) * 80 // ? (this.operations.length - 1) * 80
// : this.operations.length * 80 // : this.operations.length * 80
if (this.operations.includes('add')) { if (this.operations.includes('add')) {
return (this.operations.length - 1) * 80 //add return (this.operations.length - 1) * 80 // add
} } else if (this.operations.includes('analyze')) {
else if (this.operations.includes('analyze')) { return (this.operations.length + 0.5) * 80 // analyze
return (this.operations.length + 0.5) * 80 //analyze } else {
}
else {
return this.operations.length * 80 return this.operations.length * 80
} }
}, },
tableSize () { tableSize () {
if (this.resolution === 'small') { if (this.resolution === 'small') {
return 10 return 10
} else { } else {
@ -215,7 +212,7 @@ export default {
render () { render () {
this.loadData() this.loadData()
}, },
loadData () { debugger loadData () {
this.loading = true this.loading = true
Object.keys(this.params).forEach(key => { Object.keys(this.params).forEach(key => {
if (this.params[key] instanceof Array) { if (this.params[key] instanceof Array) {
@ -224,14 +221,13 @@ export default {
}) })
Object.assign(this.table.params, this.params) Object.assign(this.table.params, this.params)
// //
app.ajax.get( window.app.ajax.get(
this.url, this.url,
this.table.params, this.table.params,
(data, rspMsg) => { (data, rspMsg) => {
if (data) { if (data) {
// debugger
//debugger
this.tableData = data.content this.tableData = data.content
this.total = data.totalElements this.total = data.totalElements
} }
@ -239,49 +235,48 @@ export default {
}, },
(rspMsg, data) => { (rspMsg, data) => {
this.$message.error(rspMsg) this.$message.error(rspMsg)
this.loading = false this.loading = false
} }
) )
}, },
handleClearSelection () { handleClearSelection () {
// //
this.$refs['table'].clearSelection() this.$refs['table'].clearSelection()
}, },
// //
handleSelect (selection, row) { handleSelect (selection, row) {
this.$emit('select', selection) this.$emit('select', selection)
//console.log(selection, row) // console.log(selection, row)
}, },
// //
handleSelectAll (selection) { handleSelectAll (selection) {
this.$emit('selectAll', selection) this.$emit('selectAll', selection)
}, },
handleCellClick (row, column, cell, event) { }, handleCellClick (row, column, cell, event) { },
handleRowClick (row) { handleRowClick (row) {
// //
this.selected = !this.selected this.selected = !this.selected
this.$refs['table'].toggleRowSelection(row, this.selected) this.$refs['table'].toggleRowSelection(row, this.selected)
}, },
handleEdit (index, row) { handleEdit (index, row) {
// tablerow-clickstop // tablerow-clickstop
this.handleClearSelection() this.handleClearSelection()
this.$refs['table'].toggleRowSelection(row) this.$refs['table'].toggleRowSelection(row)
this.$emit('update', row) this.$emit('update', row)
}, },
handleAnalyze (index, row) { handleAnalyze (index, row) {
this.handleClearSelection() // this.handleClearSelection() //
this.$refs['table'].toggleRowSelection(row, true) this.$refs['table'].toggleRowSelection(row, true)
this.$emit('analyze', row) this.$emit('analyze', row)
}, },
handleDelete (index, row) { handleDelete (index, row) {
this.handleClearSelection() // this.handleClearSelection() //
this.$refs['table'].toggleRowSelection(row, true) this.$refs['table'].toggleRowSelection(row, true)
this.$emit('delete', row) this.$emit('delete', row)
}, },
handleDeleteCancel (scope) { handleDeleteCancel (scope) {
// popover // popover
scope._self.$refs[`popover-${scope.$index}`].doClose() scope._self.$refs[`popover-${scope.$index}`].doClose()
}, },
handleSizeChange (size) { handleSizeChange (size) {
@ -291,52 +286,47 @@ export default {
this.loadData() this.loadData()
}) })
}, },
// //
handleCurrentChange (page) { handleCurrentChange (page) {
debugger
this.table.params.page = page - 1 this.table.params.page = page - 1
this.$nextTick(() => { this.$nextTick(() => {
this.loadData() this.loadData()
}) })
}, },
// //
handlePrevClick (page) { handlePrevClick (page) {
}, },
// //
handleNextClick (page) { handleNextClick (page) {
}, },
// //
getRadioRow (index, row) { // getRadioRow (index, row) { //
this.$emit('selectRadioRow', row) this.$emit('selectRadioRow', row)
}, },
// //
handleOutTable (name) { handleOutTable (name) {
app.util.exportExcel(name, '#out-table') // app.util.exportExcel(name, '#out-table')
}, },
exportExcel (tHeader, filterVal) { // exportExcel (tHeader, filterVal) {
require.ensure([], () => { // require.ensure([], () => {
const { export_json_to_excel } = require('@js/excel/Export2Excel') // const { export_json_to_excel } = require('@js/excel/Export2Excel')
const list = this.tableData // const list = this.tableData
const data = this.formatJson(filterVal, list) // const data = this.formatJson(filterVal, list)
export_json_to_excel(tHeader, data, '列表excel') // export_json_to_excel(tHeader, data, 'excel')
}) // })
}, // },
formatJson (filterVal, jsonData) { formatJson (filterVal, jsonData) {
return jsonData.map(v => filterVal.map(j => v[j])) return jsonData.map(v => filterVal.map(j => v[j]))
}, },
// lyx 20190411 // lyx 20190411
handleMethod (index, row, methodName) { handleMethod (index, row, methodName) {
this.handleClearSelection() this.handleClearSelection()
this.$refs['table'].toggleRowSelection(row, true) this.$refs['table'].toggleRowSelection(row, true)
this.$emit(methodName, row) this.$emit(methodName, row)
}, }
}, }
} }
</script> </script>
<style> <style>

33
epmet-oper-web/src/views/main-content.vue

@ -4,24 +4,35 @@
<template v-if="$route.meta.isTab"> <template v-if="$route.meta.isTab">
<el-dropdown class="aui-content--tabs-tools"> <el-dropdown class="aui-content--tabs-tools">
<i class="el-icon-arrow-down"></i> <i class="el-icon-arrow-down"></i>
<el-dropdown-menu slot="dropdown" :show-timeout="0"> <el-dropdown-menu slot="dropdown"
:show-timeout="0">
<el-dropdown-item @click.native="tabRemoveHandle($store.state.contentTabsActiveName)">{{ $t('contentTabs.closeCurrent') }}</el-dropdown-item> <el-dropdown-item @click.native="tabRemoveHandle($store.state.contentTabsActiveName)">{{ $t('contentTabs.closeCurrent') }}</el-dropdown-item>
<el-dropdown-item @click.native="tabsCloseOtherHandle()">{{ $t('contentTabs.closeOther') }}</el-dropdown-item> <el-dropdown-item @click.native="tabsCloseOtherHandle()">{{ $t('contentTabs.closeOther') }}</el-dropdown-item>
<el-dropdown-item @click.native="tabsCloseAllHandle()">{{ $t('contentTabs.closeAll') }}</el-dropdown-item> <el-dropdown-item @click.native="tabsCloseAllHandle()">{{ $t('contentTabs.closeAll') }}</el-dropdown-item>
</el-dropdown-menu> </el-dropdown-menu>
</el-dropdown> </el-dropdown>
<el-tabs v-model="$store.state.contentTabsActiveName" @tab-click="tabSelectedHandle" @tab-remove="tabRemoveHandle"> <el-tabs v-model="$store.state.contentTabsActiveName"
<el-tab-pane @tab-click="tabSelectedHandle"
v-for="item in $store.state.contentTabs" @tab-remove="tabRemoveHandle">
:key="item.name" <el-tab-pane v-for="item in $store.state.contentTabs"
:name="item.name" :key="item.name"
:label="item.title" :name="item.name"
:closable="item.name !== 'home'" :label="item.title"
:class="{ 'is-iframe': tabIsIframe(item.iframeURL) }"> :closable="item.name !== 'home'"
:class="{ 'is-iframe': tabIsIframe(item.iframeURL) }">
<template v-if="item.name === 'home'"> <template v-if="item.name === 'home'">
<svg slot="label" class="icon-svg aui-content--tabs-icon-nav" aria-hidden="true"><use xlink:href="#icon-home"></use></svg> <svg slot="label"
class="icon-svg aui-content--tabs-icon-nav"
aria-hidden="true">
<use xlink:href="#icon-home"></use>
</svg>
</template> </template>
<iframe v-if="tabIsIframe(item.iframeURL)" :src="item.iframeURL" width="100%" height="100%" frameborder="0" scrolling="yes"></iframe> <iframe v-if="tabIsIframe(item.iframeURL)"
:src="item.iframeURL"
width="100%"
height="100%"
frameborder="0"
scrolling="yes"></iframe>
<keep-alive v-else> <keep-alive v-else>
<router-view v-if="item.name === $store.state.contentTabsActiveName" /> <router-view v-if="item.name === $store.state.contentTabsActiveName" />
</keep-alive> </keep-alive>

6
epmet-oper-web/src/views/modules/code/CommitForm.vue

@ -168,6 +168,12 @@ export default {
}) })
}, },
methods: { methods: {
//
initData (dataForm) {
this.$nextTick(() => {
this.$refs['ref_form_temp'].assign(dataForm)
})
},
// dialog // dialog
showSubmitDia () { showSubmitDia () {
this.dialog.title = '上传代码' this.dialog.title = '上传代码'

29
epmet-oper-web/src/views/modules/code/CommitList.vue

@ -67,6 +67,7 @@
</el-form> </el-form>
<el-table id="out-table" <el-table id="out-table"
ref="table" ref="table"
:height="tableHeight"
:header-cell-style="{color:'#000'}" :header-cell-style="{color:'#000'}"
:data="tableData" :data="tableData"
:style="{width: '100%'}" :style="{width: '100%'}"
@ -167,7 +168,7 @@
:visible="commitDia.visible" :visible="commitDia.visible"
:showConfirm="false" :showConfirm="false"
@cancel="commitDiaCancel"> @cancel="commitDiaCancel">
<commit-form ref="ref_temp_list"></commit-form> <commit-form ref="ref_commit_form"></commit-form>
</c-dialog> </c-dialog>
<c-dialog :title="submitDia.title" <c-dialog :title="submitDia.title"
@ -192,6 +193,7 @@ import CDialog from '../../components/CDialog'
import SubmitForm from './SubmitForm' import SubmitForm from './SubmitForm'
import CommitForm from './CommitForm' import CommitForm from './CommitForm'
import OperHistory from './OperHistory' import OperHistory from './OperHistory'
import { mapGetters } from 'vuex'
export default { export default {
mixins: [mixinViewModule], mixins: [mixinViewModule],
data () { data () {
@ -338,8 +340,33 @@ export default {
components: { components: {
CDialog, SubmitForm, CommitForm, OperHistory CDialog, SubmitForm, CommitForm, OperHistory
}, },
activated () {
this.$nextTick(() => {
this.$refs.table.doLayout() //
})
},
mounted () { mounted () {
let params = this.$route.params
//
if (params.showCommit) {
this.commitDia.title = '上传代码'
this.commitDia.visible = true
let dataForm = {
type: '工作端',
client: params.name
}
this.$nextTick(() => {
this.$refs['ref_commit_form'].initData(dataForm)
})
}
},
computed: {
tableHeight () {
return this.clientHeight - 60 - 80 - 80 - 50
},
...mapGetters(['clientHeight'])
}, },
methods: { methods: {
// //

249
epmet-oper-web/src/views/modules/customer-manage/RegisterList.vue

@ -0,0 +1,249 @@
<template>
<div class="registerList">
<el-card shadow="never"
class="aui-card--fill">
<div class="mod-demo__demo}">
<el-form :inline="true"
:model="dataForm"
@keyup.enter.native="getDataList()">
<el-form-item>
<el-input v-model="dataForm.name"
placeholder="组织名称">
</el-input>
</el-form-item>
<el-form-item>
<el-button @click="getDataList()">查询</el-button>
</el-form-item>
</el-form>
<!-- <div style=" height:100px;overflow-y:auto"> -->
<el-table id="out-table"
ref="table"
:height="tableHeight"
:header-cell-style="{color:'#000'}"
:data="tableData"
:style="{width: '100%'}"
border
v-loading="loading"
element-loading-text="正在加载中"
element-loading-spinner="el-icon-loading"
element-loading-background="rgba(255, 255, 255, 0.8)">
<!-- <el-table-column type="selection"
header-align="center"
align="center"
width="50"></el-table-column> -->
<el-table-column prop="agencyName"
label="组织名称"
min-width="100"
header-align="center"
align="center"></el-table-column>
<el-table-column prop="level"
label="组织级别"
min-width="50"
header-align="center"
align="center"></el-table-column>
<el-table-column prop="location"
label="所在地区"
min-width="100"
header-align="center"
align="center"></el-table-column>
<el-table-column prop="partybranchnum"
label="党支部数量"
min-width="50"
header-align="center"
align="center"></el-table-column>
<el-table-column prop="resiAuth"
label="居民端"
min-width="60"
header-align="center"
align="center"></el-table-column>
<el-table-column prop="workAuth"
label="工作端"
min-width="60"
header-align="center"
align="center"></el-table-column>
<el-table-column label="操作"
fixed="right"
header-align="center"
align="center"
width="150">
<template slot-scope="scope">
<el-button type="text"
size="small"
@click="init(scope.row.id)">初始化
</el-button>
<el-button type="text"
size="small"
@click="commitCode(scope.row.id)">上传代码
</el-button>
</template>
</el-table-column>
</el-table>
<!-- </div> -->
<el-pagination :current-page="page"
:page-sizes="[10, 20, 50, 100]"
:page-size="limit"
:total="total"
layout="total, sizes, prev, pager, next, jumper"
@size-change="pageSizeChangeHandle"
@current-change="pageCurrentChangeHandle">
</el-pagination>
<!-- <c-table column-type="index"
ref="table_dic"
:url="this.url"
:params="tableParams"
keyword="RegisterInfo"
:operations="operations"
:tableHeight="tableHeight"
@commitCode="commitCode">
</c-table> -->
</div>
</el-card>
</div>
</template>
<script>
import mixinViewModule from '@/mixins/view-module'
import CTable from '../../components/CTable'
import { mapGetters } from 'vuex'
export default {
mixins: [mixinViewModule],
data () {
return {
mixinViewModuleOptions: {
getDataListURL: '/demo/demo/page',
getDataListIsPage: true,
deleteURL: '/demo/demo',
deleteIsBatch: true,
exportURL: '/demo/demo/export'
},
loading: false,
dataForm: {
name: '' //
},
tableParams: {
type: Object, // table
default () {
return {}
}
},
//
operations: {
label: '上传代码',
style: 'margin: 0 6px;',
size: 'mini',
methodName: 'commitCode'
},
//
optionData:
{
client: [
{
value: '01',
label: '市北区政府'
},
{
value: '02',
label: '市南区政府'
}
]
},
//
tableData: [
{
name: '市北区政府',
level: '市区级',
location: '青岛市市北区上清路2号',
partyNum: '2',
resi: '未授权',
work: '已授权'
},
{
name: '市南区政府',
level: '市区级',
location: '青岛市市南区上清路2号',
partyNum: '2',
resi: '已授权',
work: '已授权'
},
{
name: '李沧区政府',
level: '市区级',
location: '青岛市李沧区黑龙江中路629号',
partyNum: '2',
resi: '未授权',
work: '未授权'
},
{
name: '城阳区政府',
level: '市区级',
location: '青岛市市北区上清路2号',
partyNum: '2',
resi: '未授权',
work: '已授权'
}
]
}
},
components: {
CTable
},
activated () {
this.$nextTick(() => {
this.$refs.table.doLayout() //
})
},
mounted () {
},
computed: {
tableHeight () {
return this.clientHeight - 60 - 80 - 80 - 50
},
...mapGetters(['clientHeight'])
},
methods: {
//
init (id) {
},
//
commitCode (id) {
this.$router.push({
'name': 'code-CommitList',
'params': {
showCommit: true,
id: '1',
name: '市北区政府'
}
})
}
}
}
</script>
<style lang="css">
.aaa {
height: 100px;
}
/* .register .el-table .el-table__header-wrapper {
position: absolute;
top: 0;
left: 0;
}*/
/*
.register .el-table .el-table__fixed-body-wrapper {
height: calc(100% - 44px);
margin-top: 44px;
overflow-y: auto !important;
} */
</style>
Loading…
Cancel
Save