wuxw
2020-01-14 69e2baf5518079bfc16cfadc2fb29842fb3de85d
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
(function (vc, vm) {
    var _fileUrl = '/callComponent/download/getFile/fileByObjId';
    vc.extends({
        data: {
            machineRecordDetailInfo: {
                machineRecordId: '',
                machineCode: '',
                machineId: '',
                name: '',
                openTypeCd: '',
                tel: '',
                idCard: '',
                photo:''
            }
        },
        _initMethod: function () {
 
        },
        _initEvent: function () {
            vc.on('machineRecordDetail', 'openMachineRecordDetailModal', function (_params) {
                vc.component.refreshEditMachineRecordInfo();
                $('#editMachineRecordModel').modal('show');
                vc.copyObject(_params, vc.component.machineRecordDetailInfo);
                vc.component._loadMachineRecordImage();
                vc.component.machineRecordDetailInfo.communityId = vc.getCurrentCommunity().communityId;
            });
        },
        methods: {
            refreshEditMachineRecordInfo: function () {
                vc.component.machineRecordDetailInfo = {
                    machineRecordId: '',
                    machineCode: '',
                    machineId: '',
                    name: '',
                    openTypeCd: '',
                    tel: '',
                    idCard: '',
                    photo:'',
 
                }
            },
            errorLoadImg:function(){
                vc.component.machineRecordDetailInfo.photo="/img/noPhoto.gif";
            },
            _loadMachineRecordImage:function () {
                vc.component.machineRecordDetailInfo.photo = _fileUrl+"?objId="+
                    vc.component.machineRecordDetailInfo.machineRecordId +"&communityId="+vc.getCurrentCommunity().communityId+"&fileTypeCd=60000&time="+new Date();
            }
        }
    });
 
})(window.vc, window.vc.component);