123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167 |
- $(document).ready(function() {
-
- var id="BB8EE2EC6881419DACC5AF4FE650055A";
-
- function companyInformation() {
- $.ajax({
- url: "/ajax/org/" + id,
- type: "GET",
- timeout: 10000,
- dataType: "json",
- beforeSend: function() {},
- success: function(data, textState) {
- if(data.success) {
- var $data = data.data;
- $(".h1Font").text($data.name);
- if($data.hasOrgLogo) {
- $("#oimg").attr("src", "/images/org/" + $data.id + ".jpg");
- }
- if($data.orgUrl) {
- $("#inteAddress").text($data.orgUrl);
- } else {
- $("#inteAddress").text("");
- }
- if($data.foundTime) {
- var oTime = timeGeshi($data.foundTime);
- $("#createTime").text(oTime);
- } else {
- $("#createTime").val("");
- }
- if($data.city) {
- $("#ocity").text($data.city);
- }
- if($data.descp) {
- $(".editbox").text($data.descp);
- }
- if($data.orgSize) {
- switch($data.orgSize) {
- case '1':
- $("#qualificationList").text("50人以内")
- break;
- case '2':
- $("#qualificationList").text("50-100人")
- break;
- case '3':
- $("#qualificationList").text("100-200人")
- break;
- case '4':
- $("#qualificationList").text("200-500人")
- break;
- case '5':
- $("#qualificationList").text("500-1000人")
- break;
- default:
- $("#qualificationList").text("1000人以上")
- break;
- }
- }
- if($data.orgType) {
- switch($data.orgType) {
- case '2':
- $("#orgType").text("国有企业");
- break;
- case '3':
- $("#orgType").text("上市企业");
- break;
- case '4':
- $("#orgType").text("合资企业");
- break;
- case '5':
- $("#orgType").text("私人企业");
- break;
- case '6':
- $("#orgType").text("外资企业");
- break;
- default:
- $("#orgType").text("初创企业");
- break;
- }
- }
- if($data.industry) {
- indu($data.industry, '#industryShow')
- }
- if($data.subject) {
- indu($data.subject, '#subjectShow')
- }
- if($data.qualification) {
- indu($data.qualification, '#qiye ')
- }
- }
- },
- error: function(XMLHttpRequest, textStats, errorThrown) {
- $.MsgBox.Alert('提示', '服务器请求失败')
- }
- })
- }
-
- function timeGeshi(otm) {
- var otme = otm.substring(0, 4) + "-" + otm.substring(4, 6) + "-" + otm.substring(6, 8);
- return otme;
- }
-
- function indu(oString, oSelector) {
- var arr = oString.split(",");
- var oArr = new Array();
- var i;
- for(i in arr) {
- if(oSelector == "#subjectShow") {
- oArr.push('<div class="acad">' + arr[i] + '</div>');
- } else {
- oArr.push('<li>' + arr[i] + '</li>');
- }
- }
- $(oSelector).html(oArr.join(""));
- }
-
- function companyUser() {
- $.ajax({
- url: "/ajax/professor/qaOrgAuth",
- type: "GET",
- timeout: 10000,
- dataType: "json",
- data: {
- "orgId": id,
- },
- beforeSend: function() {},
- success: function(data, textState) {
- if(data.success) {
- var $info=data.data;
- userHtml($info);
- }
- },
- error: function(XMLHttpRequest, textStats, errorThrown) {
- $.MsgBox.Alert('提示', '服务器请求失败')
- }
- })
- }
-
- function userHtml(arr) {
- for(var i=0; i < arr.length; i++) {
- var tiof="",img;
- if(arr[i].hasHeadImage){
- img = "/images/head/" + arr[i].id + "_l.jpg";
- }else{
- img ="images/default-photo.jpg"
- }
- if(arr[i].title){
- if(arr[i].office){
- tiof=arr[i].title+" ,"+arr[i].office;
- }else{
- tiof=arr[i].title;
- }
- }else{
- if(arr[i].office){
- tiof=arr[i].office;
- }
- }
- var oString = '<dd>'
- oString += '<div class="staffChild">'
- oString += '<img class="headRadius" src="'+img+'" width="100%" />'
- oString += '</div><div class="h4Font"><span>'+arr[i].name+'</span></div>'
- oString += '<div class="h4Font">'+tiof+'</div></dd>'
- $("#userList").append(oString);
- }
- }
- companyInformation();
- companyUser();
- })
|