高章伟
2022-03-18 4bfe21c4b5ddc089ae5a95f4b10f6cff148b690d
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
53
54
55
56
57
58
59
60
61
62
<apex:page standardController="Account" extensions="AccountTargetHospitalController" showChat="false" showHeader="false" sidebar="false" action="{!init}" id="Page">
<title>{!account.Name}-目标客户</title>
<style type="text/css">
    .activeTab {background-color: #236FBD; color:white; background-image:none}
    .inactiveTab { background-color: lightgrey; color:black; background-image:none}
</style>
<apex:form id="Form">
    <apex:pageMessages />
    <!-- 戦略科室ごとを表示 -->
    <apex:tabPanel value="{!selectedTab}" tabClass="activeTab" inactiveTabClass="inactiveTab" rendered="{!IF(recordDeveloperName == 'HP', true, false)}">
        <apex:tab label="{!dcList[0].Department_Class_Label__c}" name="{!dcList[0].Department_Class_Label__c}" rendered="{!IF(dcCount > 0, true, false)}" >
            <iframe src="/apex/AccountTargetHospital?id={!dcList[0].Id}" scrolling="true" width="100%;" height="500px;"></iframe>
        </apex:tab>
        <apex:tab label="{!dcList[1].Department_Class_Label__c}" name="{!dcList[1].Department_Class_Label__c}" rendered="{!IF(dcCount > 1, true, false)}">
            <iframe src="/apex/AccountTargetHospital?id={!dcList[1].Id}" scrolling="true" width="100%;" height="500px;"></iframe>
        </apex:tab>
        <apex:tab label="{!dcList[2].Department_Class_Label__c}" name="{!dcList[2].Department_Class_Label__c}" rendered="{!IF(dcCount > 2, true, false)}">
            <iframe src="/apex/AccountTargetHospital?id={!dcList[2].Id}" scrolling="true" width="100%;" height="500px;"></iframe>
        </apex:tab>
        <apex:tab label="{!dcList[3].Department_Class_Label__c}" name="{!dcList[3].Department_Class_Label__c}" rendered="{!IF(dcCount > 3, true, false)}">
            <iframe src="/apex/AccountTargetHospital?id={!dcList[3].Id}" scrolling="true" width="100%;" height="500px;"></iframe>
        </apex:tab>
        <apex:tab label="{!dcList[4].Department_Class_Label__c}" name="{!dcList[4].Department_Class_Label__c}" rendered="{!IF(dcCount > 4, true, false)}">
            <iframe src="/apex/AccountTargetHospital?id={!dcList[4].Id}" scrolling="true" width="100%;" height="500px;"></iframe>
        </apex:tab>
        <apex:tab label="{!dcList[5].Department_Class_Label__c}" name="{!dcList[5].Department_Class_Label__c}" rendered="{!IF(dcCount > 5, true, false)}">
            <iframe src="/apex/AccountTargetHospital?id={!dcList[5].Id}" scrolling="true" width="100%;" height="500px;"></iframe>
        </apex:tab>
        <apex:tab label="{!dcList[6].Department_Class_Label__c}" name="{!dcList[6].Department_Class_Label__c}" rendered="{!IF(dcCount > 6, true, false)}">
            <iframe src="/apex/AccountTargetHospital?id={!dcList[6].Id}" scrolling="true" width="100%;" height="500px;"></iframe>
        </apex:tab>
        <apex:tab label="{!dcList[7].Department_Class_Label__c}" name="{!dcList[7].Department_Class_Label__c}" rendered="{!IF(dcCount > 7, true, false)}">
            <iframe src="/apex/AccountTargetHospital?id={!dcList[7].Id}" scrolling="true" width="100%;" height="500px;"></iframe>
        </apex:tab>
    </apex:tabPanel>
 
    <!-- 年度毎のデータを表示 -->
    <apex:tabPanel value="{!selectedTab}" tabClass="activeTab" inactiveTabClass="inactiveTab" rendered="{!IF(recordDeveloperName <> 'HP', true, false)}">
        <apex:tab label="{!historyList[0].year_c}" name="{!historyList[0].rec.Id}" rendered="{!IF(historyCount > 0, true, false)}" >
            <iframe src="/apex/AccountTargetTab?id={!historyList[0].rec.Id}&accid={!recordId}" width="100%" height="450px;"></iframe>
        </apex:tab>
        <apex:tab label="{!historyList[1].year_c}" name="{!historyList[1].rec.Id}" rendered="{!IF(historyCount > 1, true, false)}">
            <iframe src="/apex/AccountTargetTab?id={!historyList[1].rec.Id}&accid={!recordId}" width="100%" height="450px;"></iframe>
        </apex:tab>
        <apex:tab label="{!historyList[2].year_c}" name="{!historyList[2].rec.Id}" rendered="{!IF(historyCount > 2, true, false)}">
            <iframe src="/apex/AccountTargetTab?id={!historyList[2].rec.Id}&accid={!recordId}" width="100%" height="450px;"></iframe>
        </apex:tab>
        <apex:tab label="{!historyList[3].year_c}" name="{!historyList[3].rec.Id}" rendered="{!IF(historyCount > 3, true, false)}">
            <iframe src="/apex/AccountTargetTab?id={!historyList[3].rec.Id}&accid={!recordId}" width="100%" height="450px;"></iframe>
        </apex:tab>
        <apex:tab label="{!historyList[4].year_c}" name="{!historyList[4].rec.Id}" rendered="{!IF(historyCount > 4, true, false)}">
            <iframe src="/apex/AccountTargetTab?id={!historyList[4].rec.Id}&accid={!recordId}" width="100%" height="450px;"></iframe>
        </apex:tab>
        <apex:tab label="{!historyList[5].year_c}" name="{!historyList[5].rec.Id}" rendered="{!IF(historyCount > 5, true, false)}">
            <iframe src="/apex/AccountTargetTab?id={!historyList[5].rec.Id}&accid={!recordId}" width="100%" height="450px;"></iframe>
        </apex:tab>
        <apex:tab label=" + " name="new">
            <iframe src="/apex/AccountTargetTab?id=&accid={!recordId}" width="100%" height="450px;"></iframe>
        </apex:tab>
    </apex:tabPanel>
</apex:form>
</apex:page>