|
@@ -136,6 +136,7 @@ class ProjectResource extends BaseWidget {
|
|
|
var Obj = this.popup.show("项目初始位置", this.template.split('$$')[3]);
|
|
|
const targetPrj = this.vueObject.serchVue.dataList[this.opeartionItme[0]];
|
|
|
const position = targetPrj["geo_info"];
|
|
|
+ const dataUser=targetPrj["dataUser"];
|
|
|
if (!position) {
|
|
|
Obj.domObj.find('.lon').val(china.lon);
|
|
|
Obj.domObj.find('.lat').val(china.lat);
|
|
@@ -152,21 +153,28 @@ class ProjectResource extends BaseWidget {
|
|
|
Obj.domObj.find('.height').val(china.height);
|
|
|
}
|
|
|
}
|
|
|
+ Obj.domObj.find('.dataUser').val(dataUser);
|
|
|
Obj.submitObj.off("click").on("click", function (e) {
|
|
|
const lon = Obj.domObj.find('.lon').val();
|
|
|
const lat = Obj.domObj.find('.lat').val();
|
|
|
const height = Obj.domObj.find('.height').val();
|
|
|
+ const dataUserVal=Obj.domObj.find('.dataUser').val().toString().trim();
|
|
|
if (isNaN(lon) || isNaN(lat) || isNaN(height)) {
|
|
|
this.toast.show('请填写坐标信息');
|
|
|
return;
|
|
|
}
|
|
|
+ if (!dataUserVal||dataUserVal==="") {
|
|
|
+ this.toast.show('请填写空间库账号');
|
|
|
+ return;
|
|
|
+ }
|
|
|
const data = {
|
|
|
id: targetPrj.id,
|
|
|
geo_info: JSON.stringify({
|
|
|
lon: lon,
|
|
|
lat: lat,
|
|
|
height: height
|
|
|
- })
|
|
|
+ }),
|
|
|
+ dataUser:dataUserVal
|
|
|
}
|
|
|
const url = that.config.setAreaCompany;
|
|
|
that.baseAjaxSend.sendAjax(that, data, url, 'PUT', e => {
|
|
@@ -285,6 +293,57 @@ class ProjectResource extends BaseWidget {
|
|
|
})
|
|
|
})
|
|
|
}.bind(this));
|
|
|
+
|
|
|
+ this.domObj.find('.btn_orgprj').off('click').on("click", function (e) {
|
|
|
+ this.getCheckItem();
|
|
|
+ if (this.opeartionItme.length == 0) {
|
|
|
+ this.toast.show("请选择一行数据进行区域绑定");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if (this.opeartionItme.length > 1) {
|
|
|
+ this.toast.show("最多选择一行数据进行区域绑定");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ let datas = this.vueObject.serchVue.dataList[this.opeartionItme[0]];
|
|
|
+ var that = this;
|
|
|
+ this.popup.setSize(400, 400);
|
|
|
+ var Obj = this.popup.show("区域总部绑定", this.template.split('$$')[6]);
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ const groupUrl = "/tofly-sxgk/org/page";
|
|
|
+ this.baseAjaxSend.sendAjax(this, {}, groupUrl, "GET", function (results) {
|
|
|
+ let html = "";
|
|
|
+ results.result.records.forEach(item => {
|
|
|
+ if (html == "") {
|
|
|
+ html += "<option selected >选择区域</option>"
|
|
|
+ html += "<option value='" + item.id + "'>" + item.orgName + "</option>"
|
|
|
+ } else {
|
|
|
+ html += "<option value='" + item.id + "'>" + item.orgName + "</option>"
|
|
|
+ }
|
|
|
+ })
|
|
|
+ let dom = Obj.conObj.find('.orgSelect');
|
|
|
+ dom.empty().append(html);
|
|
|
+ }.bind(this));
|
|
|
+ var checkString;
|
|
|
+ Obj.submitObj.off("click").on("click", function (e) {
|
|
|
+ const orgid=Obj.conObj.find('.orgSelect').val().toString();
|
|
|
+ console.log(checkString)
|
|
|
+ let setData = {
|
|
|
+ prjId: datas.id,
|
|
|
+ orgId: orgid
|
|
|
+ };
|
|
|
+ const setUrl = "/tofly-sxgk/orgprj";
|
|
|
+ that.baseAjaxSend.sendAjax(that, setData, setUrl, "POST", function (results) {
|
|
|
+ if (results.code != 1){
|
|
|
+ this.toast.show("区域绑定失败");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ this.toast.show("区域绑定成功");
|
|
|
+ this.popup.close()
|
|
|
+ })
|
|
|
+ })
|
|
|
+ }.bind(this));
|
|
|
}
|
|
|
|
|
|
|