Commit 96ebfcd5 authored by Administrator's avatar Administrator

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

parents 0cfe563d b2c3c1df
......@@ -236,10 +236,10 @@ public class SysLoginController {
public R<Map<String, Object>> getInfo(HttpServletRequest request) {
LoginUser loginUser = LoginHelper.getLoginUser();
//校验当前发请求的IP与登录账号的IP是否相同
String loginUserIpaddr = loginUser.getIpaddr();
if (StringUtils.isNotBlank(loginUserIpaddr) && !Objects.equals(IpUtil.getIpAddr(request), loginUserIpaddr)) {
throw new ServiceException("该账号已在其他地方登录,请求失败!", 401);
}
// String loginUserIpaddr = loginUser.getIpaddr();
// if (StringUtils.isNotBlank(loginUserIpaddr) && !Objects.equals(IpUtil.getIpAddr(request), loginUserIpaddr)) {
// throw new ServiceException("该账号已在其他地方登录,请求失败!", 401);
// }
SysUser user = userService.selectUserById(loginUser.getUserId());
Map<String, Object> ajax = new HashMap<>();
ajax.put("user", user);
......
......@@ -187,7 +187,7 @@ sms:
territory: ap-guangzhou
dsk:
exportBackUrl: http://47.104.91.229:9099/prod-api/export/backUrl
exportBackUrl: http://120.46.64.239:9099/prod-api/export/backUrl
sa-token:
# 是否允许同一账号并发登录 (为true时允许一起登录, 为false时新登录挤掉旧登录)
......
......@@ -49,9 +49,9 @@ spring:
driverClassName: com.mysql.cj.jdbc.Driver
# jdbc 所有参数配置参考 https://lionli.blog.csdn.net/article/details/122018562
# rewriteBatchedStatements=true 批处理优化 大幅提升批量插入更新删除性能(对数据库有性能损耗 使用批量操作应考虑性能问题)
url: jdbc:mysql://47.104.91.229:3306/dsk_operate?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
username: dev
password: zfTFIJjaN#6xB83r
url: jdbc:mysql://120.46.64.239:3306/dsk_operate?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
username: dskdev
password: encPHwi8dbKeL8ZX
# 从库数据源
# slave:
# lazy: true
......@@ -101,7 +101,7 @@ spring:
--- # redis 单机配置(单机与集群只能开启一个另一个需要注释掉)
spring:
redis:
host: 139.9.157.49
host: 120.46.64.239
# 端口,默认为6379
port: 6379
# 数据库索引
......@@ -187,7 +187,7 @@ sms:
territory: ap-guangzhou
dsk:
exportBackUrl: http://47.104.91.229:9099/prod-api/export/backUrl
exportBackUrl: http://120.46.64.239:9099/prod-api/export/backUrl
sa-token:
# 是否允许同一账号并发登录 (为true时允许一起登录, 为false时新登录挤掉旧登录)
......
......@@ -294,6 +294,7 @@ lock4j:
--- # Actuator 监控端点的配置项
management:
endpoints:
enabled-by-default: false
web:
exposure:
include: '*'
......
package com.dsk.jsk.controller;
import cn.dev33.satoken.annotation.SaCheckPermission;
import com.alibaba.fastjson2.JSONObject;
import com.dsk.biz.utils.ExcelUtils;
import com.dsk.common.constant.Constants;
import com.dsk.common.core.controller.BaseController;
......@@ -218,4 +219,28 @@ public class JskCombineInfoController extends BaseController {
public R memberCount(@RequestBody JskCombineCountDto dto) throws Exception {
return baseService.memberCount(dto);
}
/**
* 集团户土地交易
*/
@PostMapping("/landMarket/page")
public AjaxResult landMarketPage(@RequestBody JSONObject object) {
return baseService.landMarketPage(object);
}
/**
* 集团户招标计划
*/
@PostMapping("/bidPlan/page")
public AjaxResult bidPlanPage(@RequestBody JSONObject object) {
return baseService.bidPlanPage(object);
}
/**
* 集团户拟建项目
*/
@PostMapping("/establishment/page")
public AjaxResult establishmentPage(@RequestBody JSONObject object) {
return baseService.establishmentPage(object);
}
}
......@@ -8,6 +8,7 @@ import com.dsk.common.core.domain.R;
import com.dsk.common.core.page.TableDataInfo;
import com.dsk.system.utils.DskOpenApiUtil;
import com.dsk.jsk.domain.*;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.collections4.MapUtils;
import org.slf4j.Logger;
......@@ -167,7 +168,8 @@ public class EnterpriseBussinessService {
contentMap = dskOpenApiUtil.requestBody("/mongocontent/v1/cjb/mongo_content", contentParam);
log.info("contentData:{}", JSONUtil.toJsonStr(contentMap));
} catch (Exception e) {
data.put("content", e.getMessage());
log.error("tenderDetail() error :"+e.getMessage());
data.put("content","");
map.put("data", data);
return BeanUtil.toBean(map, R.class);
}
......
......@@ -203,7 +203,8 @@ public class EnterpriseProjectService {
contentMap = dskOpenApiUtil.requestBody("/mongocontent/v1/cjb/mongo_content", contentParam);
log.info("contentData:{}", JSONUtil.toJsonStr(contentMap));
} catch (Exception e) {
data.put("content", e.getMessage());
log.error("tenderDetail() error :"+e.getMessage());
data.put("content","");
map.put("data", data);
return BeanUtil.toBean(map, R.class);
}
......
......@@ -284,4 +284,20 @@ public class JskCombineInfoService {
}
return performance;
}
public AjaxResult landMarketPage(JSONObject object) {
Map<String, Object> map = dskOpenApiUtil.requestBody("/nationzj/operate/landMarket/page", object);
return BeanUtil.toBean(map, AjaxResult.class);
}
public AjaxResult bidPlanPage(JSONObject object) {
Map<String, Object> map = dskOpenApiUtil.requestBody("/nationzj/operate/bidPlan/page", object);
return BeanUtil.toBean(map, AjaxResult.class);
}
public AjaxResult establishmentPage(JSONObject object) {
Map<String, Object> map = dskOpenApiUtil.requestBody("/nationzj/operate/establishment/page", object);
return BeanUtil.toBean(map, AjaxResult.class);
}
}
......@@ -130,4 +130,22 @@ public class ExportController {
public AjaxResult export(@RequestBody UrbanInvestmentPlatformDto dto) {
return exportService.export(dto);
}
//集团土地交易导出
@PostMapping("/combine/landMarket")
public AjaxResult exportCombineLandMarket(@RequestBody JSONObject object) {
return exportService.exportCombineLandMarket(object);
}
//集团招标计划导出
@PostMapping("/combine/bidPlan")
public AjaxResult exportCombineBidPlan(@RequestBody JSONObject object) {
return exportService.exportCombineBidPlan(object);
}
//集团拟建项目导出
@PostMapping("/combine/establishment")
public AjaxResult exportCombineEstablishment(@RequestBody JSONObject object) {
return exportService.exportCombineEstablishment(object);
}
}
......@@ -287,4 +287,52 @@ public class ExportService {
uploadComponent.upload(title, ba, Constants.SUFFIX_XLSX, Constants.CONTENT_TYPE_XLSX);
return AjaxResult.success();
}
//集团土地交易导出
public AjaxResult exportCombineLandMarket(JSONObject object) {
SysUserFileRecord fileRecord = new SysUserFileRecord();
fileRecord.setFileName(object.get("exportExeclName").toString().concat(Constants.SUFFIX_XLSX));
fileRecord.setType(1);
//生成中
fileRecord.setStatus(2);
fileRecord.setRemark("集团土地交易导出");
Long fileId = sysUserFileRecordService.exportAdd(fileRecord);
object.put("exportUniqueCode",fileId);
//回调函数
object.put("exportBackUrl",EXPORT_BACK_URL);
dskOpenApiUtil.requestBody("/operate/export/combineLandMarket", object);
return AjaxResult.success();
}
//集团招标计划导出
public AjaxResult exportCombineBidPlan(JSONObject object) {
SysUserFileRecord fileRecord = new SysUserFileRecord();
fileRecord.setFileName(object.get("exportExeclName").toString().concat(Constants.SUFFIX_XLSX));
fileRecord.setType(1);
//生成中
fileRecord.setStatus(2);
fileRecord.setRemark("集团招标计划导出");
Long fileId = sysUserFileRecordService.exportAdd(fileRecord);
object.put("exportUniqueCode",fileId);
//回调函数
object.put("exportBackUrl",EXPORT_BACK_URL);
dskOpenApiUtil.requestBody("/operate/export/combineBidPlan", object);
return AjaxResult.success();
}
//集团拟建项目导出
public AjaxResult exportCombineEstablishment(JSONObject object) {
SysUserFileRecord fileRecord = new SysUserFileRecord();
fileRecord.setFileName(object.get("exportExeclName").toString().concat(Constants.SUFFIX_XLSX));
fileRecord.setType(1);
//生成中
fileRecord.setStatus(2);
fileRecord.setRemark("集团拟建项目导出");
Long fileId = sysUserFileRecordService.exportAdd(fileRecord);
object.put("exportUniqueCode",fileId);
//回调函数
object.put("exportBackUrl",EXPORT_BACK_URL);
dskOpenApiUtil.requestBody("/operate/export/combineEstablishment", object);
return AjaxResult.success();
}
}
......@@ -29,24 +29,46 @@
where ctu.user_id = #{dto.userId} and ctu.status = #{dto.status}
<if test="dto.companyName != null and dto.companyName != '' "> and ct.company_name like concat('%',#{dto.companyName},'%')</if>
<if test="dto.isOn != null "> and ct.is_on = #{dto.isOn}</if>
<if test="dto.provinceIds != null and dto.provinceIds.size > 0 ">
and ct.province_id in
<if test="dto.provinceIds != null ">
and (ct.province_id in
<foreach collection="dto.provinceIds" item="item" open="(" separator="," close=")">
#{item}
</foreach>
<if test="dto.cityIds != null ">
or ct.city_id in
<foreach collection="dto.cityIds" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
<if test="dto.districtIds != null">
or ct.district_id in
<foreach collection="dto.districtIds" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
)
</if>
<if test="dto.cityIds != null and dto.cityIds.size > 0 ">
and ct.city_id in
<foreach collection="dto.cityIds" item="item" open="(" separator="," close=")">
#{item}
</foreach>
<if test="dto.provinceIds == null and dto.cityIds != null ">
and (ct.city_id in
<foreach collection="dto.cityIds" item="item" open="(" separator="," close=")">
#{item}
</foreach>
<if test="dto.districtIds != null">
or ct.district_id in
<foreach collection="dto.districtIds" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
)
</if>
<if test="dto.districtIds != null and dto.districtIds.size > 0 ">
<if test="dto.provinceIds == null and dto.cityIds == null and dto.districtIds != null">
and ct.district_id in
<foreach collection="dto.districtIds" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
<if test="dto.companyNatures != null and dto.companyNatures.size > 0 ">
and ct.company_nature in
<foreach collection="dto.companyNatures" item="item" open="(" separator="," close=")">
......
......@@ -37,6 +37,7 @@
"url": "https://gitee.com/y_project/RuoYi-Vue.git"
},
"dependencies": {
"@alita/chalk": "^1.1.2",
"@cell-x/el-table-sticky": "^1.0.2",
"@riophae/vue-treeselect": "0.4.0",
"@vue/composition-api": "^1.7.2",
......
......@@ -150,3 +150,22 @@ export function memberListExport(data) {
data: data
})
}
//集团商机-土地交易
export function landMarketPage(data) {
return request({
url: '/combine/info/landMarket/page',
method: 'post',
data: data
})
}
//集团商机-土地交易导出
export function landMarketExport(data) {
return request({
url: '/export/combine/landMarket',
method: 'post',
data: data
})
}
<template>
<div class="dsk-skeleton-outer-container">
<el-skeleton :animated="true" class="dsk-skeleton-inner-container">
<template slot="template">
<template v-for="item of count">
<div :key="item">
<el-skeleton-item variant="text" style="width: 60%;" />
<el-skeleton-item variant="text" style="width: 100%;" />
<el-skeleton-item variant="text" style="width: 100%;" />
<el-skeleton-item variant="text" style="width: 100%;" />
</div>
</template>
</template>
</el-skeleton>
</div>
</template>
<script>
export default {
name: 'dskSkeleton',
data() {
return {
count: 0
};
},
created() {
this.getSkeletonCount();
},
methods: {
async getSkeletonCount() {
try {
await this.$nextTick();
const skeletonContainer = this.$el.querySelector(".dsk-skeleton-inner-container");
const height = skeletonContainer.offsetHeight;
// 160高度为一组
const group = Math.round(height / 160);
this.count = group;
} catch (error) {
}
}
}
}
</script>
<style lang="scss" scoped>
.dsk-skeleton-outer-container {
padding: 0px 16px;
background: #fff;
z-index: 999;
.dsk-skeleton-inner-container {
width: 100%;
height: 100%;
overflow: hidden;
}
}
.el-skeleton__item {
height: 20px;
border-radius: 0;
margin-top: 16px;
background: #f0f0f0;
}
.el-skeleton {
.el-skeleton__item:last-of-type {
/* margin-bottom: 16px; */
}
}
</style>
......@@ -9,11 +9,11 @@
</el-menu-item>
</app-link>
</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">
<item v-if="item.meta" :icon="sideIcon(item)" :title="item.meta.title" />
</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" />
</el-submenu>
</template>
......@@ -80,7 +80,7 @@ export default {
default: false
},
basePath: {
type: String,
type: [String],
default: ''
},
activeMenu: {
......
<template>
<div :class="{'has-logo':showLogo}" @mouseenter="sideEnter" @mouseleave="sideLeave" :style="{ backgroundColor: settings.sideTheme === 'theme-dark' ? variables.menuBackground : variables.menuLightBackground }">
<logo v-if="showLogo" :collapse="isCollapse" />
<el-scrollbar :class="settings.sideTheme" wrap-class="scrollbar-wrapper">
<el-menu
:default-active="activeMenu"
:collapse="isCollapse"
:background-color="variables.menuBg"
:text-color="variables.menuText"
:unique-opened="true"
:active-text-color="settings.theme"
:collapse-transition="false"
mode="vertical"
>
<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 :class="{'has-logo':showLogo}" @mouseenter="sideEnter" @mouseleave="sideLeave"
:style="{ backgroundColor: settings.sideTheme === 'theme-dark' ? variables.menuBackground : variables.menuLightBackground }">
<logo v-if="showLogo" :collapse="isCollapse" />
<el-scrollbar :class="settings.sideTheme" wrap-class="scrollbar-wrapper">
<el-menu :default-active="activeMenu" :collapse="isCollapse" :background-color="variables.menuBg" :text-color="variables.menuText"
:unique-opened="true" :active-text-color="settings.theme" :collapse-transition="false" mode="vertical">
<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>
</template>
<script>
......@@ -40,69 +24,70 @@ import variables from "@/assets/styles/variables.scss";
export default {
components: { SidebarItem, Logo },
data() {
return {
isExpand: false
}
},
computed: {
...mapState(["settings"]),
...mapGetters(["sidebarRouters", "sidebar"]),
hidechildren(){
return this.sidebarRouters.map(item=>{
if(item.children?.length){
item.children = item.children.filter(i=>{
if (typeof (i.hidden) == 'boolean' && i.hidden == false || i.path == "index"){
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;
components: { SidebarItem, Logo },
data() {
return {
isExpand: false
};
},
computed: {
...mapState(["settings"]),
...mapGetters(["sidebarRouters", "sidebar"]),
hidechildren() {
const resultArray = this.sidebarRouters.map(item => {
if (item.children?.length) {
item.children = item.children.filter(i => {
if (typeof (i.hidden) == 'boolean' && i.hidden == false || i.path == "index") {
return i;
}
return path;
},
device() {
return this.$store.state.app.device
},
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;
},
});
}
return item;
});
return JSON.parse(JSON.stringify(resultArray));
},
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 this.$store.state.app.device;
},
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>
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';
......@@ -87,9 +87,11 @@ Vue.use(Element, {
Vue.config.productionTip = false;
new Vue({
const vueIns = new Vue({
el: '#app',
router,
store,
render: h => h(App)
});
export default vueIns;
......@@ -2,7 +2,7 @@
* @Author: thy
* @Date: 2023-11-08 09:28:17
* @LastEditors: thy
* @LastEditTime: 2023-11-28 16:04:07
* @LastEditTime: 2023-12-01 15:31:33
* @Description: file content
* @FilePath: \dsk-operate-ui\src\utils\iframeTools.js
*/
......@@ -10,6 +10,8 @@
import { dskAccessToken } from '@/api/common';
import { getUrlSearchQuery, isUrl, paramsToQuery } from "@/utils/";
import { Message } from "element-ui";
import chalk from "@alita/chalk";
window.alitadebug = true;
/**
......@@ -24,13 +26,15 @@ class IframeTools {
authToken = "";
origin = location.origin;
isOuter = false;
iframeLoaded = false;
isAutoInit = false;
/**
* 插件域名地址
* @param {string} pluginDomain 默认当前环境变量VUE_APP_SUB_SYSTEM_ADDRESS
* @param {HTMLIFrameElement} subSystemIframe 子系统iframe dom节点
* @returns
*/
constructor(subSystemIframe, pluginDomain = process.env.VUE_APP_SUB_SYSTEM_ADDRESS) {
constructor(subSystemIframe, pluginDomain = process.env.VUE_APP_SUB_SYSTEM_ADDRESS, isAutoInit = false) {
return new Promise(async (resolve, reject) => {
try {
const query = getUrlSearchQuery();
......@@ -44,11 +48,13 @@ class IframeTools {
this.subSystemIframe = subSystemIframe;
// 是否外部打开
this.isOuter = query.isOuter && typeof JSON.parse(query.isOuter) == "boolean" ? JSON.parse(query.isOuter) : false;
// 是否自动初始化iframe
this.isAutoInit = isAutoInit;
// 是一个合法地址 初始化 先替换域名地址 再获取令牌并 拼接
await this.init();
resolve(this);
} catch (error) {
reject(error)
reject(error);
}
});
}
......@@ -82,7 +88,12 @@ class IframeTools {
url = `${url}${paramsToQuery(query) ? "?" + paramsToQuery(query) : ""}`;
this.queryParams.url = 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);
}
} catch (error) {
......@@ -91,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
*/
......
import Interaction from "./interaction";
import Router from "./router";
import Interaction from "@/utils/postMessageBridge/action/interaction";
import Router from "@/utils/postMessageBridge/action/router";
export default {
"interaction": new Interaction(),
"router": new 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 }
});
}
}
......
import { pmb } from "../bridge";
let _this = null;
class Router {
actionName = "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
......@@ -2,12 +2,15 @@
* @Author: thy
* @Date: 2023-11-28 18:09:11
* @LastEditors: thy
* @LastEditTime: 2023-11-29 10:48:22
* @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;
/**
* 事件回调 调度中心
......@@ -15,9 +18,10 @@ import { v4 } from "uuid";
class EventCenter {
//事件回调储存栈
_eventHandlerMap = new Map();
constructor() {
_vueIns = null;
constructor(vueIns) {
vueIns ? this._vueIns = vueIns : null;
process.env.ENV != "production" ? chalk.ready(chalk.bgGreen("事件调度中心初始化完毕")) : null;
}
/**
......@@ -34,7 +38,7 @@ class EventCenter {
*/
registerHandler(promiseCallBack) {
return new Promise((resolve, reject) => {
if (Object.prototype.toString.call(promiseCallBack) !== "[object Promise]") return console.warn("传入的回调类型不是一个promise实例");
if (Object.prototype.toString.call(promiseCallBack) !== "[object Function]") return console.warn("传入的回调类型不是一个函数");
const uid = v4();
this._eventHandlerMap.set(uid, promiseCallBack);
resolve(uid);
......@@ -53,15 +57,19 @@ class EventCenter {
* 根据回调ID 执行事件回调储存中的回调 并卸载
* @param {string} handlerId
*/
executeHandler(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);
}
});
}
......
......@@ -2,15 +2,15 @@
* @Author: thy
* @Date: 2023-10-26 14:56:41
* @LastEditors: thy
* @LastEditTime: 2023-11-29 17:54:47
* @LastEditTime: 2023-12-07 15:41:56
* @Description: file content
* @FilePath: \dsk-operate-ui\src\utils\postMessageBridge\bridge\index.js
*/
import EventCenter from "./eventCenter";
import action from "@/utils/postMessageBridge/action";
import { normalToPromise } from "@/utils/postMessageBridge/tools";
import { messageHandlers } from "@/utils/postMessageBridge/action";
import chalk from "@alita/chalk";
window.alitadebug = true;
class PostMessageBridge {
// 当前系统
......@@ -23,49 +23,55 @@ class PostMessageBridge {
_targetOriginUrl = null;
// 事件调度中心
_eventCenter = null;
// 触发的行为
_actionMap = null;
// 当前vue实例
_vueIns = null;
// 处理函数
_messageHandlers = null;
//通信是否建立成功
_communication = false;
constructor() { }
/**
*
* @param {{
* currentSystem : Window || undefined;
* currentOriginUrl : string;
* targetSystem : Window || undefined;
* targetOriginUrl : string || undefined;
* vueIns : any;
* }} options
*/
constructor(options) {
return new Promise(async (resolve, reject) => {
try {
this._currentSystem = options.currentSystem;
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) {
reject(error);
}
});
}
/**
* 通信初始化
*/
async init() {
* currentSystem : Window || undefined;
* currentOriginUrl : string;
* targetSystem : Window || undefined;
* targetOriginUrl : string || undefined;
* vueIns : any;
* }} options
*/
async init(options) {
try {
this._eventCenter = new EventCenter();
this._actionMap = action;
this._currentSystem.addEventListener("message", this.messageListener, false);
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
......@@ -75,18 +81,76 @@ class PostMessageBridge {
new Promise(async (resolve, reject) => {
try {
const { data, origin, source } = event;
if (origin !== this._currentOriginUrl) return;
const { id, action, methodName, params } = data;
if (!id) return;
// promise化
const result = await normalToPromise(this._actionMap[action][methodName])(params);
resolve(result);
// 判断来源 必须 来自子系统
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
*/
async publish(options, callback) {
if (!options || !callback) return;
if (!options.action) throw new Error("缺少action参数");
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 {string} action 执行的模块
* @param {string} method 执行的方法
* @param {Object} params 参数
* @returns
*/
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);
}
}
}
// 单例模式
export const pmb = new PostMessageBridge();
export default PostMessageBridge;
\ No newline at end of file
export { default as PostMessageBridge } from "./bridge";
\ No newline at end of file
export { default as PostMessageBridge, pmb } from "./bridge";
\ No newline at end of file
......@@ -5,13 +5,15 @@
*/
export const normalToPromise = (fn) => {
const tag = Object.prototype.toString.call(fn);
if (tag !== "[object Function]" || tag !== "[object AsyncFunction]") return fn;
if (tag !== "[object Function]" && tag !== "[object AsyncFunction]") return fn;
return (...args) => {
try {
const result = fn(...args);
return Promise.resolve(result);
} catch (error) {
return Promise.reject(error);
}
return new Promise((resolve, reject) => {
try {
const result = fn(...args);
resolve(result);
} catch (error) {
reject(error);
}
});
};
};
\ No newline at end of file
......@@ -150,7 +150,7 @@ export default {
},
handleClear() {
if(this.isClear && this.isHover) {
this.value = ''
this.value = '';
this.pickerValue = []
this.$emit('input', '')
this.$emit('handle-search')
......
......@@ -93,7 +93,9 @@ export default {
},
methods: {
handleEXCEL(){
this.loading = true;
if(this.value <= 2000){
this.loading = true;
}
this.$nextTick(() => {
this.$emit('clickEXCEL',this.value,this.title)
})
......
......@@ -16,7 +16,13 @@
class="detail-menu"
@open="handleOpen">
<template v-for="(item, index) in sideRoute">
<template>
<el-submenu :index="index.toString()" v-if="item.children">
<template slot="title">
<span>{{item.title}}</span>
</template>
<el-menu-item :index="index+'-'+idx" v-for="(it, idx) in item.children" :key="idx" @click="handleItem(it)">{{it.title}}</el-menu-item>
</el-submenu>
<template v-else>
<el-menu-item :index="index.toString()" :disabled="item.disabled" @click="handleItem(item)">{{item.title}}</el-menu-item>
</template>
</template>
......@@ -56,6 +62,20 @@ export default {
sideRoute: [
{title: '集团成员', pathName: 'members'},
{title: '集团资质', pathName: 'qualifications'},
{title: '集团商机', pathName: '', children: [
{ title: '土地交易', pathName: 'landtransaction' },
]
},
{title: '集团业绩', pathName: 'performance'},
{title: '集团招标', pathName: 'zhaobiao'},
],
sideRoute1: [
{title: '集团成员', pathName: 'members'},
{title: '集团资质', pathName: 'qualifications'},
{title: '集团商机', pathName: '', children: [
{ title: '土地交易', pathName: 'landtransaction' },
]
},
{title: '集团业绩', pathName: 'performance'},
{title: '集团招标', pathName: 'zhaobiao'},
],
......@@ -63,6 +83,7 @@ export default {
customer:[
'members',
'qualifications',
'landtransaction',
'performance',
'zhaobiao',
],
......@@ -128,7 +149,21 @@ export default {
},
handleItem(item){
this.$emit("currentPath", item)
let obj = item;
for (var i in this.sideRoute1) {
if (this.sideRoute1[i].children) {
for (var j in this.sideRoute1[i].children) {
if (item.title == this.sideRoute1[i].children[j].title) {
obj.pathName = this.sideRoute1[i].children[j].pathName;
}
}
} else {
if (item.title == this.sideRoute1[i].title) {
obj.pathName = this.sideRoute1[i].pathName;
}
}
}
this.$emit("currentPath", obj)
},
handleSearch(flag){
if((this.searchText&&!flag) || (!this.searchText&&flag)){
......
......@@ -387,14 +387,14 @@
}
}
if(key === '2'){
this.queryParams.maxStockPercent=''
// this.paramsData.maxStockPercent=''
if(name === this.cgblName){
this.cgblName=''
this.queryParams.minStockPercent=''
this.queryParams.maxStockPercent=''
}else {
this.cgblName=name;
}
this.queryParams.maxStockPercent=''
this.paramsData.maxStockPercent=''
if(this.cgblName){
if(name === '100%'){
this.queryParams.minStockPercent=1
}
......@@ -411,14 +411,11 @@
this.queryParams.minStockPercent=0.01
this.queryParams.maxStockPercent=0.05
}
}else {
this.queryParams.minStockPercent=''
this.queryParams.maxStockPercent=''
}
if(this.paramsData){
if(!this.paramsData.combineId){
this.paramsData=this.queryParams
}
// if(!this.paramsData.combineId){
this.paramsData=this.queryParams
// }
this.paramsData.pageNum =1
this.queryParams.pageNum =1
}
......
......@@ -14,6 +14,7 @@
<div id="groupBox" v-if="customerId">
<Members v-if="currentPath.pathName=='members'" @handle-scroll="scrollToTop" :customer-id="customerId" :isSkeleton="isSkeleton" :combineName="name"/>
<Qualifications v-if="currentPath.pathName=='qualifications'" @handle-scroll="scrollToTop" :customer-id="customerId" :isSkeleton="isSkeleton" :combineName="name"/>
<Landtransaction v-if="currentPath.pathName=='landtransaction'" @handle-scroll="scrollToTop" :customer-id="customerId" :isSkeleton="isSkeleton" :combineName="name"/>
<Performance v-if="currentPath.pathName=='performance'" @handle-scroll="scrollToTop" :customer-id="customerId" :isSkeleton="isSkeleton" :combineName="name"/>
<Zhaobiao v-if="currentPath.pathName=='zhaobiao'" @handle-scroll="scrollToTop" :customer-id="customerId" :isSkeleton="isSkeleton" :combineName="name"/>
</div>
......@@ -27,6 +28,7 @@
import SideBar from "./component/Sidebar"
import Members from "./component/members"
import Qualifications from "./component/qualifications"
import Landtransaction from "./component/landtransaction"
import Performance from "./component/performance"
import Zhaobiao from "./component/zhaobiao"
import { infoHeader } from '@/api/detail/party-a/index'
......@@ -34,7 +36,7 @@
export default {
name: 'GroupAccount',
components:{
SideBar,Members,Qualifications,Performance,Zhaobiao
SideBar,Members,Qualifications,Landtransaction,Performance,Zhaobiao
},
data(){
return{
......@@ -85,6 +87,8 @@
<style lang="scss" scoped>
.group-container{
padding: 0;
margin-top: 0;
margin-bottom: 0;
}
.group-main{
margin-top: 12px;
......
......@@ -178,6 +178,14 @@ export default {
startTime = new Date(endTime.getTime() - 3600 * 1000 * 24 * 15)
timeStr = [this.formatDate(startTime), this.formatDate(endTime)]
break;
case '近1个月':
startTime = new Date(endTime.getTime() - 3600 * 1000 * 24 * 30)
timeStr = [this.formatDate(startTime), this.formatDate(endTime)]
break;
case '近半年':
startTime = new Date(endTime.getTime() - 3600 * 1000 * 24 * 180)
timeStr = [this.formatDate(startTime), this.formatDate(endTime)]
break;
case '近1年':
startTime = new Date().setFullYear(new Date().getFullYear() - 1)
if(this.dateTo){
......
......@@ -64,6 +64,16 @@
<el-cascader :class="[`select-adaptive-${form.uid}`]" ref="cascader" :options="form.options" :props="form.props" v-model="form.value"
@change="iptAdaptive(form.uid,true)" :placeholder="form.placeholder" collapse-tags clearable></el-cascader>
</template>
<!-- 出让面积、自定义 -->
<template v-else-if="form.type==8">
<start-acreage-select :class="[`select-adaptive-${form.uid}`,'custom-select']" :startAcreageList="form.startAcreageList" v-model="form.value"
:placeholder="form.placeholder" @handle-search="iptAdaptive(form.uid)" />
</template>
<!-- 金额 (集团户详情)-->
<template v-else-if="form.type==9">
<group-money-select :class="[`select-adaptive-${form.uid}`,'custom-select']" :moneyList="form.moneyList" v-model="form.value"
:placeholder="form.placeholder" @handle-search="iptAdaptive(form.uid)" />
</template>
<!-- 自定义 -->
<template v-if="form.type==0">
<slot name="slot"></slot>
......@@ -78,7 +88,7 @@
</template>
<div v-else class="flex-box">
<span class="flex-box ability-total" v-if="isTotal">共有{{ total }}条</span>
<span class="flex-box ability-excel" v-hasPermi="['combine:info:export:win:bid','combine:info:export:bid']" v-if="isExcel && title ==='集团业绩'|| title ==='集团招标' "
<span class="flex-box ability-excel" v-hasPermi="['combine:info:export:win:bid','combine:info:export:bid']" v-if="isExcel && title ==='集团业绩'|| title ==='集团招标' || title ==='土地交易明细'"
@click="clickEXCEL"><img src="@/assets/images/ability_excel.png">导出EXCEL</span>
<span class="flex-box ability-excel" v-else @click="clickEXCEL"><img src="@/assets/images/ability_excel.png">导出EXCEL</span>
</div>
......@@ -90,6 +100,8 @@
<script>
import CustomTimeSelect from './CustomTimeSelect';
import CustomMoneySelect from './CustomMoneySelect';
import GroupMoneySelect from './GroupMoneySelect';
import StartAcreageSelect from './StartAcreageSelect';
import gsap from "gsap";
export default {
name: "HeadForm",
......@@ -127,9 +139,18 @@ export default {
default: false
}
},
watch: {
formData: {
handler(newValue) {
this.comFormData = newValue;
},
deep: true
}
},
data() {
return {
showSearchBox: false
showSearchBox: false,
comFormData: this.formData
};
},
created() {
......@@ -137,7 +158,9 @@ export default {
},
components: {
CustomTimeSelect,
CustomMoneySelect
CustomMoneySelect,
StartAcreageSelect,
GroupMoneySelect
},
methods: {
searchFocus(event, formData) {
......@@ -244,7 +267,7 @@ export default {
textContainer.remove();
});
dom.style.setProperty("width", `${width + 60}px`);
this.$emit('handle-search');
this.$emit('handle-search', this.comFormData);
return;
}
textContainer.style.setProperty("visibility", "hidden");
......@@ -257,7 +280,7 @@ export default {
let containerWidth = textContainer.offsetWidth + 12 + 8;
textContainer.remove();
dom.style.setProperty("width", `${containerWidth}px`);
this.$emit('handle-search');
this.$emit('handle-search', this.comFormData);
}
} catch (error) {
......@@ -287,16 +310,16 @@ export default {
textContainer.remove();
dom.style.setProperty("width", `${containerWidth}px`);
}
this.$emit('handle-search');
this.$emit('handle-search', this.comFormData);
} catch (error) {
}
},
changeSelect(e) {
this.$emit('handle-search');
this.$emit('handle-search', this.comFormData);
},
clickEXCEL() {
if (this.title === '集团业绩' || this.title === '集团招标' || this.title === '集团成员') {
if (this.title === '集团业绩' || this.title === '集团招标' || this.title === '集团成员'|| this.title === '土地交易明细') {
this.$emit('handle-excel');
} else {
this.$message({
......
......@@ -39,7 +39,7 @@ export default {
},
defaultSort: {},
forData: [
{ label: '项目名称', prop: 'projectAllName', minWidth: '560', slot: true },
{ label: '项目名称', prop: 'projectAllName', minWidth: '560', slot: true, fixed: "left" },
{ label: '中标时间', prop: 'winBidTime', minWidth: '100', sortable: 'custom', descending: '3', ascending: '4' },
{ label: '中标企业', prop: 'companyName', minWidth: '320', slot: true },
{ label: '中标金额(万元)', prop: 'winBidAmount', minWidth: '140', sortable: 'custom', descending: '1', ascending: '2' },
......
......@@ -193,7 +193,9 @@ export default {
status: undefined,
},
// 表单参数
form: {},
form: {
dateRange:[],
},
// 表单校验
rules: {
contactPhone: [
......@@ -302,7 +304,7 @@ export default {
// 表单重置
reset() {
this.form = {
dateRange: undefined,
dateRange: [],
id: undefined,
tenantId: undefined,
contactUserName: undefined,
......@@ -312,7 +314,7 @@ export default {
accountCount: undefined,
status: "0",
};
this.resetForm("form");
// this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
......@@ -321,7 +323,7 @@ export default {
},
/** 重置按钮操作 */
resetQuery() {
this.dateRange = [];
this.form.dateRange = [];
this.resetForm("queryForm");
this.handleQuery();
},
......@@ -364,7 +366,7 @@ export default {
const id = row.id;
this.getpack();
getTenant(id).then(response => {
this.form = response.data;
this.form = {...this.form,...response.data};
this.form.dateRange = [response.data.startTime, response.data.expireTime];
this.open = true;
this.title = this.disabled == true ? '查看企业' : "修改企业";
......
......@@ -1435,63 +1435,87 @@ export default {
handleUrl(item){
switch (item.name) {
case '项目管理':
if(this.permissions.includes('project:info')){
if(this.permissions.includes('*:*:*')){
this.$router.push({ path: item.url })
}else {
this.$message({
message: '您好,请联系管理员开通页面权限',
type: 'warning'
});
if(this.permissions.includes('project:info')){
this.$router.push({ path: item.url })
}else {
this.$message({
message: '您好,请联系管理员开通页面权限',
type: 'warning'
});
}
}
break;
case '客户管理':
if(this.permissions.includes('customer:info')){
if(this.permissions.includes('*:*:*')){
this.$router.push({ path: item.url })
}else {
this.$message({
message: '您好,请联系管理员开通页面权限',
type: 'warning'
});
if(this.permissions.includes('customer:info')){
this.$router.push({ path: item.url })
}else {
this.$message({
message: '您好,请联系管理员开通页面权限',
type: 'warning'
});
}
}
break;
case '全国经济大全':
if(this.permissions.includes('nationalEconomies:query')){
if(this.permissions.includes('*:*:*')){
this.$router.push({ path: item.url })
}else {
this.$message({
message: '您好,请联系管理员开通页面权限',
type: 'warning'
});
if(this.permissions.includes('nationalEconomies:query')){
this.$router.push({ path: item.url })
}else {
this.$message({
message: '您好,请联系管理员开通页面权限',
type: 'warning'
});
}
}
break;
case '集团户':
if(this.permissions.includes('group:query')){
if(this.permissions.includes('*:*:*')){
this.$router.push({ path: item.url })
}else {
this.$message({
message: '您好,请联系管理员开通页面权限',
type: 'warning'
});
if(this.permissions.includes('group:query')){
this.$router.push({ path: item.url })
}else {
this.$message({
message: '您好,请联系管理员开通页面权限',
type: 'warning'
});
}
}
break;
case '查城投平台':
if(this.permissions.includes('owner:query')){
if(this.permissions.includes('*:*:*')){
this.$router.push({ path: item.url })
}else {
this.$message({
message: '您好,请联系管理员开通页面权限',
type: 'warning'
});
if(this.permissions.includes('owner:query')){
this.$router.push({ path: item.url })
}else {
this.$message({
message: '您好,请联系管理员开通页面权限',
type: 'warning'
});
}
}
break;
case '商机雷达':
if(this.permissions.includes('radar:query')){
if(this.permissions.includes('*:*:*')){
this.$router.push({ path: item.url })
}else {
this.$message({
message: '您好,请联系管理员开通页面权限',
type: 'warning'
});
if(this.permissions.includes('radar:query')){
this.$router.push({ path: item.url })
}else {
this.$message({
message: '您好,请联系管理员开通页面权限',
type: 'warning'
});
}
}
break;
default:
......
......@@ -21,7 +21,7 @@
<img class="img" slot="prefix" src="../assets/images/phone.png"/>
</el-input>
</el-form-item>
<el-form-item prop="captchaCode" v-if="captchaEnabled">
<el-form-item prop="captchaCode" v-if="captchaEnabled" class="el-item-with-code">
<el-input
v-model="dxform.captchaCode"
auto-complete="off"
......@@ -34,7 +34,7 @@
<img :src="codeUrl" @click="getCode" class="login-code-img"/>
</div>
</el-form-item>
<el-form-item prop="smsCode">
<el-form-item prop="smsCode" class="el-item-with-code">
<el-input
v-model="dxform.smsCode"
auto-complete="off"
......@@ -87,7 +87,7 @@
<img class="img" slot="prefix" src="../assets/images/password.png"/>
</el-input>
</el-form-item>
<el-form-item prop="code" v-if="captchaEnabled">
<el-form-item prop="code" v-if="captchaEnabled" class="el-item-with-code">
<el-input
v-model="loginForm.code"
auto-complete="off"
......@@ -127,7 +127,7 @@
<img class="img" slot="prefix" src="../assets/images/phone.png"/>
</el-input>
</el-form-item>
<el-form-item prop="captchaCode" v-if="captchaEnabled && showcode">
<el-form-item prop="captchaCode" v-if="captchaEnabled && showcode" class="el-item-with-code">
<el-input
v-model="dxform.captchaCode"
@focus="getCode"
......@@ -141,7 +141,7 @@
<img :src="codeUrl" @click="getCode" class="login-code-img"/>
</div>
</el-form-item>
<el-form-item prop="smsCode">
<el-form-item prop="smsCode" class="el-item-with-code">
<el-input
v-model="dxform.smsCode"
auto-complete="off"
......@@ -633,4 +633,60 @@
background: #566380;
}
}
@media screen and (max-width : 750px){
.left {
display: none;
}
.login-form {
width: 90%;
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%,-50%);
margin-top: 0px;
box-sizing: border-box;
box-shadow: 0 2px 4px rgba(0, 0, 0, .12), 0 0 6px rgba(0, 0, 0, .04);
.el-input {
width: 100%;
.el-input__inner::placeholder {
font-size: 12px !important;
}
}
.el-item-with-code {
.el-form-item__content {
display: flex;
line-height: 1;
.el-input {
float: unset !important;
width: 175px !important;
min-width: 175px;
}
.login-code {
height: 48px;
width: auto;
flex: 1;
float: unset !important;
&>img {
width: 100%;
height: 100%;
}
.hqyzm {
width: 100%;
font-size: 12px;
border: unset;
border-radius: unset;
}
}
}
}
}
}
</style>
......@@ -94,9 +94,10 @@ export default {
}
},
created() {
this.getData();
getYears({}).then(res => {
this.yearOptions=res.data.reverse();
this.queryParams.year=this.yearOptions[0].year;
this.getData();
})
},
methods: {
......
......@@ -157,7 +157,6 @@
}
},
created() {
this.querySubmit()
this.dataRegion()
this.getYears()
},
......@@ -171,7 +170,8 @@
getYears(){
getYears({}).then(res => {
this.yearOptions=res.data.reverse();
this.queryParams.year=this.yearOptions[0].year
this.queryParams.year=this.yearOptions[0].year;
this.querySubmit()
})
},
//地区
......
......@@ -352,7 +352,8 @@
],
page: 1,
limit: 20,
acreageOptions: [{
acreageOptions: [
{
value: "不限",
label: "不限",
},
......@@ -385,7 +386,8 @@
label: "10万平以上",
},
],
transactionPriceOptions: [{
transactionPriceOptions: [
{
value: "不限",
label: "不限",
},
......
......@@ -22,11 +22,6 @@ export default {
url: {
type: String,
default: ""
},
// 100%模式
layout: {
type: Boolean,
default: false
}
},
watch: {
......
<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>
<div class="iframe-com-ins-container">
<iframe-com-ins ref="searchPerformanceIframeContainer" :iframeStyles="urlQueryParams.iframeStyles" :styles="urlQueryParams.styles"
:url="urlQueryParams.url"></iframe-com-ins>
<DskSkeleton v-if="loading"></DskSkeleton>
</div>
</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";
import DskSkeleton from "@/components/DskSkeleton";
export default {
name: "searchPerformanceIframeContainer",
components: {
IframeComIns,
DskSkeleton
},
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,
loading: true
};
},
//可访问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() {
this.loading = true;
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();
}
this.loading = false;
},
async changeCurrent(item) {
try {
if (this.currentValue == item.name) return;
this.loading = true;
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-container {
position: relative;
height: calc(100% - 67px);
margin-top: 16px;
}
.dsk-skeleton-outer-container {
position: absolute;
left: 0px;
top: 0px;
width: 100%;
height: 100%;
z-index: 999;
}
.iframe-com-ins {
height: 100%;
}
}
</style>
\ No newline at end of file
<template>
<div class="subsystem-iframe-container">
<iframe-com-ins ref="subsystemIframeContainer" :iframeStyles="urlQueryParams.iframeStyles" :styles="urlQueryParams.styles"
:url="urlQueryParams.url" :layout="urlQueryParams.layout"></iframe-com-ins>
:url="urlQueryParams.url"></iframe-com-ins>
</div>
</template>
<script>
import IframeComIns from "./components/IframeComIns";
import IframeTools from "@/utils/iframeTools";
import { PostMessageBridge } from "@/utils/postMessageBridge";
import { pmb } from "@/utils/postMessageBridge";
import { interaction } from "@/utils/postMessageBridge/action";
export default {
name: "subsystemIframeContainer",
components: {
......@@ -15,7 +16,9 @@ export default {
},
data() {
return {
urlQueryParams: {},
urlQueryParams: {
url: ""
},
iframeToolsIns: {},
messageBridgeIns: {}
};
......@@ -40,19 +43,33 @@ export default {
const dom = this.$refs["subsystemIframeContainer"].$el.querySelector("iframe");
// 初始化iframe工具
const iframeTools = await new IframeTools(dom);
console.dir(iframeTools);
this.iframeToolsIns = iframeTools;
this.urlQueryParams = iframeTools.queryParams;
await iframeTools.initIframe(dom);
// 初始化iframe通信工具
const messageBridge = await new PostMessageBridge({
await pmb.init({
currentSystem: window,
currentOriginUrl : location.origin,
targetSystem: iframeTools.subSystemIframe?.contentWindow,
targetOriginUrl: process.env.VUE_APP_SUB_SYSTEM_ADDRESS
currentOriginUrl: location.origin,
targetSystem: iframeTools.subSystemIframe,
targetOriginUrl: process.env.VUE_APP_SUB_SYSTEM_ADDRESS,
vueIns: this
});
console.log(messageBridge);
this.messageBridgeIns = messageBridge;
this.iframeToolsIns = iframeTools;
this.urlQueryParams = iframeTools.queryParams;
console.log(this.urlQueryParams);
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();
}
}
},
}
......@@ -66,5 +83,6 @@ export default {
height: 100%;
box-sizing: border-box;
overflow: hidden;
padding: 16px 24px;
}
</style>
......@@ -285,7 +285,7 @@ public class SysConfigServiceImpl implements ISysConfigService, ConfigService {
dskAccessTokenDto.put("appKey", appkey);
dskAccessTokenDto.put("appSecret", appSecret);
String post = HttpUtil.post(domain + accessTokenAPI, JsonUtils.toJsonString(dskAccessTokenDto));
String post = HttpUtil.post("https://"+domain + accessTokenAPI, JsonUtils.toJsonString(dskAccessTokenDto));
Assert.notEmpty(post, "大司空数据accessTokenAPI响应异常");
log.info("大司空数据accessToken API响应:" + post);
Dict dict = JsonUtils.parseMap(post);
......
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