/** * Created by Administrator on 2021/4/5. */ define(['jquery', "template", "Tools", "paging", 'dateTime', 'swiper'], function ($, template, Tools) { //数据存储 var module = { data: { propertyList:'' }, }; var tools = new Tools(); module.init = function (page) { tools.doGet(resourceGet+getQueryVariable('id'), {translate_dict: 1}, module.assetDetail , true); tools.doGet(webList, {}, module.webList , true); // var map = new BMapGL.Map('container'); // 创建Map实例 // map.centerAndZoom(new BMapGL.Point(116.320938,39.950026), 18); // 初始化地图,设置中心点坐标和地图级别 // map.enableScrollWheelZoom(false); // 开启鼠标滚轮缩放 }; module.useContent = function (data) { if (data.code == 200) { module.data.phone = data.data.phone; module.data.leader = data.data.leader; var propertyDetailData = template('propertyDetailData', module.data); $("#propertyDetailContent").html(propertyDetailData); } } module.webList = function (data) { if (data.code == 200) { var content = data.rows; module.data.webList = content; var webData = template('webData', module.data); $("#webContent").html(webData); var titData = template('titData', module.data); $("#titContent").html(titData); } } module.assetDetail = function(data){ if (data.code == 200) { var content = data.data; module.data.propertyDetail = content; tools.doGet(attachmentList, { tableId:content.id, tableName: 't_asset_resource', bizPath: 'asset' }, module.attachmentDetail , true); tools.doGet(treeselectSecond+content.deptId, {}, module.useContent , true); // var propertyDetailData = template('propertyDetailData', module.data); // $("#propertyDetailContent").html(propertyDetailData); // $('#dialog').css('display','block'); } } module.attachmentDetail = function(data){ if (data.code == 200) { var content = data.rows; var attachmentList = []; content.map(res=>{ if (res.fileName.indexOf('png')>-1||res.fileName.indexOf('jpg')>-1){ attachmentList.push(res); } }) module.data.attachment = attachmentList; var propertyDetailData = template('propertyDetailData', module.data); $("#propertyDetailContent").html(propertyDetailData); $('#dialog').css('display','block'); } } //获取地址栏参数 function getQueryVariable(variable){ var query = window.location.search.substring(1); var vars = query.split("&"); for (var i=0;i