Commit 16488bf6 authored by danfuman's avatar danfuman

Merge branch 'V20230915' of http://192.168.60.201/root/dsk-operate-sys into V20230915

# Conflicts:
#	dsk-operate-ui/src/views/market/index.vue
parents fa94315d f178e9f9
......@@ -168,6 +168,7 @@ tenant:
- business_follow_record
- business_label
- business_relate_company
- business_open_tender
# MyBatisPlus配置
......
......@@ -32,17 +32,22 @@ public class PasswordUtils {
// 至少包含一个大写字母
password.append(UPPER_CASE.charAt(random.nextInt(UPPER_CASE.length())));
// 至少包含一个数字
password.append(NUMBERS.charAt(random.nextInt(NUMBERS.length())));
// 生成剩余部分的密码
for (int i = 0; i < length - 3; i++) {
String characters = LOWER_CASE + UPPER_CASE + NUMBERS;
password.append(characters.charAt(random.nextInt(characters.length())));
for (int i = 0; i < length - 2; i++) {
// 至少包含一个数字
password.append(NUMBERS.charAt(random.nextInt(NUMBERS.length())));
// String characters = LOWER_CASE + UPPER_CASE + NUMBERS;
// password.append(characters.charAt(random.nextInt(characters.length())));
}
// 打乱密码中字符的顺序
return shufflePassword(password.toString());
// return shufflePassword(password.toString());
return password.toString();
}
public static void main(String[] args) {
System.out.println(PasswordUtils.generatePwd(8));
}
public static String shufflePassword(String password) {
......
package com.dsk.biz.controller;
import com.dsk.biz.domain.BusinessOpenTender;
import com.dsk.biz.domain.bo.BusinessOpenTenderDto;
import com.dsk.biz.domain.bo.BusinessSearchDto;
import com.dsk.biz.service.IBusinessOpenTenderService;
import com.dsk.common.annotation.RepeatSubmit;
import com.dsk.common.core.controller.BaseController;
import com.dsk.common.core.domain.PageQuery;
import com.dsk.common.core.domain.R;
import com.dsk.common.core.page.TableDataInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.List;
/**
* 项目开标记录
*
* @author lcl
* @date 2023-10-23
*/
@RestController
@RequestMapping("/business/open/tender")
public class BusinessOpenTenderController extends BaseController {
@Autowired
private IBusinessOpenTenderService baseService;
/**
* 开标记录列表
*/
@GetMapping("/list")
public TableDataInfo<BusinessOpenTender> list(BusinessOpenTenderDto dto, PageQuery pageQuery){
return baseService.selectList(dto, pageQuery);
}
/**
* 添加开标记录
*/
@PostMapping
@RepeatSubmit()
public R<Void> add(@RequestBody BusinessOpenTender bo){
return toAjax(baseService.add(bo));
}
/**
* 修改开标记录
*/
@PutMapping
@RepeatSubmit()
public R<Void> edit(@RequestBody BusinessOpenTender bo){
return toAjax(baseService.edit(bo));
}
/**
* 删除开标记录
*/
@DeleteMapping("/{ids}")
@RepeatSubmit()
public R<Void> remove(@PathVariable Long[] ids){
return toAjax(baseService.remove(ids));
}
}
package com.dsk.biz.domain;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* @Author lcl
* @Data 2023/10/23 16:26
*/
@Data
public class BusinessOpenTender implements Serializable {
@TableId(value = "id",type = IdType.AUTO)
private Long id;
/**
* 项目id
*/
private Integer businessId;
/**
* 投标人id
*/
private Integer tendererId;
/**
* 投标人
*/
private String tenderer;
/**
* 企业性质
*/
private String tendererNature;
/**
* 项目经理
*/
private String businessManager;
/**
* 联系方式
*/
private String contact;
/**
* 投标金额
*/
private Double tenderAmount;
private Date createTime;
private Date updateTime;
}
package com.dsk.biz.domain.bo;
import com.dsk.common.core.domain.BaseEntity;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
/**
* @author lcl
* @create 2023/8/14
*/
@Data
@NoArgsConstructor
public class BusinessOpenTenderDto implements Serializable {
/**
* 项目id
*/
private Integer businessId;
}
package com.dsk.biz.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.dsk.biz.domain.BusinessOpenTender;
import org.apache.ibatis.annotations.Mapper;
@Mapper
public interface BusinessOpenTenderMapper extends BaseMapper<BusinessOpenTender> {
}
package com.dsk.biz.service;
import com.dsk.biz.domain.BusinessOpenTender;
import com.dsk.biz.domain.bo.BusinessOpenTenderDto;
import com.dsk.common.core.domain.PageQuery;
import com.dsk.common.core.page.TableDataInfo;
public interface IBusinessOpenTenderService {
TableDataInfo<BusinessOpenTender> selectList(BusinessOpenTenderDto dto, PageQuery pageQuery);
int add(BusinessOpenTender bo);
int edit(BusinessOpenTender bo);
int remove(Long[] ids);
}
package com.dsk.biz.service.impl;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.dsk.biz.domain.BusinessOpenTender;
import com.dsk.biz.domain.bo.BusinessOpenTenderDto;
import com.dsk.biz.domain.bo.BusinessSearchDto;
import com.dsk.biz.mapper.BusinessOpenTenderMapper;
import com.dsk.biz.service.IBusinessOpenTenderService;
import com.dsk.common.core.domain.PageQuery;
import com.dsk.common.core.page.TableDataInfo;
import jodd.bean.BeanException;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import org.springframework.util.ObjectUtils;
import javax.annotation.Resource;
import java.sql.Wrapper;
import java.util.Arrays;
import java.util.List;
/**
* @Author lcl
* @Data 2023/10/23 16:29
*/
@Slf4j
@Service
public class BusinessOpenTenderServiceImpl implements IBusinessOpenTenderService {
@Resource
private BusinessOpenTenderMapper baseMapper;
@Override
public TableDataInfo<BusinessOpenTender> selectList(BusinessOpenTenderDto dto, PageQuery pageQuery) {
return TableDataInfo.build(baseMapper.selectPage(pageQuery.build(),
Wrappers.<BusinessOpenTender>lambdaQuery().eq(BusinessOpenTender::getBusinessId, dto.getBusinessId())));
}
@Override
public int add(BusinessOpenTender bo) {
verifyBean(bo);
return baseMapper.insert(bo);
}
@Override
public int edit(BusinessOpenTender bo) {
if(ObjectUtils.isArray(bo.getId())) throw new BeanException("id不能为空!");
verifyBean(bo);
return baseMapper.updateById(bo);
}
@Override
public int remove(Long[] ids) {
return baseMapper.deleteBatchIds(Arrays.asList(ids));
}
private void verifyBean(BusinessOpenTender bo){
if(ObjectUtils.isArray(bo.getBusinessId())) throw new BeanException("项目id不能为空!");
if(ObjectUtils.isArray(bo.getTenderer())) throw new BeanException("开标人不能为空!");
if(ObjectUtils.isArray(bo.getTendererNature())) throw new BeanException("企业性质不能为空!");
if(ObjectUtils.isArray(bo.getTenderAmount())) throw new BeanException("投标金额不能为空!");
}
}
......@@ -25,7 +25,7 @@ service.interceptors.request.use(config => {
// 是否需要设置 token
const isToken = (config.headers || {}).isToken === false
// 是否需要防止数据重复提交
const isRepeatSubmit = (config.headers || {}).repeatSubmit === false||config.url.indexOf('getUipIdByCid')!=-1
const isRepeatSubmit = (config.headers || {}).repeatSubmit === false
if (getToken() && !isToken) {
config.headers['Authorization'] = 'Bearer ' + getToken() // 让每个请求携带自定义token 请根据实际情况自行修改
config.headers['tenantid'] = getTenantid() //携带租户id
......
......@@ -8,7 +8,8 @@
<script>
import { steerScroll } from '@/assets/js/jskplug';
import { dskAccessToken } from '@/api/common';
import {encodeStr} from "@/assets/js/common.js"
import { getUipIdByCid } from '@/api/macro/macro'
export default {
name: 'Enterprise',
components: {
......@@ -16,6 +17,7 @@ export default {
},
data() {
return {
encodeStr,
loading: false, // 是否加载完成-当前页控制
iframeTimer: '', // 是否加载中定时器-当前页控制
footHeight: 0, //底部高度,若为0(页面内部嵌套或者没有底部板块)
......@@ -41,22 +43,39 @@ export default {
},
mounted() {
this.iframeLoading(); // 判断iframe页面是否加载完成-当前页控制
let that = this
window.addEventListener('message', function (event) {
if(!event.data.id && event.data.url){
that.$tab.openPage(event.data.title, event.data.url).then(() => {
// 执行结束的逻辑
})
}
}, false);
window.addEventListener('message', this.linkListener, false);
steerScroll('companyIframe', this.navigation, this.footHeight, true); // iframeId: iframe的id;navigation:页面排除iframe后剩下的顶部高度;footHeight: 页面排除iframe后剩下的底部高度;state:监听or移除监听;parentId: 父级id[不带默认就是铺满整个页面]];_this:指向当前实例(可忽略)
},
beforeDestroy() {
clearInterval(this.iframeTimer); // -当前页控制
window.removeEventListener("message", this.linkListener);
steerScroll('companyIframe', this.navigation, this.footHeight); // iframeId: iframe的id;navigation:页面排除iframe后剩下的顶部高度;footHeight: 页面排除iframe后剩下的底部高度;state:监听or移除监听;parentId: 父级id[不带默认就是铺满整个页面]];_this:指向当前实例(可忽略)
clearInterval(this.tokentimer);
},
methods: {
linkListener(event){
let {data} = event
if(data.id){
getUipIdByCid([data.id]).then(res=>{
if (res.code==200) {
if(res.data&&res.data.length>0&&res.data[0].uipId){
this.$router.push({path: '/enterprise/'+this.encodeStr(data.id)})
}else{
this.$tab.openPage(data.title, '/company/'+this.encodeStr(data.id))
}
}
}).catch(error=>{
});
}else{
if(data.url){
this.$tab.openPage(data.title, data.url).then(() => {
// 执行结束的逻辑
})
}
}
},
gettokens() {
dskAccessToken().then(res => {
if (res.code == 200) {
......
......@@ -50,29 +50,7 @@ export default {
this.iframeObserver();
let that = this
window.addEventListener("message", this.pagecapListener, { passive: true });
window.addEventListener('message', function (event) {
if(event.data.id){
getUipIdByCid([event.data.id]).then(res=>{
if (res.code==200) {
if(res.data&&res.data.length>0&&res.data[0].uipId){
that.$router.push({path: '/enterprise/'+that.encodeStr(event.data.id)})
}else{
that.$tab.openPage(event.data.title, '/company/'+that.encodeStr(event.data.id))
}
}
}).catch(error=>{
});
}else{
if(event.data.url){
that.$tab.openPage(event.data.title, event.data.url).then(() => {
// 执行结束的逻辑
})
}
}
}, false);
window.addEventListener('message', this.linkListener, false);
},
mounted() {
this.iframeLoading(); // 判断iframe页面是否加载完成-当前页控制
......@@ -83,10 +61,34 @@ export default {
steerScroll('companyIframe', this.navigation, this.footHeight); // iframeId: iframe的id;navigation:页面排除iframe后剩下的顶部高度;footHeight: 页面排除iframe后剩下的底部高度;state:监听or移除监听;parentId: 父级id[不带默认就是铺满整个页面]];_this:指向当前实例(可忽略)
clearInterval(this.tokentimer);
window.removeEventListener("message", this.pagecapListener, { passive: true });
window.removeEventListener("message", this.linkListener);
// 移除layout样式
this.iframeIns.contentWindow.postMessage("removeHtmlLayoutStyle", { targetOrigin: this.domain, });
},
methods: {
linkListener(event){
let {data} = event
if(data.id){
getUipIdByCid([data.id]).then(res=>{
if (res.code==200) {
if(res.data&&res.data.length>0&&res.data[0].uipId){
this.$router.push({path: '/enterprise/'+this.encodeStr(data.id)})
}else{
this.$tab.openPage(data.title, '/company/'+this.encodeStr(data.id))
}
}
}).catch(error=>{
});
}else{
if(data.url){
this.$tab.openPage(data.title, data.url).then(() => {
// 执行结束的逻辑
})
}
}
},
async iframeObserver() {
try {
await this.$nextTick();
......
......@@ -8,18 +8,12 @@
<el-option v-for="(item,index) in companytype" :label="item.dictLabel" :value="item.dictValue"></el-option>
</el-select>
<div class="searchInput small">
<div class="normal-search-container" @click="showSearchBox = true" v-if="!showSearchBox">
<img src="@/assets/images/enterprise/enterprise-search-icon.svg" alt="">
<span>输入关键词查询</span>
<div @mouseover="showSearchBox = true" @mouseleave="leaves" >
<img class="ss" src="@/assets/images/enterprise/enterprise-search-icon.svg" alt="">
<span class="cx" v-if="!showSearchBox">搜索</span>
<el-input v-if="showSearchBox" @keyup.enter.native="handleCurrentChange(1)" clearable @clear="handleCurrentChange(1)" v-model="searchParam.companyName"
placeholder="输入关键词查询"></el-input>
</div>
<!--&lt;!&ndash; 输入框展开后样式 &ndash;&gt;-->
<transition @enter="onEnter" appear mode="out-in">
<div class="cooperate-name enterprise-search-container" id="focus1" v-if="showSearchBox">
<el-input clearable @clear="handleCurrentChange(1)" @focus="clickFocus('focus1')" @blur="clickFocus('focus1')" v-model="searchParam.companyName"
placeholder="输入关键词查询"></el-input>
<span @click="handleCurrentChange(1)">搜索</span>
</div>
</transition>
</div>
<div class="btn btn_primary h32 b3" @click="opennew" v-if="isDisableds == false"><div class="img img1"></div>添加相关企业</div>
</div>
......@@ -196,7 +190,6 @@
import { addXGQY, delXGQY, getXGQY, saveXGQY } from '@/api/project/project'
import { getDictType, getEnterprise } from '@/api/main'
import skeleton from './skeleton'
import gsap from "gsap";
export default {
components:{skeleton},
......@@ -264,9 +257,10 @@
mounted(){
},
methods:{
clickFocus(e) {
document.getElementById(e).classList.toggle('span-ba');
leaves(){
if(this.searchParam.companyName == ""){
this.showSearchBox = false
}
},
getDetail(row){
this.isedit = true
......@@ -373,21 +367,6 @@
remark:'',
}
},
onEnter(el, done) {
gsap.from(el, {
opacity: 0,
width: 0,
});
gsap.to(el, {
opacity: 1,
width: 242,
onComplete() {
// 完成动画聚焦输入框
el.querySelector("input").focus();
done();
}
});
},
}
}
</script>
......@@ -406,81 +385,53 @@
}
}
.searchInput .el-input{
width: 68%;
width: 100%;
position: absolute;
left: 0;
top: 0;
margin-top: 0;
z-index: 0;
::v-deep .el-input__inner{
background: #F4F6F9 !important;
padding-left: 36px !important;
padding-right: 35px !important;
}
}
.searchInput.small{
width: 257px;
}
.searchInput{
.normal-search-container {
display: flex;
align-items: center;
cursor: pointer;
height: 34px;
&:hover {
& > span {
color: #0081ff;
}
}
& > img {
width: 16px;
height: 16px;
margin-left: 12px;
/*width: 257px;*/
border: 0;
border-radius: 4px !important;
.ss{
position: absolute;
z-index: 1;
left: 13px;
top: 9px;
width: 13px;
}
& > span {
.cx{
color: #232323;
color: rgba(35, 35, 35, 0.4);
font-weight: 400;
margin-left: 8px;
line-height: 22px;
opacity: 0.8;
font-size: 14px;
margin-left: 36px;
line-height: 32px;
}
}
.cooperate-name {
display: flex;
border-radius: 2px;
border: 1px solid #d9d9d9;
line-height: 30px;
height: 30px;
float: left;
width: 100%;
span {
width: 60px;
height: 28px;
line-height: 28px;
font-size: 14px;
background: #f5f5f5;
text-align: center;
color: #0081ff;
border: 1px solid #efefef;
border-left: 0;
cursor: pointer;
input::-webkit-input-placeholder { /* Chrome/Opera/Safari */
color: #232323;
opacity: 0.4;
}
&.span-ba {
border: 1px solid #0081ff;
span {
color: #ffffff;
background: #0081ff;
border: 1px solid #0081ff;
}
input::-moz-placeholder { /* Firefox 19+ */
color: #232323;
opacity: 0.4;
}
::v-deep .el-input {
flex: 1;
input:-ms-input-placeholder { /* IE 10+ */
color: #232323;
opacity: 0.4;
}
::v-deep .el-input__inner {
border: 0;
line-height: 28px;
height: 28px;
position: absolute;
top: 1px;
padding-right: 28px;
font-size: 12px;
padding-left: 8px;
input:-moz-placeholder { /* Firefox 18- */
color: #232323;
opacity: 0.4;
}
}
}
.w102{
width: 102px;
}
......
......@@ -5,18 +5,12 @@
<div class="cardtitles">资料文档</div>
<div class="searchbtns">
<div class="searchInput small">
<div class="normal-search-container" @click="showSearchBox = true" v-if="!showSearchBox">
<img src="@/assets/images/enterprise/enterprise-search-icon.svg" alt="">
<span>输入关键词查询</span>
<div @mouseover="showSearchBox = true" @mouseleave="leaves" >
<img class="ss" src="@/assets/images/enterprise/enterprise-search-icon.svg" alt="">
<span class="cx" v-if="!showSearchBox">搜索</span>
<el-input v-if="showSearchBox" @keyup.enter.native="handleCurrentChange(1)" clearable @clear="handleCurrentChange(1)" v-model="param.keyword"
placeholder="输入关键词查询"></el-input>
</div>
<!--&lt;!&ndash; 输入框展开后样式 &ndash;&gt;-->
<transition @enter="onEnter" appear mode="out-in">
<div class="cooperate-name enterprise-search-container" id="focus1" v-if="showSearchBox">
<el-input clearable @clear="handleCurrentChange(1)" @focus="clickFocus('focus1')" @blur="clickFocus('focus1')" v-model="param.keyword"
placeholder="输入关键词查询"></el-input>
<span @click="handleCurrentChange(1)">搜索</span>
</div>
</transition>
</div>
<!--<div class="btn btn_primary h32 b2" @click="getUP" v-if="fileDatas.total>0"><div class="img img2"></div>上传</div>-->
......@@ -161,7 +155,6 @@
import { getToken } from '@/utils/auth'
import { delZLWD, getZLWD } from '@/api/project/project'
import skeleton from './skeleton'
import gsap from "gsap";
export default {
components:{skeleton},
......@@ -204,23 +197,10 @@
// console.log(this.$ref)
},
methods:{
clickFocus(e) {
document.getElementById(e).classList.toggle('span-ba');
},
onEnter(el, done) {
gsap.from(el, {
opacity: 0,
width: 0,
});
gsap.to(el, {
opacity: 1,
width: 242,
onComplete() {
// 完成动画聚焦输入框
el.querySelector("input").focus();
done();
}
});
leaves(){
if(this.searchParam.companyName == ""){
this.showSearchBox = false
}
},
getall(){
this.param.filePath = this.detailId ? this.detailId : this.$route.query.id
......@@ -343,77 +323,53 @@
<style lang="scss" scoped>
.searchInput.small{
width: 257px;
}
.searchInput{
.normal-search-container {
display: flex;
align-items: center;
cursor: pointer;
height: 34px;
&:hover {
& > span {
color: #0081ff;
}
}
& > img {
width: 16px;
height: 16px;
margin-left: 12px;
}
& > span {
color: #232323;
color: rgba(35, 35, 35, 0.4);
font-weight: 400;
margin-left: 8px;
line-height: 22px;
font-size: 14px;
}
.searchInput .el-input{
width: 100%;
position: absolute;
left: 0;
top: 0;
margin-top: 0;
z-index: 0;
::v-deep .el-input__inner{
background: #F4F6F9 !important;
padding-left: 36px !important;
padding-right: 35px !important;
}
.cooperate-name {
display: flex;
border-radius: 2px;
border: 1px solid #d9d9d9;
line-height: 30px;
height: 30px;
float: left;
width: 100%;
span {
width: 60px;
height: 28px;
line-height: 28px;
font-size: 14px;
background: #f5f5f5;
text-align: center;
color: #0081ff;
border: 1px solid #efefef;
border-left: 0;
cursor: pointer;
}
&.span-ba {
border: 1px solid #0081ff;
span {
color: #ffffff;
background: #0081ff;
border: 1px solid #0081ff;
}
}
::v-deep .el-input {
flex: 1;
}
::v-deep .el-input__inner {
border: 0;
line-height: 28px;
height: 28px;
position: absolute;
top: 1px;
padding-right: 28px;
font-size: 12px;
padding-left: 8px;
}
}
.searchInput.small{
/*width: 257px;*/
border: 0;
border-radius: 4px !important;
.ss{
position: absolute;
z-index: 1;
left: 13px;
top: 9px;
width: 13px;
}
.cx{
color: #232323;
opacity: 0.8;
font-size: 14px;
margin-left: 36px;
line-height: 32px;
}
input::-webkit-input-placeholder { /* Chrome/Opera/Safari */
color: #232323;
opacity: 0.4;
}
input::-moz-placeholder { /* Firefox 19+ */
color: #232323;
opacity: 0.4;
}
input:-ms-input-placeholder { /* IE 10+ */
color: #232323;
opacity: 0.4;
}
input:-moz-placeholder { /* Firefox 18- */
color: #232323;
opacity: 0.4;
}
}
v-deep.el-upload:focus{
......
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