Commit 7069bbb6 authored by tianhongyang's avatar tianhongyang

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

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