Commit 7069bbb6 authored by tianhongyang's avatar tianhongyang

开发 代理 测试环境地址更换,甲方详情-合作情况 添加合作情况 选中值回显

parent 16949549
......@@ -2,7 +2,7 @@
* @Author: thy
* @Date: 2023-10-26 14:56:41
* @LastEditors: thy
* @LastEditTime: 2023-11-29 14:25:31
* @LastEditTime: 2023-11-29 17:54:47
* @Description: file content
* @FilePath: \dsk-operate-ui\src\utils\postMessageBridge\bridge\index.js
*/
......@@ -25,6 +25,8 @@ class PostMessageBridge {
_eventCenter = null;
// 触发的行为
_actionMap = null;
// 当前vue实例
_vueIns = null;
/**
*
* @param {{
......@@ -32,6 +34,7 @@ class PostMessageBridge {
* currentOriginUrl : string;
* targetSystem : Window || undefined;
* targetOriginUrl : string || undefined;
* vueIns : any;
* }} options
*/
constructor(options) {
......@@ -41,6 +44,7 @@ class PostMessageBridge {
this._currentOriginUrl = options.currentOriginUrl || location.origin;
this._targetSystem = options.targetSystem;
this._targetOriginUrl = options.targetOriginUrl || "*";
this._vueIns = options.vueIns || null;
await this.init();
resolve(this);
} catch (error) {
......@@ -75,7 +79,7 @@ class PostMessageBridge {
const { id, action, methodName, params } = data;
if (!id) return;
// promise化
const result = normalToPromise(this._actionMap[action][methodName]);
const result = await normalToPromise(this._actionMap[action][methodName])(params);
resolve(result);
} catch (error) {
console.log(error);
......
......@@ -64,7 +64,7 @@
<el-form-item label="项目名称:" prop="projectName" label-width="120px">
<el-input v-model="addParam.projectName" placeholder="请输入项目名称" @input="resetProjectSearch();getCompany1()"></el-input>
<div class="resultlist" v-infinite-scroll="load" v-if="showlist1">
<div v-for="(item,index) in companData1" @click="selCompany1(item.projectName)"><span v-html="item.projectName"></span></div>
<div v-for="(item,index) in companData1" @click="selCompany1(item)"><span v-html="item.projectName"></span></div>
</div>
</el-form-item>
<div class="erow">
......@@ -321,7 +321,6 @@ export default {
resetProjectSearch() {
this.companData1 = []
this.projectpage = 1
console.log(this.companData1);
},
//获取项目名称
getCompany1(){
......@@ -348,7 +347,13 @@ export default {
}
},
selCompany1(item){
this.addParam.projectName = item.replace(/<[^>]+>/g, '')
const params = {};
params.projectName = item.projectName.replace(/<[^>]+>/g, '');
if(item.projectStage) params.projectStage = (this.projectStage.find(i => item.projectStage == i.dictLabel))?.dictValue || "";
if(item.projectCategory) params.projectCategory = (this.projectCategory.find(i => item.projectCategory == i.dictLabel))?.dictValue || "";
if(item.status) params.status = (this.status.find(i => item.status == i.dictLabel))?.dictValue || "";
if(item.investmentAmount) params.investmentAmount = item.investmentAmount;
this.addParam = {...this.addParam,...params};
this.showlist1 = false
},
//获取业主单位
......@@ -371,6 +376,7 @@ export default {
},
selCompany(item){
this.addParam.ownerCompany = item.name.replace(/<[^>]+>/g, '')
this.showlist = false
},
// 处理条件下拉
......
......@@ -315,44 +315,36 @@ export default {
// 判断客户是否关联显示修改
association(id) {
if (id) {
customerInfo(id).then(res => {
customerInfo(id).then(async res => {
console.log(res);
if (res.code == 200) {
if (res.data.userId == this.$store.state.user.userId) {
this.$nextTick(() => {
this.customerInfo = res.data;
this.customerId = res.data.customerId;
});
await this.$nextTick()
this.customerInfo = res.data;
this.customerId = res.data.customerId;
if (res.data.companyId == this.companyId) {
this.$nextTick(() => {
this.isCustomer = true;
this.isCompany = true;
});
await this.$nextTick()
this.isCustomer = true;
this.isCompany = true;
} else {
this.$nextTick(() => {
this.isCustomer = true;
this.isCompany = false;
this.currentPath.pathName = this.$route.query.path || 'business';
this.companyInfo = {
companyName: this.customerInfo.companyName
};
document.getElementById('tagTitle').innerText = this.customerInfo.companyName;
// let lists = this.$store.state.tagsView.visitedViews
// lists.forEach(item=>{
// if(item.fullPath == this.$route.fullPath){
let titlename = document.getElementById('tagTitles');
if (titlename) {
titlename.innerText = this.customerInfo.companyName;
}
// }
// })
});
await this.$nextTick();
this.isCustomer = true;
this.isCompany = false;
this.currentPath.pathName = this.$route.query.path || 'business';
this.companyInfo = {
companyName: this.customerInfo.companyName
};
document.getElementById('tagTitle').innerText = this.customerInfo.companyName;
let titlename = document.getElementById('tagTitles');
if (titlename) {
titlename.innerText = this.customerInfo.companyName;
}
}
} else {
this.$nextTick(() => {
this.isCustomer = true;
this.isCompany = true;
this.currentPath.pathName = 'overview';
});
await this.$nextTick();
this.isCustomer = true;
this.isCompany = true;
this.currentPath.pathName = 'overview';
}
}
}).catch(err => {
......
......@@ -40,10 +40,11 @@ export default {
const dom = this.$refs["subsystemIframeContainer"].$el.querySelector("iframe");
// 初始化iframe工具
const iframeTools = await new IframeTools(dom);
// 初始化iframe通信工具
console.dir(iframeTools);
// 初始化iframe通信工具
const messageBridge = await new PostMessageBridge({
currenySystem: window,
currentSystem: window,
currentOriginUrl : location.origin,
targetSystem: iframeTools.subSystemIframe?.contentWindow,
targetOriginUrl: process.env.VUE_APP_SUB_SYSTEM_ADDRESS
});
......
......@@ -35,7 +35,7 @@ module.exports = {
proxy: {
// detail: https://cli.vuejs.org/config/#devserver-proxy
[process.env.VUE_APP_BASE_API]: {
target: `http://47.104.91.229:9099/prod-api`,//测试
target: `http://120.46.64.239:9099/prod-api`,//测试
// target: `https://szhapi.jiansheku.com`,//线上
// target: `http://122.9.160.122:9011`, //线上
// target: `http://192.168.0.165:9098`,//施-无线
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment