|
@@ -762,8 +762,9 @@
|
|
valueGetter: this.hashValueGetter
|
|
valueGetter: this.hashValueGetter
|
|
},
|
|
},
|
|
{ headerName: 'ID', field: 'id', sortable: true, filter: 'agNumberColumnFilter', width: 100},
|
|
{ headerName: 'ID', field: 'id', sortable: true, filter: 'agNumberColumnFilter', width: 100},
|
|
- { headerName: this.$t('customerManage.named'), field: 'named', sortable: true, filter: 'agTextColumnFilter', width: 160},
|
|
|
|
- { headerName: this.$t('customerManage.nickname'), field: 'nickname', sortable: true, filter: 'agTextColumnFilter', width: 130},
|
|
|
|
|
|
+ { headerName: this.$t('customerManage.named'), field: 'named', sortable: true, filter: 'agTextColumnFilter', width: 160 },
|
|
|
|
+ // { headerName: this.$t('customerManage.nickname'), field: 'nickname', sortable: true, filter: 'agTextColumnFilter', width: 130 },
|
|
|
|
+ { headerName: this.$t('customerManage.frame'), field: 'full_name', sortable: true, filter: 'agTextColumnFilter', width: 130 },
|
|
{
|
|
{
|
|
headerName: this.$t('customerManage.customerStatus'), field: 'status', sortable: true, filterFramework: 'RadioFilter', width: 130,
|
|
headerName: this.$t('customerManage.customerStatus'), field: 'status', sortable: true, filterFramework: 'RadioFilter', width: 130,
|
|
filterParams: {
|
|
filterParams: {
|
|
@@ -775,44 +776,33 @@
|
|
// lockPinned = true 不能拖动然后固定
|
|
// lockPinned = true 不能拖动然后固定
|
|
// resizeable 单元个大小是否可以调整
|
|
// resizeable 单元个大小是否可以调整
|
|
{
|
|
{
|
|
- headerName: this.$t('member.sex'), field: 'sex', sortable: true, filterFramework: 'RadioFilter', width: 130,
|
|
|
|
|
|
+ headerName: this.$t('member.sex'), field: 'sex', sortable: true, filterFramework: 'RadioFilter', width: 80,
|
|
filterParams: {
|
|
filterParams: {
|
|
listData: this.sexTransfer
|
|
listData: this.sexTransfer
|
|
},
|
|
},
|
|
cellRenderer: this.sexRenderer
|
|
cellRenderer: this.sexRenderer
|
|
},
|
|
},
|
|
|
|
|
|
|
|
+ // {
|
|
|
|
+ // headerName: this.$t('member.birthday'),
|
|
|
|
+ // field: 'birthday',
|
|
|
|
+ // sortable: true,
|
|
|
|
+ // filter: 'agDateColumnFilter',
|
|
|
|
+ // valueFormatter: this.unixDateFormatter,
|
|
|
|
+ // filterParams: {
|
|
|
|
+ // comparator: (filterLocalDateAtMidnight, cellValue) => { // 所有数据都由服务器端过滤,此处只需返回0 即可
|
|
|
|
+ // const celldate = unixToDate(cellValue, 'yyyy-MM-dd 00:00:00')
|
|
|
|
+ // return (new Date(celldate).getTime() / 1000) - (filterLocalDateAtMidnight.getTime() / 1000)
|
|
|
|
+ // }
|
|
|
|
+ // }
|
|
|
|
+ // },
|
|
{
|
|
{
|
|
- headerName: this.$t('member.birthday'),
|
|
|
|
- field: 'birthday',
|
|
|
|
- sortable: true,
|
|
|
|
- filter: 'agDateColumnFilter',
|
|
|
|
- valueFormatter: this.unixDateFormatter,
|
|
|
|
- filterParams: {
|
|
|
|
- comparator: (filterLocalDateAtMidnight, cellValue) => { // 所有数据都由服务器端过滤,此处只需返回0 即可
|
|
|
|
- const celldate = unixToDate(cellValue, 'yyyy-MM-dd 00:00:00')
|
|
|
|
- return (new Date(celldate).getTime() / 1000) - (filterLocalDateAtMidnight.getTime() / 1000)
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- headerName: this.$t('customerManage.age'), field: 'age', sortable: true, filter: 'agNumberColumnFilter', width: 130
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- headerName: this.$t('customerManage.ageUnit'), field: 'age_unit', sortable: true, filter: 'agTextColumnFilter', width: 130
|
|
|
|
|
|
+ headerName: this.$t('customerManage.age'), field: 'age', sortable: true, filter: 'agNumberColumnFilter', valueFormatter: this.ageFormatter, width: 110
|
|
},
|
|
},
|
|
- {headerName: this.$t('customerManage.cardNo'), field: 'card_no', sortable: true, filter: 'agTextColumnFilter'},
|
|
|
|
- {headerName: this.$t('customerManage.idType'),
|
|
|
|
- field: 'id_type',
|
|
|
|
- sortable: true,
|
|
|
|
- filter: 'agTextColumnFilter',
|
|
|
|
- valueFormatter: this.idCardFormatter
|
|
|
|
- },
|
|
|
|
- {headerName: this.$t('customerManage.idNo'), field: 'id_no', sortable: true, filter: 'agNumberColumnFilter', width: 160},
|
|
|
|
- {headerName: this.$t('customerManage.frame'), field: 'full_name', sortable: true, filter: 'agTextColumnFilter'},
|
|
|
|
|
|
+ {headerName: this.$t('customerManage.cardNo'), field: 'card_no', sortable: true, filter: 'agTextColumnFilter', width: 130},
|
|
{headerName: this.$t('member.mobile'), field: 'mobile', sortable: true, filter: 'agTextColumnFilter'},
|
|
{headerName: this.$t('member.mobile'), field: 'mobile', sortable: true, filter: 'agTextColumnFilter'},
|
|
|
|
+ {headerName: this.$t('customerManage.idNo'), field: 'id_no', sortable: true, filter: 'agNumberColumnFilter', valueFormatter: this.idCardFormatter, width: 160},
|
|
{headerName: this.$t('member.homeAddress'), field: 'address', sortable: true, filter: 'agTextColumnFilter', width: 260},
|
|
{headerName: this.$t('member.homeAddress'), field: 'address', sortable: true, filter: 'agTextColumnFilter', width: 260},
|
|
-
|
|
|
|
{
|
|
{
|
|
headerName: this.$t('customerManage.inDate'),
|
|
headerName: this.$t('customerManage.inDate'),
|
|
field: 'in_date',
|
|
field: 'in_date',
|
|
@@ -839,79 +829,6 @@
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- // {
|
|
|
|
- // headerName: this.$t('action.edit'), field: 'id',
|
|
|
|
- // cellRendererFramework: 'ButtonCellRender',
|
|
|
|
- // cellRendererParams: {
|
|
|
|
- // onClick: this.handleEdit,
|
|
|
|
- // label: this.$t('action.edit'),
|
|
|
|
- // buttonType: 'primary',
|
|
|
|
- // buttonSize: 'mini'
|
|
|
|
- // },
|
|
|
|
- // filter: false,
|
|
|
|
- // pinned: 'right',
|
|
|
|
- // lockPinned: true,
|
|
|
|
- // width: 80,
|
|
|
|
- // resizable: false,
|
|
|
|
- // sortable: false
|
|
|
|
- // },
|
|
|
|
- // {
|
|
|
|
- // headerName: this.$t('customerManage.outBed'), field: 'id',
|
|
|
|
- // cellRendererFramework: 'ButtonCellRender',
|
|
|
|
- // cellRendererParams: param => {
|
|
|
|
- // return {
|
|
|
|
- // onClick: this.handleOut,
|
|
|
|
- // label: this.$t('customerManage.outBed'),
|
|
|
|
- // buttonType: 'warning',
|
|
|
|
- // buttonSize: 'mini',
|
|
|
|
- // disabled: param.data['status'] !== 0
|
|
|
|
- // }
|
|
|
|
- // },
|
|
|
|
- // filter: false,
|
|
|
|
- // pinned: 'right',
|
|
|
|
- // lockPinned: true,
|
|
|
|
- // width: 80,
|
|
|
|
- // resizable: false,
|
|
|
|
- // sortable: false
|
|
|
|
- // },
|
|
|
|
- // {
|
|
|
|
- // headerName: this.$t('customerManage.changeBed'), field: 'id',
|
|
|
|
- // cellRendererFramework: 'ButtonCellRender',
|
|
|
|
- // cellRendererParams: param => {
|
|
|
|
- // return {
|
|
|
|
- // onClick: this.handleChangeBed,
|
|
|
|
- // label: this.$t('customerManage.changeBed'),
|
|
|
|
- // buttonType: 'success',
|
|
|
|
- // buttonSize: 'mini',
|
|
|
|
- // disabled: param.data['status'] !== 0
|
|
|
|
- // }
|
|
|
|
- // },
|
|
|
|
- // filter: false,
|
|
|
|
- // pinned: 'right',
|
|
|
|
- // lockPinned: true,
|
|
|
|
- // width: 80,
|
|
|
|
- // resizable: false,
|
|
|
|
- // sortable: false
|
|
|
|
- // },
|
|
|
|
- // {
|
|
|
|
- // headerName: this.$t('action.delete'), field: 'shop_id',
|
|
|
|
- // cellRendererFramework: 'ButtonCellRender',
|
|
|
|
- // cellRendererParams: param => {
|
|
|
|
- // return {
|
|
|
|
- // onClick: this.deleteSingle,
|
|
|
|
- // label: this.$t('action.delete'),
|
|
|
|
- // buttonType: 'danger',
|
|
|
|
- // buttonSize: 'mini',
|
|
|
|
- // disabled: param.data['member_name'] === 'superadmin'
|
|
|
|
- // }
|
|
|
|
- // },
|
|
|
|
- // pinned: 'right',
|
|
|
|
- // lockPinned: true,
|
|
|
|
- // width: 80,
|
|
|
|
- // resizable: false,
|
|
|
|
- // filter: false,
|
|
|
|
- // sortable: false
|
|
|
|
- // }
|
|
|
|
{ headerName: this.$t('action.handle'), field: 'id',
|
|
{ headerName: this.$t('action.handle'), field: 'id',
|
|
cellRendererFramework: 'ButtonCellRenderList',
|
|
cellRendererFramework: 'ButtonCellRenderList',
|
|
cellRendererParams: param => {
|
|
cellRendererParams: param => {
|
|
@@ -973,9 +890,11 @@
|
|
this.rowSelection = 'multiple'
|
|
this.rowSelection = 'multiple'
|
|
},
|
|
},
|
|
mounted() {
|
|
mounted() {
|
|
|
|
+
|
|
window.onresize = this.windowResize()
|
|
window.onresize = this.windowResize()
|
|
this.gridApi = this.gridOptions.api
|
|
this.gridApi = this.gridOptions.api
|
|
this.gridColumnApi = this.gridOptions.columnApi
|
|
this.gridColumnApi = this.gridOptions.columnApi
|
|
|
|
+
|
|
this.gridColumnApi.applyColumnState({
|
|
this.gridColumnApi.applyColumnState({
|
|
state: [
|
|
state: [
|
|
{
|
|
{
|
|
@@ -984,6 +903,7 @@
|
|
}
|
|
}
|
|
]
|
|
]
|
|
})
|
|
})
|
|
|
|
+
|
|
this.getShop(this.$store.getters.partId)
|
|
this.getShop(this.$store.getters.partId)
|
|
|
|
|
|
this.getCloud()
|
|
this.getCloud()
|
|
@@ -1149,16 +1069,22 @@
|
|
* 身份证转换
|
|
* 身份证转换
|
|
*/
|
|
*/
|
|
idCardFormatter(param) {
|
|
idCardFormatter(param) {
|
|
- if (param.value === '身份证') {
|
|
|
|
- return this.$t('customerManage.idCard');
|
|
|
|
- } else if (param.value === '护照') {
|
|
|
|
- return this.$t('customerManage.passport');
|
|
|
|
- } else if (param.value === '军人证') {
|
|
|
|
- return this.$t('customerManage.servicemanCard');
|
|
|
|
|
|
+ if (param.value === null || param.value === undefined) {
|
|
|
|
+ return this.$t('customerManage.null');
|
|
|
|
+ }
|
|
|
|
+ if (param.data.id_type === '身份证') {
|
|
|
|
+ return this.$t('customerManage.idCard') + '-' + param.value;
|
|
|
|
+ } else if (param.data.id_type === '护照') {
|
|
|
|
+ return this.$t('customerManage.passport') + '-' + param.value;
|
|
|
|
+ } else if (param.data.id_type === '军人证') {
|
|
|
|
+ return this.$t('customerManage.servicemanCard') + '-' + param.value;
|
|
} else {
|
|
} else {
|
|
return this.$t('customerManage.null');
|
|
return this.$t('customerManage.null');
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
+ ageFormatter(param) {
|
|
|
|
+ return param.value + param.data.age_unit
|
|
|
|
+ },
|
|
handleClick() {
|
|
handleClick() {
|
|
if (this.activeName === 'footprint') {
|
|
if (this.activeName === 'footprint') {
|
|
this.$router.push({path:'/device/map', query: {mapUrl: this.mapUrl, uuid: this.formmodel.uuid, frameId: this.formmodel.frame_id}})
|
|
this.$router.push({path:'/device/map', query: {mapUrl: this.mapUrl, uuid: this.formmodel.uuid, frameId: this.formmodel.frame_id}})
|