Browse Source

SchoolPicker.vue

Daniel 6 months ago
parent
commit
66ffb59edd

+ 4 - 2
TEAMModelBI/ClientApp/src/view/systemConfig/NewMsg/index.vue

@@ -32,11 +32,13 @@
 </template>
 </template>
 
 
 <script setup>
 <script setup>
-    import { ref } from 'vue'; // 引入 ref 函數
+    import { ref,computed } from 'vue'; // 引入 ref 函數    
     import New_Msg_Type from './new_msg_type.vue'; // 引入组件
     import New_Msg_Type from './new_msg_type.vue'; // 引入组件
     import New_Msg_BatchSelect from './new_msg_BatchSelect.vue'; // 引入组件
     import New_Msg_BatchSelect from './new_msg_BatchSelect.vue'; // 引入组件
     import New_Msg_ID_Select from './new_msg_ID_Select.vue'; // 引入组件
     import New_Msg_ID_Select from './new_msg_ID_Select.vue'; // 引入组件
-    import Active_Test from './active/SchoolPicker.vue'; // 引入组件
+
+    //import Active_Test from './active/SchoolPicker.vue'; // 引入组件
+    import Active_Test from './active/test_span.vue'; // 引入组件
     
     
     import { ChatDotSquare } from '@element-plus/icons-vue'
     import { ChatDotSquare } from '@element-plus/icons-vue'
 
 

+ 166 - 0
TEAMModelBI/ClientApp/src/view/systemConfig/NewMsg/school_district.vue

@@ -0,0 +1,166 @@
+<template>
+
+    <!--<div class="school-zones">-->
+    <div style="height:600px">
+        <el-row>
+            <!-- 左側學區列表 -->
+            <el-col :span="12" class="school-list">
+                <h2>學區列表</h2>
+                <div v-for="(zone, index) in schoolZones" :key="index" class="school-zone" @click="selectZone(zone)">
+                    <p>{{ zone.name }}</p>
+                </div>
+            </el-col>
+
+            <!-- 右側顯示選中學區的詳細內容 -->
+            <el-col :span="12">
+                <h2>學校列表</h2>
+
+                <SchoolPicker />
+
+            </el-col>
+
+
+        </el-row>
+    </div>
+
+<!--
+    <el-cascader :options="options"
+                 v-model="selectedValue"
+                 expand-trigger="hover">
+    <p>自定義插槽</p>
+
+    <template #default="{ node, data }">
+        <div class="custom-menu-item">
+            <span>{{ data.label }}</span>
+            <el-button type="text"
+                       size="mini"
+                       @click.stop="onButtonClick(data)">
+                加入
+                <el-icon size="14">
+                    <plus />
+                </el-icon>
+            </el-button>
+        </div>
+    </template>
+    </el-cascader>
+-->
+</template>
+
+<script setup>
+    import { defineComponent, ref, inject } from "vue";
+    import { ArrowRight, Search, User, Finished, Delete } from '@element-plus/icons-vue'
+    import { Plus } from "@element-plus/icons-vue";
+    import 'element-plus/dist/index.css';
+    import SchoolPicker from './SchoolPicker.vue';
+
+
+    const selectedValue = ref([]);
+
+    // 注入父组件的 AddSchool 方法
+    const addSchool = inject('AddSchool');
+
+    // 學區資料
+    const schoolZones = ref([
+        { name: '學區 A', message: '這是學區 A 的內容' },
+        { name: '學區 B', message: '這是學區 B 的內容' },
+        { name: '學區 C', message: '這是學區 C 的內容' },
+    ]);
+
+
+    const options = ref([
+        {
+            value: "option1",
+            label: "台北學區",
+            children: [
+                {
+                    value: "option1-1",
+                    label: "台灣大學",
+                },
+                {
+                    value: "option1-2",
+                    label: "交通大學",
+                },
+            ],
+        },
+        {
+            value: "option2",
+            label: "桃園學區",
+        },
+        {
+            value: "option3",
+            label: "台中學區",
+        },
+    ]);
+
+
+    
+
+    const onButtonClick = (data) => {
+        alert(`你點擊了按鈕: ${data.label}`);
+
+        addSchool('新学校'); // 调用父组件提供的方法
+
+    };
+       
+    // 用來儲存選中的學區
+    const selectedZone = ref(null);
+
+    // 點選學區時設定選中的學區
+    function selectZone(zone) {
+        selectedZone.value = zone;
+    }
+
+</script>
+
+<style scoped>
+    .custom-menu-item {
+        display: flex;
+        justify-content: space-between;
+        align-items: center;
+    }
+
+
+    .school-zones {
+        padding: 20px;
+    }
+
+    .school-zone {
+        margin-bottom: 20px;
+        padding: 10px;
+        background-color: #f9f9f9;
+    }
+
+    h2 {
+        margin-bottom: 20px;
+    }
+
+    h3 {
+        margin: 10px 0;
+    }
+
+    .school-zones {
+        padding: 20px;
+    }
+
+    .school-list {
+        padding: 10px;
+        background-color: #f9f9f9;
+        border-right: 1px solid #ddd;
+    }
+
+    .school-zone {
+        margin-bottom: 10px;
+        cursor: pointer;
+    }
+
+        .school-zone:hover {
+            background-color: #f0f0f0;
+        }
+
+    h2 {
+        margin-bottom: 20px;
+    }
+
+
+
+</style>

+ 19 - 9
TEAMModelBI/Properties/launchSettings.json

@@ -1,13 +1,4 @@
 {
 {
-  "$schema": "http://json.schemastore.org/launchsettings.json",
-  "iisSettings": {
-    "windowsAuthentication": false,
-    "anonymousAuthentication": true,
-    "iisExpress": {
-      "applicationUrl": "http://localhost:50983/",
-      "sslPort": 44362
-    }
-  },
   "profiles": {
   "profiles": {
     "IIS Express": {
     "IIS Express": {
       "commandName": "IISExpress",
       "commandName": "IISExpress",
@@ -23,6 +14,25 @@
         "ASPNETCORE_ENVIRONMENT": "Development"
         "ASPNETCORE_ENVIRONMENT": "Development"
       },
       },
       "applicationUrl": "https://localhost:5001;http://localhost:5000"
       "applicationUrl": "https://localhost:5001;http://localhost:5000"
+    },
+    "WSL": {
+      "commandName": "WSL2",
+      "launchBrowser": true,
+      "launchUrl": "https://localhost:5001",
+      "environmentVariables": {
+        "ASPNETCORE_ENVIRONMENT": "Development",
+        "ASPNETCORE_URLS": "https://localhost:5001;http://localhost:5000"
+      },
+      "distributionName": ""
+    }
+  },
+  "$schema": "http://json.schemastore.org/launchsettings.json",
+  "iisSettings": {
+    "windowsAuthentication": false,
+    "anonymousAuthentication": true,
+    "iisExpress": {
+      "applicationUrl": "http://localhost:50983/",
+      "sslPort": 44362
     }
     }
   }
   }
 }
 }

+ 27 - 48
TEAMModelBI/appsettings.Development.json

@@ -1,4 +1,4 @@
-{
+{//BI國際測試站
   "Logging": {
   "Logging": {
     "LogLevel": {
     "LogLevel": {
       "Default": "Debug",
       "Default": "Debug",
@@ -8,57 +8,38 @@
   },
   },
   "AllowedHosts": "*",
   "AllowedHosts": "*",
   "Option": {
   "Option": {
-    "Location": "China-Dep", //China-Test,China,Global-Dep,Global-Test,Global
+    "Location": "Global-Dep", //China-Test,China,Global-Dep,Global-Test,Global
     "LocationNum": "1",
     "LocationNum": "1",
     "HostName": "localhost:5001",
     "HostName": "localhost:5001",
     "AllowedHosts": [ "localhost", "*.teammodel.cn", "*.teammodel.net", "*.habookaclass.biz", "test" ],
     "AllowedHosts": [ "localhost", "*.teammodel.cn", "*.teammodel.net", "*.habookaclass.biz", "test" ],
-    "Issuer": "www.teammodel.cn",
+    "Issuer": "ies5.teammodel.net",
     "JwtSecretKey": "fXO6ko/qyXeYrkecPeKdgXnuLXf9vMEtnBC9OB3s+aA=",
     "JwtSecretKey": "fXO6ko/qyXeYrkecPeKdgXnuLXf9vMEtnBC9OB3s+aA=",
     "Exp": 86400,
     "Exp": 86400,
     "IdTokenSalt": "8263692E2213497BB55E74792B7900B4",
     "IdTokenSalt": "8263692E2213497BB55E74792B7900B4",
     "HttpTrigger": "https://teammodelosfunction-test.chinacloudsites.cn/api/",
     "HttpTrigger": "https://teammodelosfunction-test.chinacloudsites.cn/api/",
-	"Audience": "72643704-b2e7-4b26-b881-bd5865e7a7a5",
-    "Authority": "https://login.chinacloudapi.cn/4807e9cf-87b8-4174-aa5b-e76497d7392b/v2.0"
+	"Audience": "8768b06f-c5c5-4b0c-abfb-d7ded354626d",
+    "Authority": "https://login.microsoftonline.com/73a2bcc5-fe99-4566-aa8a-07e7bb287df1/v2.0"
     //"HttpTrigger": "http://localhost:7071/api/"
     //"HttpTrigger": "http://localhost:7071/api/"
   },
   },
-  //大陆站连接字符串 现在是测试站
+  //国际站连接字符串 现在是测试站
   "Azure": {
   "Azure": {
     "Storage": {
     "Storage": {
-      "ConnectionString": "DefaultEndpointsProtocol=https;AccountName=teammodeltest;AccountKey=O2W2vadCqexDxWO+px+QK7y1sHwsYj8f/WwKLdOdG5RwHgW/Dupz9dDUb4c1gi6ojzQaRpFUeAAmOu4N9E+37A==;EndpointSuffix=core.chinacloudapi.cn"
+      "ConnectionString": "DefaultEndpointsProtocol=https;AccountName=teammodeltest;AccountKey=t6XZuachzUBJDSN8RLtoeVqSE6HcXrFZFBmlF1n3G5jA2/Ltvx8jAL4z7C9MdfzLFRHI88/hTBbrK68K0lQeDw==;EndpointSuffix=core.windows.net"
     },
     },
     "LogStorage": {
     "LogStorage": {
       "ConnectionString": "DefaultEndpointsProtocol=https;AccountName=teammodellog;AccountKey=lxVDrgs+6rKtmASL3k1WrarrEd5Rk42wS1Mu5+sqQlPya1JLSlFDtnZUvMPeHHe7zlESfn/1NY7CZdGviy2UCw==;EndpointSuffix=core.chinacloudapi.cn"
       "ConnectionString": "DefaultEndpointsProtocol=https;AccountName=teammodellog;AccountKey=lxVDrgs+6rKtmASL3k1WrarrEd5Rk42wS1Mu5+sqQlPya1JLSlFDtnZUvMPeHHe7zlESfn/1NY7CZdGviy2UCw==;EndpointSuffix=core.chinacloudapi.cn"
     },
     },
     "Cosmos": {
     "Cosmos": {
-      "ConnectionString": "AccountEndpoint=https://cdhabookdep-free.documents.azure.cn:443/;AccountKey=JTUVk92Gjsx17L0xqxn0X4wX2thDPMKiw4daeTyV1HzPb6JmBeHdtFY1MF1jdctW1ofgzqkDMFOtcqS46by31A==;"
+      "ConnectionString": "AccountEndpoint=https://teammodel-test.documents.azure.com:443/;AccountKey=W38PnllgIJ3I879l8l4mGgFD1YZpPpYrbTtbBfgZvBavdNzveixvjjXXxFzx4RRDfpTmJuCtst5dXh7cETiSRQ==;"
     },
     },
     "Redis": {
     "Redis": {
-      "ConnectionString": "52.130.252.100:6379,password=habook,ssl=false,abortConnect=False,writeBuffer=10240"
+      "ConnectionString": "teammodel-test.redis.cache.windows.net:6380,password=qRDLVsl6NRkv3tbtlNpXr0568fAMXJH2GAzCaAYYExE=,ssl=True,abortConnect=False"
     },
     },
     "ServiceBus": {
     "ServiceBus": {
-      "ConnectionString": "Endpoint=sb://teammodelos.servicebus.chinacloudapi.cn/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=Sy4h4EQ8zP+7w/lOLi1X3tGord/7ShFHimHs1vC50Dc=",
+      "ConnectionString": "Endpoint=sb://teammodel-test.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=iEA1MP9rYUfhYgMOp40g3SRHVyLrSoQTO7fa7aMWBEg=",
       "ActiveTask": "dep-active-task",
       "ActiveTask": "dep-active-task",
       "ItemCondQueue": "dep-itemcond"
       "ItemCondQueue": "dep-itemcond"
     }
     }
-
-    ////正式站
-    //"Storage": {
-    //  "ConnectionString": "DefaultEndpointsProtocol=https;AccountName=teammodeltest;AccountKey=O2W2vadCqexDxWO+px+QK7y1sHwsYj8f/WwKLdOdG5RwHgW/Dupz9dDUb4c1gi6ojzQaRpFUeAAmOu4N9E+37A==;EndpointSuffix=core.chinacloudapi.cn"
-    //},
-    //"LogStorage": {
-    //  "ConnectionString": "DefaultEndpointsProtocol=https;AccountName=teammodellog;AccountKey=lxVDrgs+6rKtmASL3k1WrarrEd5Rk42wS1Mu5+sqQlPya1JLSlFDtnZUvMPeHHe7zlESfn/1NY7CZdGviy2UCw==;EndpointSuffix=core.chinacloudapi.cn"
-    //},
-    //"Cosmos": {
-    //  "ConnectionString": "AccountEndpoint=https://teammodelos.documents.azure.cn:443/;AccountKey=clF73GwPECfP1lKZTCvs8gLMMyCZig1HODFbhDUsarsAURO7TcOjVz6ZFfPqr1HzYrfjCXpMuVD5TlEG5bFGGg==;"
-    //},
-    //"Redis": {
-    //  "ConnectionString": "52.130.252.100:6379,password=habook,ssl=false,abortConnect=False,writeBuffer=10240"
-    //},
-    //"ServiceBus": {
-    //  "ConnectionString": "Endpoint=sb://teammodelos.servicebus.chinacloudapi.cn/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=Sy4h4EQ8zP+7w/lOLi1X3tGord/7ShFHimHs1vC50Dc=",
-    //  "ActiveTask": "dep-active-task",
-    //  "ItemCondQueue": "dep-itemcond"
-    //}
   },
   },
   //国际站连接字符串  暂时是本地
   //国际站连接字符串  暂时是本地
   "GlobalAzure": {
   "GlobalAzure": {
@@ -66,7 +47,7 @@
       "ConnectionString": "DefaultEndpointsProtocol=https;AccountName=teammodelstorage;AccountKey=Yq7D4dE6cFuer2d2UZIccTA/i0c3sJ/6ITc8tNOyW+K5f+/lWw9GCos3Mxhj47PyWQgDL8YbVD63B9XcGtrMxQ==;EndpointSuffix=core.chinacloudapi.cn" // 之前未删除连接字符
       "ConnectionString": "DefaultEndpointsProtocol=https;AccountName=teammodelstorage;AccountKey=Yq7D4dE6cFuer2d2UZIccTA/i0c3sJ/6ITc8tNOyW+K5f+/lWw9GCos3Mxhj47PyWQgDL8YbVD63B9XcGtrMxQ==;EndpointSuffix=core.chinacloudapi.cn" // 之前未删除连接字符
     },
     },
     "LogStorage": {
     "LogStorage": {
-      "ConnectionString": "DefaultEndpointsProtocol=https;AccountName=teammodellog;AccountKey=lxVDrgs+6rKtmASL3k1WrarrEd5Rk42wS1Mu5+sqQlPya1JLSlFDtnZUvMPeHHe7zlESfn/1NY7CZdGviy2UCw==;EndpointSuffix=core.chinacloudapi.cn"
+      "ConnectionString": "DefaultEndpointsProtocol=https;AccountName=teammodellog;AccountKey=u4g43MqRq/vzd6x5949wlgg35jk1YbmIbIA5tKjgtIADZnhlMGD8+E+hSCP56HEaUN7F2npslI6l+ASt7iYxyA==;EndpointSuffix=core.windows.net"
     },
     },
     "Cosmos": {
     "Cosmos": {
       "ConnectionString": "AccountEndpoint=https://cdhabookdep-free.documents.azure.cn:443/;AccountKey=JTUVk92Gjsx17L0xqxn0X4wX2thDPMKiw4daeTyV1HzPb6JmBeHdtFY1MF1jdctW1ofgzqkDMFOtcqS46by31A==;" //测试站
       "ConnectionString": "AccountEndpoint=https://cdhabookdep-free.documents.azure.cn:443/;AccountKey=JTUVk92Gjsx17L0xqxn0X4wX2thDPMKiw4daeTyV1HzPb6JmBeHdtFY1MF1jdctW1ofgzqkDMFOtcqS46by31A==;" //测试站
@@ -82,45 +63,43 @@
   },
   },
   "HaBookAuth": {
   "HaBookAuth": {
     "CoreId": {
     "CoreId": {
-      "userinfo": "https://api2.teammodel.cn/Oauth2/GetUserInfos"
+      "userinfo": "https://api2.teammodel.net/Oauth2/GetUserInfos"
     },
     },
     "Account": "https://account.teammodel.cn",
     "Account": "https://account.teammodel.cn",
-    "CoreAPI": "https://api2.teammodel.cn",
-    "CoreBBAPI": "https://bb.teammodel.cn",
+    "CoreAPI": "https://api2.teammodel.net",
+    "CoreBBAPI": "https://bb-rc.teammodel.net",
     "CoreService": {
     "CoreService": {
-      "clientID": "c7317f88-7cea-4e48-ac57-a16071f7b884", //大陆站IES5 ClientId
-      "clientSecret": "kguxh:V.PLmxBdaI@jnrTrDSth]A3346", //大陆站IES5 秘钥
-      //"clientID": "73266ca3-62b1-4304-b837-c672a8c88001",      //大陆站的ClientId
-      //"clientSecret": "E4Sr6[ezaT.b=3DYWoIATmqRDn4HlJb?",     //大陆站的密钥
-      //"clientID": "c01d78c2-a72e-416e-94d9-c8d3e4b8eb11",   //国际站的ClientId
-      //"clientSecret": "68-Bz:/5Xv:u6PVAFE@s3.=P2PCq5@ux",   //国际站的密钥
-      "deviceinfo": "https://api2.teammodel.cn/oauth2/getdeviceinfos",
+	  "clientID": "531fecd1-b1a5-469a-93ca-7984e1d392f2", //国际站IES5 ClientId
+      "clientSecret": "iI2cmTIX?fnXrwnffo84/:_X954=sw:.", //国际站IES5 秘钥
+      //"clientID": "1c52faba-cbf7-44a0-b8e0-9b8d9526e920", //国际測試站BB ClientId
+      //"clientSecret": "soc9g?f-_I7[f4Y0m@@FIBNX5?qu4wEt", //国际測試站BB 秘钥
+      "deviceinfo": "https://api2.teammodel.net/oauth2/getdeviceinfos",
       "sendnotification": "https://api2.teammodel.net/service/sendnotification",
       "sendnotification": "https://api2.teammodel.net/service/sendnotification",
       "getnotification": "https://api2.teammodel.net/service/getnotification",
       "getnotification": "https://api2.teammodel.net/service/getnotification",
       "delnotification": "https://api2.teammodel.net/service/delnotification"
       "delnotification": "https://api2.teammodel.net/service/delnotification"
     }
     }
   },
   },
   "DingDingAuth": {
   "DingDingAuth": {
-    "Agentld": "1290158212",
-    "appKey": "dingrucgsnt8p13rfbgd",
-    "appSecret": "Gyx_N57yZslhQOAhAPlvmCwOp_qTm1DScKbd5OoOE0URAW4eViYA2Sk_ZxKb-8WG",
+    "Agentld": "1800083745",
+    "appKey": "dingupjxyj1guhh5p8dt",
+    "appSecret": "ZL-RbizlPEv-Wa1F814vTpVK1SiRJfr9cQpDDNpGv9GW7sUupPZvQqOoX7uw8C9E",
     "getuserinfo_bycode": "https://oapi.dingtalk.com/sns/getuserinfo_bycode?accessKey=xxx&timestamp=xxx&signature=xxx"
     "getuserinfo_bycode": "https://oapi.dingtalk.com/sns/getuserinfo_bycode?accessKey=xxx&timestamp=xxx&signature=xxx"
   },
   },
   "CustomParam": {
   "CustomParam": {
-    "SiteScope": "continent", // 站点范围  continent 大路站  international 国际站
+    "SiteScope": "international", // 站点范围  continent 大路站  international 国际站
     "proDeptId": 67690917
     "proDeptId": 67690917
   },
   },
   "CoreServiceV1": {
   "CoreServiceV1": {
-    "Cosmos": {
-      "ConnectionString": "AccountEndpoint=https://corecosmosdbcn.documents.azure.cn:443/;AccountKey=WIFUWgnC6HiPb4yYba5iLR4ZghcA2fqrEvnX00YTA5B4sd7o89sxtbvgFDDUqT2VRkeWrWVTWZ8VbApQtwkJKQ==;" //CSV1大陸正式站(唯讀)
+	"Cosmos": {
+      "ConnectionString": "AccountEndpoint=https://coredocumentdbjp.documents.azure.com:443/;AccountKey=aY6AjEYuPwRJEQRDX6bFN3Z87I7LwZ72dN1qON7j5E3VPpUEc2z0YDVzdCTUDvHzIEuoQosGu8e0AYCHUfcSnw==;" //CSV1國際正式站(唯讀)
     }
     }
   },
   },
   "CoreServiceV2": {
   "CoreServiceV2": {
     "Cosmos": {
     "Cosmos": {
-      "ConnectionString": "AccountEndpoint=https://teammodelostest.documents.azure.cn:443/;AccountKey=ReGoiHuTbU4Q31YYq4NaiormE6Ci71piT7OrvTzAuhrlgt63ajdtDZmwOZKzcz6gnwR326mJp53InY7rohepQQ==;" //CSV2大陸測試站(讀寫)
+      "ConnectionString": "AccountEndpoint=https://teammodel-test.documents.azure.com:443/;AccountKey=W38PnllgIJ3I879l8l4mGgFD1YZpPpYrbTtbBfgZvBavdNzveixvjjXXxFzx4RRDfpTmJuCtst5dXh7cETiSRQ==;" //CSV2國際測試站(讀寫)
     },
     },
     "Storage": {
     "Storage": {
-      "ConnectionString": "DefaultEndpointsProtocol=https;AccountName=teammodeltest;AccountKey=O2W2vadCqexDxWO+px+QK7y1sHwsYj8f/WwKLdOdG5RwHgW/Dupz9dDUb4c1gi6ojzQaRpFUeAAmOu4N9E+37A==;EndpointSuffix=core.chinacloudapi.cn" //CSV2大陸測試站
+      "ConnectionString": "DefaultEndpointsProtocol=https;AccountName=teammodeltest;AccountKey=t6XZuachzUBJDSN8RLtoeVqSE6HcXrFZFBmlF1n3G5jA2/Ltvx8jAL4z7C9MdfzLFRHI88/hTBbrK68K0lQeDw==;EndpointSuffix=core.windows.net" //CSV2國際測試站
     },
     },
     "CosmosCnRead": {
     "CosmosCnRead": {
       "ConnectionString": "AccountEndpoint=https://corecosmosdb.documents.azure.cn:443/;AccountKey=12C5n8IvXFqsPARUb2YBOUWiU9PksohESlLHgH6cAVajxWBBJIJ6chJusgfrYhxCKgQgSHHxVgHsFPRakhvlPw==;" //CSV2大陸正式站(唯讀)
       "ConnectionString": "AccountEndpoint=https://corecosmosdb.documents.azure.cn:443/;AccountKey=12C5n8IvXFqsPARUb2YBOUWiU9PksohESlLHgH6cAVajxWBBJIJ6chJusgfrYhxCKgQgSHHxVgHsFPRakhvlPw==;" //CSV2大陸正式站(唯讀)