Commit d0e0bf22 authored by tanyang's avatar tanyang

Merge remote-tracking branch 'origin/V20230915' into V20230915

parents 1770612d 2f30a27c
...@@ -37,6 +37,7 @@ ...@@ -37,6 +37,7 @@
"url": "https://gitee.com/y_project/RuoYi-Vue.git" "url": "https://gitee.com/y_project/RuoYi-Vue.git"
}, },
"dependencies": { "dependencies": {
"@alita/chalk": "^1.1.2",
"@cell-x/el-table-sticky": "^1.0.2", "@cell-x/el-table-sticky": "^1.0.2",
"@riophae/vue-treeselect": "0.4.0", "@riophae/vue-treeselect": "0.4.0",
"@vue/composition-api": "^1.7.2", "@vue/composition-api": "^1.7.2",
......
...@@ -823,6 +823,9 @@ li { ...@@ -823,6 +823,9 @@ li {
.el-select-dropdown__item { .el-select-dropdown__item {
padding: 0 16px; padding: 0 16px;
} }
.el-select-dropdown__item.selected::after {
right:8px;
}
} }
} }
......
...@@ -9,11 +9,11 @@ ...@@ -9,11 +9,11 @@
</el-menu-item> </el-menu-item>
</app-link> </app-link>
</template> </template>
<el-submenu v-else ref="subMenu" :index="resolvePath(item.path)" popper-append-to-body> <el-submenu v-else ref="subMenu" :index="resolvePath(item.path,item.query)" popper-append-to-body>
<template slot="title"> <template slot="title">
<item v-if="item.meta" :icon="sideIcon(item)" :title="item.meta.title" /> <item v-if="item.meta" :icon="sideIcon(item)" :title="item.meta.title" />
</template> </template>
<sidebar-item v-for="child in item.children" :key="child.path" :is-nest="true" :item="child" :base-path="resolvePath(child.path,child.query)" <sidebar-item v-for="child in item.children" :key="child.path" :is-nest="true" :item="child" :base-path="resolvePath(child.path)"
:active-menu="activeMenu" class="nest-menu" /> :active-menu="activeMenu" class="nest-menu" />
</el-submenu> </el-submenu>
</template> </template>
...@@ -80,7 +80,7 @@ export default { ...@@ -80,7 +80,7 @@ export default {
default: false default: false
}, },
basePath: { basePath: {
type: String, type: [String],
default: '' default: ''
}, },
activeMenu: { activeMenu: {
......
<template> <template>
<div :class="{'has-logo':showLogo}" @mouseenter="sideEnter" @mouseleave="sideLeave" :style="{ backgroundColor: settings.sideTheme === 'theme-dark' ? variables.menuBackground : variables.menuLightBackground }"> <div :class="{'has-logo':showLogo}" @mouseenter="sideEnter" @mouseleave="sideLeave"
<logo v-if="showLogo" :collapse="isCollapse" /> :style="{ backgroundColor: settings.sideTheme === 'theme-dark' ? variables.menuBackground : variables.menuLightBackground }">
<el-scrollbar :class="settings.sideTheme" wrap-class="scrollbar-wrapper"> <logo v-if="showLogo" :collapse="isCollapse" />
<el-menu <el-scrollbar :class="settings.sideTheme" wrap-class="scrollbar-wrapper">
:default-active="activeMenu" <el-menu :default-active="activeMenu" :collapse="isCollapse" :background-color="variables.menuBg" :text-color="variables.menuText"
:collapse="isCollapse" :unique-opened="true" :active-text-color="settings.theme" :collapse-transition="false" mode="vertical">
:background-color="variables.menuBg" <sidebar-item v-for="(route, index) in hidechildren" :key="route.path + index" :is-collapse="isCollapse" :active-menu="activeMenu"
:text-color="variables.menuText" :item="route" :base-path="route.path" :class="route.fixed&&route.fixed.isFixed?'sideFoot':''"
:unique-opened="true" :style="route.fixed&&route.fixed.isFixed?{'bottom': route.fixed.number*50+'px'}: bottomMenu&&index==routes.length-bottomMenu-2?{'padding-bottom': bottomMenu*50+'px'}:''" />
:active-text-color="settings.theme" </el-menu>
:collapse-transition="false" </el-scrollbar>
mode="vertical" <div v-show="isExpand" class="side-expand" @click="toggleSideBar">
> <img :src="isCollapse?require('@/assets/images/sidebar_right.png'):require('@/assets/images/sidebar_left.png')">
<sidebar-item
v-for="(route, index) in hidechildren"
:key="route.path + index"
:is-collapse="isCollapse"
:active-menu="activeMenu"
:item="route"
:base-path="route.path"
:class="route.fixed&&route.fixed.isFixed?'sideFoot':''"
:style="route.fixed&&route.fixed.isFixed?{'bottom': route.fixed.number*50+'px'}: bottomMenu&&index==routes.length-bottomMenu-2?{'padding-bottom': bottomMenu*50+'px'}:''"
/>
</el-menu>
</el-scrollbar>
<div v-show="isExpand" class="side-expand" @click="toggleSideBar">
<img :src="isCollapse?require('@/assets/images/sidebar_right.png'):require('@/assets/images/sidebar_left.png')">
</div>
</div> </div>
</div>
</template> </template>
<script> <script>
...@@ -40,69 +24,70 @@ import variables from "@/assets/styles/variables.scss"; ...@@ -40,69 +24,70 @@ import variables from "@/assets/styles/variables.scss";
export default { export default {
components: { SidebarItem, Logo }, components: { SidebarItem, Logo },
data() { data() {
return { return {
isExpand: false isExpand: false
} };
}, },
computed: { computed: {
...mapState(["settings"]), ...mapState(["settings"]),
...mapGetters(["sidebarRouters", "sidebar"]), ...mapGetters(["sidebarRouters", "sidebar"]),
hidechildren(){ hidechildren() {
return this.sidebarRouters.map(item=>{ const resultArray = this.sidebarRouters.map(item => {
if(item.children?.length){ if (item.children?.length) {
item.children = item.children.filter(i=>{ item.children = item.children.filter(i => {
if (typeof (i.hidden) == 'boolean' && i.hidden == false || i.path == "index"){ if (typeof (i.hidden) == 'boolean' && i.hidden == false || i.path == "index") {
return i return i;
}
})
}
return item
})
},
activeMenu() {
const route = this.$route;
const { meta, path } = route;
// if set path, the sidebar will highlight the path you set
if (meta.activeMenu) {
return meta.activeMenu;
} }
return path; });
}, }
device() { return item;
return this.$store.state.app.device });
}, return JSON.parse(JSON.stringify(resultArray));
bottomMenu() { },
const routeArr = this.$router.options.routes activeMenu() {
const navFixed = routeArr.filter(item => item.fixed && item.fixed.isFixed) const route = this.$route;
return navFixed.length const { meta, path } = route;
}, // if set path, the sidebar will highlight the path you set
showLogo() { if (meta.activeMenu) {
return this.$store.state.settings.sidebarLogo; return meta.activeMenu;
}, }
variables() { return path;
return variables; },
}, device() {
isCollapse() { return this.$store.state.app.device;
return !this.sidebar.opened; },
}, bottomMenu() {
const routeArr = this.$router.options.routes;
const navFixed = routeArr.filter(item => item.fixed && item.fixed.isFixed);
return navFixed.length;
},
showLogo() {
return this.$store.state.settings.sidebarLogo;
},
variables() {
return variables;
},
isCollapse() {
return !this.sidebar.opened;
},
},
methods: {
toggleSideBar() {
this.$emit('handleBar', this.isCollapse ? '-96' : '96'); // 96为展开宽度和收起宽度之差
this.$store.dispatch('app/toggleSideBar');
},
sideEnter() {
if (this.device !== 'mobile') {
this.isExpand = true;
}
},
sideLeave() {
if (this.device !== 'mobile') {
this.isExpand = false;
}
}, },
methods: { },
toggleSideBar(){
this.$emit('handleBar', this.isCollapse ? '-96' : '96'); // 96为展开宽度和收起宽度之差
this.$store.dispatch('app/toggleSideBar');
},
sideEnter(){
if (this.device !== 'mobile') {
this.isExpand = true;
}
},
sideLeave(){
if (this.device !== 'mobile') {
this.isExpand = false;
}
},
},
}; };
</script> </script>
import Vue from 'vue'; import Vue from 'vue';
import VCA from '@vue/composition-api' //composition APi import VCA from '@vue/composition-api'; //composition APi
import Cookies from 'js-cookie'; import Cookies from 'js-cookie';
...@@ -87,9 +87,11 @@ Vue.use(Element, { ...@@ -87,9 +87,11 @@ Vue.use(Element, {
Vue.config.productionTip = false; Vue.config.productionTip = false;
new Vue({ const vueIns = new Vue({
el: '#app', el: '#app',
router, router,
store, store,
render: h => h(App) render: h => h(App)
}); });
export default vueIns;
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: thy * @Author: thy
* @Date: 2023-11-08 09:28:17 * @Date: 2023-11-08 09:28:17
* @LastEditors: thy * @LastEditors: thy
* @LastEditTime: 2023-11-17 09:36:01 * @LastEditTime: 2023-12-01 15:31:33
* @Description: file content * @Description: file content
* @FilePath: \dsk-operate-ui\src\utils\iframeTools.js * @FilePath: \dsk-operate-ui\src\utils\iframeTools.js
*/ */
...@@ -10,6 +10,8 @@ ...@@ -10,6 +10,8 @@
import { dskAccessToken } from '@/api/common'; import { dskAccessToken } from '@/api/common';
import { getUrlSearchQuery, isUrl, paramsToQuery } from "@/utils/"; import { getUrlSearchQuery, isUrl, paramsToQuery } from "@/utils/";
import { Message } from "element-ui"; import { Message } from "element-ui";
import chalk from "@alita/chalk";
window.alitadebug = true;
/** /**
...@@ -24,29 +26,37 @@ class IframeTools { ...@@ -24,29 +26,37 @@ class IframeTools {
authToken = ""; authToken = "";
origin = location.origin; origin = location.origin;
isOuter = false; isOuter = false;
iframeLoaded = false;
isAutoInit = false;
/** /**
* 插件域名地址 * 插件域名地址
* @param {string} pluginDomain 默认当前环境变量VUE_APP_SUB_SYSTEM_ADDRESS * @param {string} pluginDomain 默认当前环境变量VUE_APP_SUB_SYSTEM_ADDRESS
* @param {HTMLIFrameElement} subSystemIframe 子系统iframe dom节点 * @param {HTMLIFrameElement} subSystemIframe 子系统iframe dom节点
* @returns * @returns
*/ */
constructor(subSystemIframe, pluginDomain = process.env.VUE_APP_SUB_SYSTEM_ADDRESS) { constructor(subSystemIframe, pluginDomain = process.env.VUE_APP_SUB_SYSTEM_ADDRESS, isAutoInit = false) {
try { return new Promise(async (resolve, reject) => {
const query = getUrlSearchQuery(); try {
if (!query.url) return Message.warning("缺少子系统目标地址"); const query = getUrlSearchQuery();
// 传入的iframeUrl不是一个合法地址 if (!query.url) return Message.warning("缺少子系统目标地址");
if (!isUrl(pluginDomain)) return Message.warning("子系统源地址不合法"); // 传入的iframeUrl不是一个合法地址
// 未获取到子系统节点 if (!isUrl(pluginDomain)) return Message.warning("子系统源地址不合法");
if (!subSystemIframe) return Message.warning("未获取到子系统节点"); // 未获取到子系统节点
this.queryParams = query; if (!subSystemIframe) return Message.warning("未获取到子系统节点");
this.pluginDomain = pluginDomain; this.queryParams = query;
this.subSystemIframe = subSystemIframe; this.pluginDomain = pluginDomain;
this.isOuter = query.isOuter && typeof JSON.parse(query.isOuter) == "boolean" ? JSON.parse(query.isOuter) : false; this.subSystemIframe = subSystemIframe;
// 是一个合法地址 初始化 先替换域名地址 再获取令牌并 拼接 // 是否外部打开
this.init(); this.isOuter = query.isOuter && typeof JSON.parse(query.isOuter) == "boolean" ? JSON.parse(query.isOuter) : false;
} catch (error) { // 是否自动初始化iframe
throw new Error(error); this.isAutoInit = isAutoInit;
} // 是一个合法地址 初始化 先替换域名地址 再获取令牌并 拼接
await this.init();
resolve(this);
} catch (error) {
reject(error);
}
});
} }
/** /**
...@@ -78,7 +88,12 @@ class IframeTools { ...@@ -78,7 +88,12 @@ class IframeTools {
url = `${url}${paramsToQuery(query) ? "?" + paramsToQuery(query) : ""}`; url = `${url}${paramsToQuery(query) ? "?" + paramsToQuery(query) : ""}`;
this.queryParams.url = url; this.queryParams.url = url;
console.log(this.queryParams.url); console.log(this.queryParams.url);
// 倒计时刷新token 正常误差10s 提前获取 if (this.isAutoInit) {
this.subSystemIframe.src = url;
// 初始化iframe
await this.initIframe(this.subSystemIframe);
}
// 倒计时刷新token 误差10s 提前获取
this.setTokenRefresh(expire * 1000 - 1000 * 10); this.setTokenRefresh(expire * 1000 - 1000 * 10);
} }
} catch (error) { } catch (error) {
...@@ -87,6 +102,21 @@ class IframeTools { ...@@ -87,6 +102,21 @@ class IframeTools {
} }
} }
initIframe(iframe) {
if (!iframe) throw new Error("缺少需要监听的iframe元素");
return new Promise((resolve, reject) => {
let that = this;
iframe.addEventListener("load", function onIframeLoad(e) {
iframe.removeEventListener("load", onIframeLoad, false);
that.iframeLoaded = true;
// console.clear();
chalk.hello("author:thy", "0.0.1");
chalk.ready(chalk.bgGreen("iframeTools 初始化完毕"));
resolve(true);
}, false);
});
}
/** /**
* 获取子系统token * 获取子系统token
*/ */
......
import Interaction from "@/utils/postMessageBridge/action/interaction";
import Router from "@/utils/postMessageBridge/action/router";
const interaction = new Interaction();
const router = new Router();
export const messageHandlers = {
interaction,
router
};
export {
interaction,
router
};
\ No newline at end of file
import { pmb } from "../bridge";
let _this = null;
class Interaction {
actionName = "interaction";
constructor() {
_this = this;
}
default(params = {}, mergeParams = { action: this.actionName, ...params }) {
if (!params) throw new Error("传入的params参数错误");
return new Promise((resolve, reject) => pmb.publish(mergeParams, (e) => resolve(e)));
}
layoutHtml(userParams = {}) {
return _this.default({
method: "layoutHtml",
params: { ...userParams }
});
}
syncScroll(userParams = {}) {
return _this.default({
method: "syncScroll",
params: { ...userParams }
});
}
showConditions(userParams = {}) {
return _this.default({
method: "showConditions",
params: { ...userParams }
});
}
}
export default Interaction;
\ No newline at end of file
import { pmb } from "../bridge";
let _this = null;
class Router {
actionName = "router";
constructor() {
_this = this;
}
default(params = {}, mergeParams = { action: this.actionName, ...params }) {
if (!params) throw new Error("传入的params参数错误");
return new Promise((resolve, reject) => pmb.publish(mergeParams, (e) => resolve(e)));
}
toTargetRouter(userParams = {}) {
return new Promise((resolve, reject) => {
this.$tab.openPage(userParams.title, userParams.url);
console.log(userParams);
resolve();
});
}
iframeToTargetRouter(userParams = {}) {
return _this.default({
method: "toTargetUrl",
params: { ...userParams }
});
}
componentCreated(userParams = {}) {
return new Promise(async (resolve, reject) => {
return await this.loadedInit();
});
}
}
export default Router;
\ No newline at end of file
/*
* @Author: thy
* @Date: 2023-11-28 18:09:11
* @LastEditors: thy
* @LastEditTime: 2023-12-01 12:15:31
* @Description: file content
* @FilePath: \dsk-operate-ui\src\utils\postMessageBridge\bridge\eventCenter.js
*/
import { v4 } from "uuid";
import { normalToPromise } from "@/utils/postMessageBridge/tools";
import chalk from "@alita/chalk";
window.alitadebug = true;
/**
* 事件回调 调度中心
*/
class EventCenter {
//事件回调储存栈
_eventHandlerMap = new Map();
_vueIns = null;
constructor(vueIns) {
vueIns ? this._vueIns = vueIns : null;
process.env.ENV != "production" ? chalk.ready(chalk.bgGreen("事件调度中心初始化完毕")) : null;
}
/**
* 根据回调ID获取事件回调储存中的回调
* @param {string} handlerId
*/
getTargetHandler(handlerId) {
return this._eventHandlerMap.get(handlerId);
}
/**
* 注册事件回调到 事件储存中
* @param {Promise} promiseCallBack
*/
registerHandler(promiseCallBack) {
return new Promise((resolve, reject) => {
if (Object.prototype.toString.call(promiseCallBack) !== "[object Function]") return console.warn("传入的回调类型不是一个函数");
const uid = v4();
this._eventHandlerMap.set(uid, promiseCallBack);
resolve(uid);
});
}
/**
* 根据回调ID卸载事件回调储存中的回调
* @param {string} handlerId
*/
writeOffHandler(handlerId) {
return this._eventHandlerMap.delete(handlerId);
}
/**
* 根据回调ID 执行事件回调储存中的回调 并卸载
* @param {string} handlerId
*/
executeHandler(handlerId, params = {}) {
return new Promise((resolve, reject) => {
try {
const currentCallBack = this.getTargetHandler(handlerId);
if (!currentCallBack) return reject("执行回调错误,未找到对应回调");
// 缓存回调
const cb = normalToPromise(currentCallBack);
// 删除回调
this._eventHandlerMap.delete(handlerId);
// 执行回调
resolve(cb(params));
} catch (error) {
console.log(error);
}
});
}
}
export default EventCenter;
\ No newline at end of file
...@@ -2,44 +2,155 @@ ...@@ -2,44 +2,155 @@
* @Author: thy * @Author: thy
* @Date: 2023-10-26 14:56:41 * @Date: 2023-10-26 14:56:41
* @LastEditors: thy * @LastEditors: thy
* @LastEditTime: 2023-10-31 09:28:26 * @LastEditTime: 2023-12-07 15:41:56
* @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
*/ */
import EventCenter from "./eventCenter";
import { messageHandlers } from "@/utils/postMessageBridge/action";
import chalk from "@alita/chalk";
window.alitadebug = true;
class PostMessageBridge { class PostMessageBridge {
// 当前系统 // 当前系统
_currenySystem = null; _currentSystem = null;
// 当前系统域
_currentOriginUrl = null;
// 目标系统 // 目标系统
_targetSystem = null; _targetSystem = null;
// 目标域 // 目标域
_targetOriginUrl = null; _targetOriginUrl = null;
// 事件调度中心 // 事件调度中心
_eventHandlers = new Map(); _eventCenter = null;
// 当前vue实例
_vueIns = null;
// 处理函数
_messageHandlers = null;
//通信是否建立成功
_communication = false;
constructor() { }
/** /**
* *
* @param {{ * @param {{
* currenySystem : Window || undefined; * currentSystem : Window || undefined;
* targetSystem : Window || undefined; * currentOriginUrl : string;
* targetOriginUrl : string || undefined; * targetSystem : Window || undefined;
* }} options * targetOriginUrl : string || undefined;
* vueIns : any;
* }} options
*/
async init(options) {
try {
this._currentSystem = options.currentSystem;
this._currentOriginUrl = options.currentOriginUrl || location.origin;
this._targetSystem = options.targetSystem;
this._targetOriginUrl = options.targetOriginUrl || "*";
this._vueIns = options.vueIns || null;
this._messageHandlers = messageHandlers;
this._eventCenter = new EventCenter(this._vueIns);
this._currentSystem.removeEventListener("message", this.messageListener.bind(this), false);
this._currentSystem.addEventListener("message", this.messageListener.bind(this), false);
// 初始化完毕
process.env.ENV != "production" ? chalk.ready(chalk.bgGreen("通信桥梁初始化完毕")) : true;
} catch (error) {
console.log(error);
}
}
getVueInstance(insArray, current) {
if (insArray?.length) {
const result = insArray.find(item => {
if (item.$children && item.$children?.length) {
return this.getVueInstance(item.$children, current);
}
return item.$route == current;
});
return result;
}
}
/**
* 触发message 时执行的函数
* @param {MessageEvent} event
* @returns
*/
messageListener(event) {
new Promise(async (resolve, reject) => {
try {
const { data, origin, source } = event;
// 判断来源 必须 来自子系统
if (origin !== this._targetOriginUrl || source !== this._targetSystem?.contentWindow) return;
const { callbackId, action, method, params = {}, url, title, id } = data;
if(callbackId) console.log(callbackId,"回调ID","需要执行的方法",method);
//兼容插件老式写法
if (url || title || id) {
this._vueIns.$tab.openPage(title, url);
return resolve();
}
// 未获取到当前交互id 不执行调用
if (!callbackId) return;
// 有注册回调 执行回调
if (this._eventCenter.getTargetHandler(callbackId)) {
resolve(this._eventCenter.executeHandler(callbackId, params));
} else {
// 订阅消息
const result = await this.subscribe(action, method, params);
resolve(result);
}
} catch (error) {
console.log(error);
reject(error);
}
});
};
/**
* 发布消息
* @param {Object} options
* @param {Function} callback
*/ */
constructor(options) { async publish(options, callback) {
this._currenySystem = options.currenySystem; if (!options || !callback) return;
this._targetSystem = options.targetSystem; if (!options.action) throw new Error("缺少action参数");
this._targetOriginUrl = options.targetOriginUrl || "*"; if (!options.method) throw new Error("缺少method参数");
if (Object.prototype.toString.call(callback) != "[object Function]") return console.warn("传入的回调不是一个函数");
options.params = options.params || {};
// 绑定到vue实例
const bfn = callback.bind(this._vueIns);
const callbackId = await this._eventCenter.registerHandler(bfn);
const { params, ...rest } = options;
process.env.ENV != "production" ? chalk.log(chalk.bgBlack(`发布消息:\n回调ID:${callbackId}\n命中模块:${options.action}\n命中方法:${options.method}\n传递参数:\n${JSON.stringify(params)}`)) : null;
this._targetSystem?.contentWindow?.postMessage({
callbackId,
...rest,
params,
}, { targetOrigin: this._targetOriginUrl });
return callbackId;
} }
/** /**
* 订阅消息 * 订阅消息
* @param {{ * @param {string} action 执行的模块
* id : string; * @param {string} method 执行的方法
* method : string; * @param {Object} params 参数
* params : object; * @returns
* }} messageEvent
*/ */
receiveMessage(messageEvent) { async subscribe(action, method, params) {
try {
const fn = this._messageHandlers[action] ? this._messageHandlers[action][method] ? this._messageHandlers[action][method] : null : null;
// 绑定到vue实例
const result = fn ? await this._messageHandlers[action][method].call(this._vueIns, params) : null;
return result;
} catch (error) {
console.log(router);
}
} }
} }
\ No newline at end of file
// 单例模式
export const pmb = new PostMessageBridge();
export default PostMessageBridge;
\ No newline at end of file
export { default as PostMessageBridge, pmb } from "./bridge";
\ No newline at end of file
/**
* 普通函数包装为promise风格函数
* @param {Function} fn
* @returns {Promise<any>} 返回一个promise
*/
export const normalToPromise = (fn) => {
const tag = Object.prototype.toString.call(fn);
if (tag !== "[object Function]" && tag !== "[object AsyncFunction]") return fn;
return (...args) => {
return new Promise((resolve, reject) => {
try {
const result = fn(...args);
resolve(result);
} catch (error) {
reject(error);
}
});
};
};
\ No newline at end of file
...@@ -75,7 +75,7 @@ ...@@ -75,7 +75,7 @@
</el-col> </el-col>
<div class="empty" v-if="hzqkTotal === 0"> <div class="empty" v-if="hzqkTotal === 0">
<img class="img" src="@/assets/images/project/empty.png"> <img class="img" src="@/assets/images/project/empty.png">
<div class="p1">抱歉,您还未添加合作客户</div> <div class="p1">抱歉,您还未添加与客户的合作中标项目情况</div>
</div> </div>
</el-row> </el-row>
</div> </div>
...@@ -240,9 +240,10 @@ ...@@ -240,9 +240,10 @@
this.hzqkList=res.data; this.hzqkList=res.data;
let list=[]; let list=[];
for(let i=0; i<res.data.length; i++){ for(let i=0; i<res.data.length; i++){
if(res.data[i].totalAmount){ if(!res.data[i].totalAmount){
list.push(res.data[i]) res.data[i].totalAmount=0
} }
list.push(res.data[i])
} }
if(list.length > 0){ if(list.length > 0){
this.initChart(list) this.initChart(list)
......
...@@ -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,44 +315,36 @@ export default { ...@@ -315,44 +315,36 @@ 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';
this.companyInfo = { this.companyInfo = {
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 let titlename = document.getElementById('tagTitles');
// lists.forEach(item=>{ if (titlename) {
// if(item.fullPath == this.$route.fullPath){ titlename.innerText = this.customerInfo.companyName;
let titlename = document.getElementById('tagTitles'); }
if (titlename) {
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 => {
......
...@@ -1435,63 +1435,87 @@ export default { ...@@ -1435,63 +1435,87 @@ export default {
handleUrl(item){ handleUrl(item){
switch (item.name) { switch (item.name) {
case '项目管理': case '项目管理':
if(this.permissions.includes('project:info')){ if(this.permissions.includes('*:*:*')){
this.$router.push({ path: item.url }) this.$router.push({ path: item.url })
}else { }else {
this.$message({ if(this.permissions.includes('project:info')){
message: '您好,请联系管理员开通页面权限', this.$router.push({ path: item.url })
type: 'warning' }else {
}); this.$message({
message: '您好,请联系管理员开通页面权限',
type: 'warning'
});
}
} }
break; break;
case '客户管理': case '客户管理':
if(this.permissions.includes('customer:info')){ if(this.permissions.includes('*:*:*')){
this.$router.push({ path: item.url }) this.$router.push({ path: item.url })
}else { }else {
this.$message({ if(this.permissions.includes('customer:info')){
message: '您好,请联系管理员开通页面权限', this.$router.push({ path: item.url })
type: 'warning' }else {
}); this.$message({
message: '您好,请联系管理员开通页面权限',
type: 'warning'
});
}
} }
break; break;
case '全国经济大全': case '全国经济大全':
if(this.permissions.includes('nationalEconomies:query')){ if(this.permissions.includes('*:*:*')){
this.$router.push({ path: item.url }) this.$router.push({ path: item.url })
}else { }else {
this.$message({ if(this.permissions.includes('nationalEconomies:query')){
message: '您好,请联系管理员开通页面权限', this.$router.push({ path: item.url })
type: 'warning' }else {
}); this.$message({
message: '您好,请联系管理员开通页面权限',
type: 'warning'
});
}
} }
break; break;
case '集团户': case '集团户':
if(this.permissions.includes('group:query')){ if(this.permissions.includes('*:*:*')){
this.$router.push({ path: item.url }) this.$router.push({ path: item.url })
}else { }else {
this.$message({ if(this.permissions.includes('group:query')){
message: '您好,请联系管理员开通页面权限', this.$router.push({ path: item.url })
type: 'warning' }else {
}); this.$message({
message: '您好,请联系管理员开通页面权限',
type: 'warning'
});
}
} }
break; break;
case '查城投平台': case '查城投平台':
if(this.permissions.includes('owner:query')){ if(this.permissions.includes('*:*:*')){
this.$router.push({ path: item.url }) this.$router.push({ path: item.url })
}else { }else {
this.$message({ if(this.permissions.includes('owner:query')){
message: '您好,请联系管理员开通页面权限', this.$router.push({ path: item.url })
type: 'warning' }else {
}); this.$message({
message: '您好,请联系管理员开通页面权限',
type: 'warning'
});
}
} }
break; break;
case '商机雷达': case '商机雷达':
if(this.permissions.includes('radar:query')){ if(this.permissions.includes('*:*:*')){
this.$router.push({ path: item.url }) this.$router.push({ path: item.url })
}else { }else {
this.$message({ if(this.permissions.includes('radar:query')){
message: '您好,请联系管理员开通页面权限', this.$router.push({ path: item.url })
type: 'warning' }else {
}); this.$message({
message: '您好,请联系管理员开通页面权限',
type: 'warning'
});
}
} }
break; break;
default: default:
......
...@@ -360,6 +360,12 @@ export default { ...@@ -360,6 +360,12 @@ export default {
sortChange({ column, prop, order }){ sortChange({ column, prop, order }){
if(prop === 'aptitudeCountNew'){ if(prop === 'aptitudeCountNew'){
this.queryParams.field ='aptitudeCountNew' this.queryParams.field ='aptitudeCountNew'
}else if(prop === 'recentlyCount'){
this.queryParams.field ='winBidCount'
}else if(prop === 'customerCount'){
this.queryParams.field ='customer'
}else if(prop === 'supplierCount'){
this.queryParams.field ='supplier'
}else { }else {
this.queryParams.field = prop this.queryParams.field = prop
} }
......
...@@ -205,7 +205,7 @@ export default { ...@@ -205,7 +205,7 @@ export default {
// 设置上传的请求头部 // 设置上传的请求头部
headers: { Authorization: "Bearer " + getToken() }, headers: { Authorization: "Bearer " + getToken() },
// 上传的地址 // 上传的地址
url: process.env.VUE_APP_BASE_API + `"/business/open/tender/importData/"}${this.detailId ? this.detailId : parseInt(this.$route.query.id)}`, url: process.env.VUE_APP_BASE_API + `/business/open/tender/importData/${this.detailId ? this.detailId : parseInt(this.$route.query.id)}`,
// 展示上传结果 // 展示上传结果
showResult: false, showResult: false,
// 模板下载地址 // 模板下载地址
......
...@@ -221,10 +221,11 @@ ...@@ -221,10 +221,11 @@
this.addtips() this.addtips()
} }
let j = 0 let j = 0
for(var i=1;i<=7;i++){ for(let i=1;i<=7;i++){
let isSelf = document.getElementById('inputxt'+i).contains(event.target) // 这个是自己的区域 let isSelf = document.getElementById('inputxt'+i).contains(event.target) // 这个是自己的区域
if(isSelf) { if(isSelf) {
this.nowedit = i this.nowedit = i
break;
}else { }else {
j++; j++;
} }
...@@ -254,13 +255,13 @@ ...@@ -254,13 +255,13 @@
break; break;
case 7 : case 7 :
// param = {'constructionPhone':this.xmsldata.constructionPhone} // param = {'constructionPhone':this.xmsldata.constructionPhone}
this.isphone(1,this.xmsldata.constructionPhone) this.isphone(2,this.xmsldata.constructionPhone)
break; break;
} }
if(this.nowedit!=6 && this.nowedit!=7) if(this.nowedit!=6 && this.nowedit!=7) {
this.editXMSL(param) this.editXMSL(param)
}
} }
this.nowedit = -1
} }
}) })
}, },
...@@ -276,8 +277,7 @@ ...@@ -276,8 +277,7 @@
this.spanWidth = 'width:'+wid this.spanWidth = 'width:'+wid
}); });
}, },
editXMSL(param){ async editXMSL(param){
this.nowedit = -1
if(this.isDisabled == true) if(this.isDisabled == true)
return false return false
if(param.projectStage){//修改项目阶段 if(param.projectStage){//修改项目阶段
...@@ -286,17 +286,17 @@ ...@@ -286,17 +286,17 @@
}else{ }else{
let params = param let params = param
params.id = this.id params.id = this.id
editXMNR(JSON.stringify(params)).then(res=>{ const res = await editXMNR(JSON.stringify(params));
if (res.code == 200){ if (res.code == 200){
if(!param.projectStage){ if(!param.projectStage){
// this.$message.success('修改成功!') // this.$message.success('修改成功!')
} }
}else{ }else{
this.$message.error(res.msg) this.$message.error(res.msg)
this.getXMSL() await this.getXMSL()
} }
}) }
} this.nowedit = -1;
}, },
//验证电话号码 //验证电话号码
isphone(type,value){ isphone(type,value){
...@@ -352,7 +352,7 @@ ...@@ -352,7 +352,7 @@
}, },
getXMSL(){ getXMSL(){
getXMSL(this.id).then(result=> { return getXMSL(this.id).then(result=> {
this.xmjd = !result.data.projectStage?'待添加':result.data.projectStage this.xmjd = !result.data.projectStage?'待添加':result.data.projectStage
if(result.data.labelList == null || result.data.labelList == "" || result.data.labelList == undefined){ if(result.data.labelList == null || result.data.labelList == "" || result.data.labelList == undefined){
this.tipslit = [] this.tipslit = []
......
...@@ -4,21 +4,21 @@ ...@@ -4,21 +4,21 @@
<div class="content_item content_item_padding0"> <div class="content_item content_item_padding0">
<div class="label">项目名称</div> <div class="label">项目名称</div>
<div class="content_right"> <div class="content_right">
<el-input class="ename_input" <el-input class="ename_input"
placeholder="请输入项目名称关键字" v-model="jskBidPlanDto.projectName" ></el-input> placeholder="请输入项目名称关键字" v-model="jskBidPlanDto.projectName" ></el-input>
</div> </div>
</div> </div>
<div class="content_item"> <div class="content_item">
<div class="label">招标单位</div> <div class="label">招标单位</div>
<div class="content_right"> <div class="content_right">
<el-input class="ename_input" <el-input class="ename_input"
placeholder="请输入招标采购单位关键字" v-model="jskBidPlanDto.tenderee" ></el-input> placeholder="请输入招标采购单位关键字" v-model="jskBidPlanDto.tenderee" ></el-input>
</div> </div>
</div> </div>
<div class="content_item"> <div class="content_item">
<div class="label">工程规模</div> <div class="label">工程规模</div>
<div class="content_right"> <div class="content_right">
<el-input class="ename_input" <el-input class="ename_input"
placeholder="请输入工程规模关键字" v-model="jskBidPlanDto.projectScale" ></el-input> placeholder="请输入工程规模关键字" v-model="jskBidPlanDto.projectScale" ></el-input>
</div> </div>
</div> </div>
...@@ -99,7 +99,7 @@ ...@@ -99,7 +99,7 @@
招标方式{{jskBidPlanDto.tenderWay.length? jskBidPlanDto.tenderWay.length + "项": ""}} 招标方式{{jskBidPlanDto.tenderWay.length? jskBidPlanDto.tenderWay.length + "项": ""}}
<i class="el-icon-caret-bottom"></i> <i class="el-icon-caret-bottom"></i>
</span> </span>
<el-select v-model="jskBidPlanDto.tenderWay" class="select-multiple" multiple placeholder="请选择"> <el-select v-model="jskBidPlanDto.tenderWay" class="select-multiple" popper-class="select-option" multiple placeholder="请选择">
<el-option v-for="(item, i) in tenderWayList" :key="i":label="item" :value="item"> <el-option v-for="(item, i) in tenderWayList" :key="i":label="item" :value="item">
</el-option> </el-option>
</el-select> </el-select>
...@@ -180,27 +180,27 @@ ...@@ -180,27 +180,27 @@
</el-option> </el-option>
</el-select> </el-select>
</div> </div>
</div> </div>
</div> </div>
<div class="content_item content_item_padding0"> <div class="content_item content_item_padding0">
<div class="geduan"> <div class="geduan">
</div> </div>
</div> </div>
<div class="content_item content_item_padding0"> <div class="content_item content_item_padding0">
<div class="search-new"> <div class="search-new">
<span @click="search()">查询</span> <span @click="search()">查询</span>
<span @click="reset">重置</span> <span @click="reset">重置</span>
</div> </div>
</div> </div>
</div> </div>
<div class="bottomlist"> <div class="bottomlist">
<div class="bottomlist-title"> <div class="bottomlist-title">
...@@ -215,7 +215,7 @@ ...@@ -215,7 +215,7 @@
<span class="excel" @click="$message({message: '功能正在开发中',type: 'warning'})">导出EXCEL</span> <span class="excel" @click="$message({message: '功能正在开发中',type: 'warning'})">导出EXCEL</span>
</p> </p>
</div> </div>
</div> </div>
<div class="table-item-jf1" v-if="tableData.length==0&& !isSkeleton"> <div class="table-item-jf1" v-if="tableData.length==0&& !isSkeleton">
<img class="item-jf-img" src="@/assets/images/kong.png" alt=""> <img class="item-jf-img" src="@/assets/images/kong.png" alt="">
...@@ -234,9 +234,9 @@ ...@@ -234,9 +234,9 @@
</span> </span>
<span class="list-label list-label-wl" v-if="item.objectType">{{item.objectType}}</span> <span class="list-label list-label-wl" v-if="item.objectType">{{item.objectType}}</span>
<span class="list-label list-label-lx" v-if="item.projectType">{{item.projectType}}</span> <span class="list-label list-label-lx" v-if="item.projectType">{{item.projectType}}</span>
</div> </div>
<div class="list-content" v-if="item.tenderee||item.planTenderAmount||item.projectCapitalSource"> <div class="list-content" v-if="item.tenderee||item.planTenderAmount||item.projectCapitalSource">
<p class="list-content-text" v-if="item.tenderee"> <p class="list-content-text" v-if="item.tenderee">
<span>招采单位:</span> <span>招采单位:</span>
...@@ -245,7 +245,7 @@ ...@@ -245,7 +245,7 @@
</span> </span>
<span v-else v-html="item.tenderee"> <span v-else v-html="item.tenderee">
</span> </span>
</span> </span>
</p> </p>
<p class="list-content-text" v-if="item.planTenderAmount"> <p class="list-content-text" v-if="item.planTenderAmount">
...@@ -256,8 +256,8 @@ ...@@ -256,8 +256,8 @@
<span>资金来源:</span> <span>资金来源:</span>
<span>{{item.projectCapitalSource||'--'}}</span> <span>{{item.projectCapitalSource||'--'}}</span>
</p> </p>
</div> </div>
<div class="list-content list-content1" v-if="item.issueTime||item.planTenderDateStart||item.sourceName"> <div class="list-content list-content1" v-if="item.issueTime||item.planTenderDateStart||item.sourceName">
<p class="list-content-text" v-if="item.issueTime"> <p class="list-content-text" v-if="item.issueTime">
...@@ -272,17 +272,17 @@ ...@@ -272,17 +272,17 @@
<span>来源网站:</span> <span>来源网站:</span>
<span >{{item.sourceName||'--'}}</span> <span >{{item.sourceName||'--'}}</span>
</p> </p>
</div> </div>
<div class="list-content list-addree" v-if="item.projectScale"> <div class="list-content list-addree" v-if="item.projectScale">
<p class="list-content-text"> <p class="list-content-text">
<span class="content-text-gc">工程规模:</span> <span class="content-text-gc">工程规模:</span>
<span class="content-text-p" v-html="item.projectScale"></span> <span class="content-text-p" v-html="item.projectScale"></span>
</p> </p>
</div> </div>
</li> </li>
</ul> </ul>
<div class="pagination clearfix" v-if="total>0&&pageFlag"> <div class="pagination clearfix" v-if="total>0&&pageFlag">
...@@ -295,7 +295,7 @@ ...@@ -295,7 +295,7 @@
:total="total>limit*500?501*limit:total"> :total="total>limit*500?501*limit:total">
</el-pagination> </el-pagination>
</div> </div>
</div> </div>
</div> </div>
</template> </template>
...@@ -378,7 +378,7 @@ export default { ...@@ -378,7 +378,7 @@ export default {
PlanTenderDateValue: "", PlanTenderDateValue: "",
PlanTenderDate: "", PlanTenderDate: "",
PlanTenderDateShowPopper: false, PlanTenderDateShowPopper: false,
addressList: [], addressList: [],
addressType: [], addressType: [],
props: { props: {
...@@ -433,16 +433,16 @@ export default { ...@@ -433,16 +433,16 @@ export default {
endIssueTime:'', endIssueTime:'',
startPlanTenderDate:'', startPlanTenderDate:'',
endPlanTenderDate:'', endPlanTenderDate:'',
}, },
planTenderAmountShowPopper:false, planTenderAmountShowPopper:false,
startPlanTenderAmount:'', startPlanTenderAmount:'',
endPlanTenderAmount:'', endPlanTenderAmount:'',
domicile: [], domicile: [],
pageFlag: true, pageFlag: true,
conditionsArr: [], conditionsArr: [],
tableData:[], tableData:[],
total:0, total:0,
page:1, page:1,
...@@ -462,7 +462,7 @@ export default { ...@@ -462,7 +462,7 @@ export default {
} }
arr.push(data) arr.push(data)
} }
if(this.jskBidPlanDto.tenderee){ if(this.jskBidPlanDto.tenderee){
data = { data = {
title: "招标单位:", title: "招标单位:",
...@@ -526,14 +526,14 @@ export default { ...@@ -526,14 +526,14 @@ export default {
} }
arr.push(data) arr.push(data)
} }
this.conditionsArr = arr this.conditionsArr = arr
}, },
}, },
mounted() { mounted() {
this.init(); this.init();
}, },
methods: { methods: {
getCapitalSourceSelect(){ getCapitalSourceSelect(){
...@@ -553,7 +553,7 @@ export default { ...@@ -553,7 +553,7 @@ export default {
keywordClick(val) { keywordClick(val) {
this.projectName = val this.projectName = val
}, },
search(page, limit,exportFlag) { search(page, limit,exportFlag) {
if (!page) { if (!page) {
this.page = 1; this.page = 1;
...@@ -598,10 +598,10 @@ export default { ...@@ -598,10 +598,10 @@ export default {
this.total=res.data.total; this.total=res.data.total;
} }
}).catch(error=>{ }).catch(error=>{
}); });
}, },
reloadPage() { reloadPage() {
this.pageFlag = false; this.pageFlag = false;
...@@ -928,7 +928,7 @@ export default { ...@@ -928,7 +928,7 @@ export default {
deleteDomicile() { deleteDomicile() {
this.$refs.address.handleClear(); this.$refs.address.handleClear();
}, },
domicileChange() { domicileChange() {
let arr = this.$refs.address.getCheckedNodes(); let arr = this.$refs.address.getCheckedNodes();
let province = [], let province = [],
...@@ -1042,10 +1042,10 @@ export default { ...@@ -1042,10 +1042,10 @@ export default {
}else{ }else{
this.$router.push({path: '/company/'+this.encodeStr(companyId)}) this.$router.push({path: '/company/'+this.encodeStr(companyId)})
} }
} }
}).catch(error=>{ }).catch(error=>{
}); });
}, },
reset() { reset() {
...@@ -1059,11 +1059,19 @@ export default { ...@@ -1059,11 +1059,19 @@ export default {
this.searchDic(); this.searchDic();
this.getCapitalSourceSelect(); this.getCapitalSourceSelect();
}, },
}, },
}; };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.select-option{
.el-select-dropdown__list{
.el-select-dropdown__item{
padding: 0 26px 0 16px;
}
}
}
.content{ .content{
padding: 0px 16px; padding: 0px 16px;
padding-top: 16px; padding-top: 16px;
...@@ -1080,7 +1088,7 @@ export default { ...@@ -1080,7 +1088,7 @@ export default {
color: rgba(35,35,35,0.8); color: rgba(35,35,35,0.8);
} }
.content_right{ .content_right{
.ename_input{ .ename_input{
width: 640px; width: 640px;
margin-right: 20px; margin-right: 20px;
...@@ -1089,12 +1097,12 @@ export default { ...@@ -1089,12 +1097,12 @@ export default {
width: 640px; width: 640px;
} }
} }
.item_ckquery_list { .item_ckquery_list {
display: flex; display: flex;
} }
.item_ckquery_list .el-input__icon { .item_ckquery_list .el-input__icon {
position: relative; position: relative;
top: 1px; top: 1px;
...@@ -1104,7 +1112,7 @@ export default { ...@@ -1104,7 +1112,7 @@ export default {
} }
.register_count_ipt{ .register_count_ipt{
margin-left: 0px; margin-left: 0px;
} }
.register_count_ipt .el-input__inner{ .register_count_ipt .el-input__inner{
width: 174px; width: 174px;
...@@ -1137,19 +1145,19 @@ export default { ...@@ -1137,19 +1145,19 @@ export default {
padding: 1px 5px !important; padding: 1px 5px !important;
} }
} }
} }
.content_item_padding0{ .content_item_padding0{
padding: 0; padding: 0;
} }
} }
.bottomlist{ .bottomlist{
width: 100%; width: 100%;
background-color: #FFFFFF; background-color: #FFFFFF;
border-radius: 4px 4px 4px 4px; border-radius: 4px 4px 4px 4px;
.bottomlist-title{ .bottomlist-title{
display: flex; display: flex;
...@@ -1187,10 +1195,10 @@ export default { ...@@ -1187,10 +1195,10 @@ export default {
cursor: pointer; cursor: pointer;
} }
} }
} }
.bottomlist-content{ .bottomlist-content{
padding-bottom: 0px; padding-bottom: 0px;
} }
.bottomlist-list{ .bottomlist-list{
...@@ -1220,33 +1228,33 @@ export default { ...@@ -1220,33 +1228,33 @@ export default {
padding: 3px 7px; padding: 3px 7px;
font-size: 12px; font-size: 12px;
margin-right: 8px; margin-right: 8px;
} }
.list-label-wl{ .list-label-wl{
background: #e8f7f0; background: #e8f7f0;
color: #38c8bf; color: #38c8bf;
} }
.list-label-lx{ .list-label-lx{
background: #e4f3fd; background: #e4f3fd;
color: #41a1fd; color: #41a1fd;
} }
} }
.list-content{ .list-content{
margin-top: 12px; margin-top: 12px;
display: flex; display: flex;
justify-content: start; justify-content: start;
align-items: center; align-items: center;
.list-content-text{ .list-content-text{
display: flex; display: flex;
justify-content: start; justify-content: start;
align-items:flex-start ; align-items:flex-start ;
margin-right: 32px; margin-right: 32px;
font-size: 14px; font-size: 14px;
span:first-child{ span:first-child{
font-weight: 400; font-weight: 400;
color: rgba(35,35,35,0.4); color: rgba(35,35,35,0.4);
...@@ -1266,12 +1274,12 @@ export default { ...@@ -1266,12 +1274,12 @@ export default {
.blue{ .blue{
color: #0081FF !important; color: #0081FF !important;
cursor: pointer; cursor: pointer;
} }
} }
} }
.list-addree{ .list-addree{
width: auto; width: auto;
...@@ -1287,20 +1295,20 @@ export default { ...@@ -1287,20 +1295,20 @@ export default {
img{ img{
width: 14px; width: 14px;
margin: 0 8px; margin: 0 8px;
} }
} }
.list-content1{ .list-content1{
margin-top: 8px; margin-top: 8px;
} }
} }
.bottomlist-list:hover{ .bottomlist-list:hover{
background: #F6F9FC; background: #F6F9FC;
cursor: pointer; cursor: pointer;
} }
.pagination{ .pagination{
padding: 14px ; padding: 14px ;
.el-pagination{ .el-pagination{
...@@ -1308,7 +1316,7 @@ export default { ...@@ -1308,7 +1316,7 @@ export default {
} }
} }
} }
</style> </style>
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<div class="content_item content_item_padding0"> <div class="content_item content_item_padding0">
<div class="label">项目名称</div> <div class="label">项目名称</div>
<div class="content_right"> <div class="content_right">
<el-input class="ename_input" <el-input class="ename_input"
placeholder="请输入项目名称关键字" v-model="landMarketDto.keyword" ></el-input> placeholder="请输入项目名称关键字" v-model="landMarketDto.keyword" ></el-input>
</div> </div>
</div> </div>
...@@ -50,7 +50,7 @@ ...@@ -50,7 +50,7 @@
</el-option> </el-option>
</el-select> </el-select>
</div> </div>
<el-dropdown @command="handleCommand" class="el-dropdown-land" placement="bottom-start" trigger="click" ref="popper" :hide-on-click="false"> <el-dropdown @command="handleCommand" class="el-dropdown-land" placement="bottom-start" trigger="click" ref="popper" :hide-on-click="false">
<span class="el-dropdown-link" :class="landMarketDto.startAcreage || landMarketDto.endAcreage? 'color_text': ''"> <span class="el-dropdown-link" :class="landMarketDto.startAcreage || landMarketDto.endAcreage? 'color_text': ''">
出让面积{{landMarketDto.startAcreage || landMarketDto.endAcreage? " 1项": ""}}<i class="el-icon-caret-bottom"></i> 出让面积{{landMarketDto.startAcreage || landMarketDto.endAcreage? " 1项": ""}}<i class="el-icon-caret-bottom"></i>
...@@ -108,7 +108,7 @@ ...@@ -108,7 +108,7 @@
</span> </span>
</el-popover> </el-popover>
</div> </div>
</div> </div>
</div> </div>
<div class="content_item"> <div class="content_item">
...@@ -161,7 +161,7 @@ ...@@ -161,7 +161,7 @@
<span :class=" contractSignTimeValue == '自定义' ? 'color_text' : ''"> <span :class=" contractSignTimeValue == '自定义' ? 'color_text' : ''">
自定义<i class="el-icon-arrow-right"></i> 自定义<i class="el-icon-arrow-right"></i>
</span> </span>
<el-date-picker v-if="contractSignTimeShowPopper"@change="changeContractSignTime" class="land_date_picker"v-model="contractSignTime" <el-date-picker v-if="contractSignTimeShowPopper"@change="changeContractSignTime" class="land_date_picker"v-model="contractSignTime"
ref="datePicker" value-format="yyyy-MM-dd" type="daterange" range-separator="至" start-placeholder="开始日期" ref="datePicker" value-format="yyyy-MM-dd" type="daterange" range-separator="至" start-placeholder="开始日期"
end-placeholder="结束日期"> end-placeholder="结束日期">
</el-date-picker> </el-date-picker>
...@@ -188,18 +188,18 @@ ...@@ -188,18 +188,18 @@
</div> </div>
<div class="content_item content_item_padding0"> <div class="content_item content_item_padding0">
<div class="geduan"> <div class="geduan">
</div> </div>
</div> </div>
<div class="content_item content_item_padding0"> <div class="content_item content_item_padding0">
<div class="search-new"> <div class="search-new">
<span @click="search()">查询</span> <span @click="search()">查询</span>
<span @click="reset">重置</span> <span @click="reset">重置</span>
</div> </div>
</div> </div>
</div> </div>
<div class="bottomlist"> <div class="bottomlist">
<div class="bottomlist-title"> <div class="bottomlist-title">
<div class="bottomlist-title-left" > <div class="bottomlist-title-left" >
...@@ -226,20 +226,20 @@ ...@@ -226,20 +226,20 @@
<span class="excel" @click="$message({message: '功能正在开发中',type: 'warning'})">导出EXCEL</span> <span class="excel" @click="$message({message: '功能正在开发中',type: 'warning'})">导出EXCEL</span>
</p> </p>
</div> </div>
</div> </div>
<div class="table-item-jf1" v-if="tableData.length==0&& !isSkeleton"> <div class="table-item-jf1" v-if="tableData.length==0&& !isSkeleton">
<img class="item-jf-img" src="@/assets/images/kong.png" alt=""> <img class="item-jf-img" src="@/assets/images/kong.png" alt="">
<div class="item-jf-titel">抱歉,没找到相关数据!</div> <div class="item-jf-titel">抱歉,没找到相关数据!</div>
<div class="item-jf-text">建议调整关键词或筛选条件,重新搜索!</div> <div class="item-jf-text">建议调整关键词或筛选条件,重新搜索!</div>
</div> </div>
<skeleton style="margin-left:16px;" v-if="isSkeleton"></skeleton> <skeleton style="margin-left:16px;" v-if="isSkeleton"></skeleton>
<ul class="bottomlist-content" v-if="tableData.length>0&& !isSkeleton"> <ul class="bottomlist-content" v-if="tableData.length>0&& !isSkeleton">
<li class="bottomlist-list" v-for="item in tableData"> <li class="bottomlist-list" v-for="item in tableData">
<p class="list-titel"> <p class="list-titel">
<router-link :to="'/radar/Land/details/'+ item.id" tag="a" class="list-titel-a" v-html="item.projectName"></router-link> <router-link :to="'/radar/Land/details/'+ item.id" tag="a" class="list-titel-a" v-html="item.projectName"></router-link>
</p> </p>
<div class="list-content" v-if="item.companyName||item.transactionPrice||item.acreage||item.acreage"> <div class="list-content" v-if="item.companyName||item.transactionPrice||item.acreage||item.acreage">
<p class="list-content-text" v-if="item.companyName"> <p class="list-content-text" v-if="item.companyName">
<span>受让人:</span> <span>受让人:</span>
...@@ -248,7 +248,7 @@ ...@@ -248,7 +248,7 @@
</span> </span>
<span v-else v-html="item.companyName"> <span v-else v-html="item.companyName">
</span> </span>
</p> </p>
<p class="list-content-text" v-if="item.transactionPrice"> <p class="list-content-text" v-if="item.transactionPrice">
<span>成交金额:</span> <span>成交金额:</span>
...@@ -300,9 +300,9 @@ ...@@ -300,9 +300,9 @@
:total="total>limit*500?501*limit:total"> :total="total>limit*500?501*limit:total">
</el-pagination> </el-pagination>
</div> </div>
</div> </div>
</div> </div>
</template> </template>
...@@ -463,7 +463,7 @@ ...@@ -463,7 +463,7 @@
contractSignTime: "", contractSignTime: "",
contractSignTimeShowPopper: false, contractSignTimeShowPopper: false,
pageFlag: true, pageFlag: true,
showList:true, showList:true,
fieldshow: false, fieldshow: false,
fieldText: '默认排序', fieldText: '默认排序',
...@@ -485,14 +485,14 @@ ...@@ -485,14 +485,14 @@
status: false, status: false,
}, },
], ],
tableData:[], tableData:[],
total:0, total:0,
page:1, page:1,
pageSize:20 pageSize:20
}; };
}, },
computed: { computed: {
checkLandMarketDto() { checkLandMarketDto() {
let arr = []; let arr = [];
...@@ -577,9 +577,9 @@ ...@@ -577,9 +577,9 @@
this.landMarketIndustryList = res.landMarketIndustry; this.landMarketIndustryList = res.landMarketIndustry;
this.landUseOptions = res.landUse this.landUseOptions = res.landUse
}).catch(error=>{ }).catch(error=>{
}); });
}, },
refresh(value) { refresh(value) {
if (value) { if (value) {
...@@ -619,9 +619,9 @@ ...@@ -619,9 +619,9 @@
this.total=res.data.total; this.total=res.data.total;
} }
}).catch(error=>{ }).catch(error=>{
}); });
}, },
//关闭支付弹窗 //关闭支付弹窗
...@@ -938,10 +938,10 @@ ...@@ -938,10 +938,10 @@
}else{ }else{
this.$router.push({path: '/company/'+this.encodeStr(companyId)}) this.$router.push({path: '/company/'+this.encodeStr(companyId)})
} }
} }
}).catch(error=>{ }).catch(error=>{
}); });
}, },
init() { init() {
...@@ -970,21 +970,21 @@ ...@@ -970,21 +970,21 @@
color: rgba(35,35,35,0.8); color: rgba(35,35,35,0.8);
} }
.content_right{ .content_right{
.ename_input{
.ename_input{ width: 640px;
width: 640px; margin-right: 20px;
margin-right: 20px; }
} .land_ipt_470 {
.land_ipt_470 { width: 640px;
width: 640px; }
}
} }
.item_ckquery_list { .item_ckquery_list {
display: flex; display: flex;
} }
.item_ckquery_list .el-input__icon { .item_ckquery_list .el-input__icon {
position: relative; position: relative;
top: 1px; top: 1px;
...@@ -994,7 +994,7 @@ ...@@ -994,7 +994,7 @@
} }
.register_count_ipt{ .register_count_ipt{
margin-left: 0px; margin-left: 0px;
} }
.register_count_ipt .el-input__inner{ .register_count_ipt .el-input__inner{
width: 174px; width: 174px;
...@@ -1027,19 +1027,19 @@ ...@@ -1027,19 +1027,19 @@
padding: 1px 5px !important; padding: 1px 5px !important;
} }
} }
} }
.content_item_padding0{ .content_item_padding0{
padding: 0; padding: 0;
} }
} }
.bottomlist{ .bottomlist{
width: 100%; width: 100%;
background-color: #FFFFFF; background-color: #FFFFFF;
border-radius: 4px 4px 4px 4px; border-radius: 4px 4px 4px 4px;
.bottomlist-title{ .bottomlist-title{
display: flex; display: flex;
...@@ -1062,7 +1062,7 @@ ...@@ -1062,7 +1062,7 @@
.title-right{ .title-right{
display: flex; display: flex;
align-items: center; align-items: center;
p:last-child{ p:last-child{
display: flex; display: flex;
align-items: center; align-items: center;
...@@ -1078,10 +1078,10 @@ ...@@ -1078,10 +1078,10 @@
cursor: pointer; cursor: pointer;
} }
} }
} }
.bottomlist-content{ .bottomlist-content{
padding-bottom: 0px; padding-bottom: 0px;
} }
.bottomlist-list{ .bottomlist-list{
...@@ -1109,20 +1109,20 @@ ...@@ -1109,20 +1109,20 @@
background: #F3F3FF; background: #F3F3FF;
color: #8491E8; color: #8491E8;
border-radius: 1px 1px 1px 1px; border-radius: 1px 1px 1px 1px;
padding: 3px 7px; padding: 3px 7px;
font-size: 12px; font-size: 12px;
} }
} }
.list-content{ .list-content{
margin-top: 3px; margin-top: 3px;
display: flex; display: flex;
justify-content: start; justify-content: start;
align-items: center; align-items: center;
.list-content-text{ .list-content-text{
margin-top: 7px; margin-top: 7px;
display: flex; display: flex;
...@@ -1130,7 +1130,7 @@ ...@@ -1130,7 +1130,7 @@
align-items: center; align-items: center;
margin-right: 32px; margin-right: 32px;
font-size: 14px; font-size: 14px;
span:first-child{ span:first-child{
font-weight: 400; font-weight: 400;
color: rgba(35,35,35,0.4); color: rgba(35,35,35,0.4);
...@@ -1144,12 +1144,12 @@ ...@@ -1144,12 +1144,12 @@
.blue{ .blue{
color: #0081FF !important; color: #0081FF !important;
cursor: pointer; cursor: pointer;
} }
} }
} }
.list-addree{ .list-addree{
width: auto; width: auto;
...@@ -1165,15 +1165,15 @@ ...@@ -1165,15 +1165,15 @@
img{ img{
width: 14px; width: 14px;
margin: 0 8px; margin: 0 8px;
} }
} }
} }
.bottomlist-list:hover{ .bottomlist-list:hover{
background: #F6F9FC; background: #F6F9FC;
} }
.pagination{ .pagination{
padding: 14px ; padding: 14px ;
...@@ -1182,6 +1182,6 @@ ...@@ -1182,6 +1182,6 @@
} }
} }
} }
</style> </style>
\ No newline at end of file
<template>
<div class="search-performance-iframe-container">
<!-- 查询tab切换 -->
<div class="search-tab-list-performance">
<div class="search-tab-item-performance" v-for="(item,index) of searchTabList" :key="index"
:class="{'current-tab-performance' : item.name == currentValue}" @click="changeCurrent(item)">
<span class="search-tab-name">{{item.name}}</span>
</div>
</div>
<iframe-com-ins ref="searchPerformanceIframeContainer" :iframeStyles="urlQueryParams.iframeStyles" :styles="urlQueryParams.styles"
:url="urlQueryParams.url"></iframe-com-ins>
</div>
</template>
<script>
import IframeComIns from "@/views/subsystem/components/IframeComIns";
import IframeTools from "@/utils/iframeTools";
import { pmb } from "@/utils/postMessageBridge";
import { interaction, router } from "@/utils/postMessageBridge/action";
export default {
name: "searchPerformanceIframeContainer",
components: {
IframeComIns
},
data() {
return {
urlQueryParams: {
url: ""
},
iframeToolsIns: {},
messageBridgeIns: {},
currentValue: "中标业绩",
searchTabList: [
{
name: "中标业绩",
value: "/performance"
},
{
name: "四库业绩",
value: "/sky"
},
{
name: "全网业绩",
value: "/zb"
},
{
name: "水利监管平台",
value: "/sljg"
},
{
name: "水利信用平台",
value: "/slxy"
},
],
observer: null
};
},
//可访问data属性
created() {
this.init();
},
beforeDestroy() {
if (this.iframeToolsIns) {
this.iframeToolsIns.clearRefreshTimer ? this.iframeToolsIns.clearRefreshTimer() : null;
}
if (this.observer) {
this.observer?.disconnect();
}
},
//计算集
computed: {
},
//方法集
methods: {
clearObserver() {
if (this.observer) {
this.observer?.disconnect();
}
this.observer = null;
},
async init() {
await this.$nextTick();
const dom = this.$refs["searchPerformanceIframeContainer"].$el.querySelector("iframe");
// 初始化iframe工具
const iframeTools = await new IframeTools(dom);
this.iframeToolsIns = iframeTools;
this.urlQueryParams = iframeTools.queryParams;
await iframeTools.initIframe(dom);
// 初始化iframe通信工具
await pmb.init({
currentSystem: window,
currentOriginUrl: location.origin,
targetSystem: iframeTools.subSystemIframe,
targetOriginUrl: process.env.VUE_APP_SUB_SYSTEM_ADDRESS,
vueIns: this
});
this.messageBridgeIns = pmb;
this.loadedInit();
},
mutationObserverFn(mutationsList) {
for (let mutation of mutationsList) {
if (mutation.attributeName === "src") {
// 当iframe的src属性发生改变时,触发该回调函数
const currentUrl = this.iframeToolsIns.subSystemIframe.src;
console.log("当前url:" + currentUrl);
break;
}
}
},
async loadedInit() {
console.log("初始化方法被调用");
// 是否需要使用iframe滚动条监听
if (this.urlQueryParams?.syncScroll) {
await interaction.syncScroll();
}
// 是否需要插件适配当前视口
if (this.urlQueryParams?.layout) {
await interaction.layoutHtml();
}
},
async changeCurrent(item) {
try {
if (this.currentValue == item.name) return;
this.currentValue = item.name;
await router.iframeToTargetRouter({
url: `/search${item.value}`
});
} catch (error) {
}
}
},
}
</script>
<style lang="scss" scoped>
.search-performance-iframe-container {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
box-sizing: border-box;
overflow: hidden;
padding: 16px 24px;
.search-tab-list-performance {
height: 51px;
display: flex;
align-items: center;
background: #fff;
box-sizing: border-box;
.search-tab-item-performance {
height: 100%;
display: flex;
justify-content: center;
align-items: center;
color: #333;
font-weight: bold;
min-width: 96px;
padding: 0px 16px;
box-sizing: border-box;
&.current-tab-performance {
color: #0081ff;
border-bottom: 2px solid #0081ff;
}
.search-tab-name {
cursor: pointer;
}
}
}
.iframe-com-ins {
height: calc(100% - 67px);
margin-top: 16px;
}
}
</style>
\ No newline at end of file
...@@ -7,6 +7,8 @@ ...@@ -7,6 +7,8 @@
<script> <script>
import IframeComIns from "./components/IframeComIns"; import IframeComIns from "./components/IframeComIns";
import IframeTools from "@/utils/iframeTools"; import IframeTools from "@/utils/iframeTools";
import { pmb } from "@/utils/postMessageBridge";
import { interaction } from "@/utils/postMessageBridge/action";
export default { export default {
name: "subsystemIframeContainer", name: "subsystemIframeContainer",
components: { components: {
...@@ -14,13 +16,16 @@ export default { ...@@ -14,13 +16,16 @@ export default {
}, },
data() { data() {
return { return {
urlQueryParams: {}, urlQueryParams: {
iframeToolsIns: {} url: ""
},
iframeToolsIns: {},
messageBridgeIns: {}
}; };
}, },
//可访问data属性 //可访问data属性
created() { created() {
this.Init(); this.init();
}, },
beforeDestroy() { beforeDestroy() {
if (this.iframeToolsIns) { if (this.iframeToolsIns) {
...@@ -33,13 +38,38 @@ export default { ...@@ -33,13 +38,38 @@ export default {
}, },
//方法集 //方法集
methods: { methods: {
async Init() { async init() {
await this.$nextTick(); await this.$nextTick();
const dom = this.$refs["subsystemIframeContainer"].$el.querySelector("iframe"); const dom = this.$refs["subsystemIframeContainer"].$el.querySelector("iframe");
const iframeTools = new IframeTools(dom); // 初始化iframe工具
const iframeTools = await new IframeTools(dom);
this.iframeToolsIns = iframeTools; this.iframeToolsIns = iframeTools;
this.urlQueryParams = iframeTools.queryParams; this.urlQueryParams = iframeTools.queryParams;
console.log(this.urlQueryParams); await iframeTools.initIframe(dom);
// 初始化iframe通信工具
await pmb.init({
currentSystem: window,
currentOriginUrl: location.origin,
targetSystem: iframeTools.subSystemIframe,
targetOriginUrl: process.env.VUE_APP_SUB_SYSTEM_ADDRESS,
vueIns: this
});
this.messageBridgeIns = pmb;
this.loadedInit();
},
async loadedInit() {
// 是否需要使用iframe滚动条监听
if (this.urlQueryParams?.syncScroll) {
await interaction.syncScroll();
}
// 是否需要插件适配当前视口
if (this.urlQueryParams?.layout) {
await interaction.layoutHtml();
}
if (this.urlQueryParams?.showConditions) {
await interaction.showConditions();
}
} }
}, },
} }
...@@ -52,5 +82,7 @@ export default { ...@@ -52,5 +82,7 @@ export default {
width: 100%; width: 100%;
height: 100%; height: 100%;
box-sizing: border-box; box-sizing: border-box;
overflow: hidden;
padding: 16px 24px;
} }
</style> </style>
...@@ -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`,//施-无线
...@@ -146,4 +146,4 @@ module.exports = { ...@@ -146,4 +146,4 @@ module.exports = {
} }
); );
} }
}; };
\ No newline at end of file
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