This commit is contained in:
Vinjor 2025-06-23 13:46:33 +08:00
parent d7cfd8598d
commit 69545f153d
7 changed files with 49 additions and 22 deletions

View File

@ -70,10 +70,10 @@ public class BaseSiteInfoController extends BaseController
* 获取站点基础信息详细信息
*/
@PreAuthorize("@ss.hasPermi('base:info:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") String id)
@GetMapping(value = "/getSiteInfo")
public AjaxResult getInfo(String tenantId)
{
return success(baseSiteInfoService.getById(id));
return success(baseSiteInfoService.getSiteInfo(tenantId));
}
/**
@ -84,7 +84,7 @@ public class BaseSiteInfoController extends BaseController
@PostMapping
public AjaxResult add(@RequestBody BaseSiteInfo baseSiteInfo)
{
return toAjax(baseSiteInfoService.save(baseSiteInfo));
return toAjax(baseSiteInfoService.saveOrUpdate(baseSiteInfo));
}
/**

View File

@ -15,4 +15,13 @@ import com.ruoyi.base.domain.BaseSiteInfo;
public interface IBaseSiteInfoService extends IService<BaseSiteInfo>
{
IPage<BaseSiteInfo> queryListPage(BaseSiteInfo pageReqVO, Page<BaseSiteInfo> page);
/**
* 查询站点详情
* @author vinjor-M
* @date 11:47 2025/6/23
* @param tenantId TODO
* @return com.ruoyi.base.domain.BaseSiteInfo
**/
BaseSiteInfo getSiteInfo(String tenantId);
}

View File

@ -1,6 +1,8 @@
package com.ruoyi.base.service.impl;
import java.util.List;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.ruoyi.common.utils.DateUtils;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
@ -27,4 +29,20 @@ public class BaseSiteInfoServiceImpl extends ServiceImpl<BaseSiteInfoMapper,Base
public IPage<BaseSiteInfo> queryListPage(BaseSiteInfo pageReqVO, Page<BaseSiteInfo> page) {
return baseSiteInfoMapper.queryListPage(pageReqVO, page);
}
/**
* 查询站点详情
*
* @param tenantId TODO
* @return com.ruoyi.base.domain.BaseSiteInfo
* @author vinjor-M
* @date 11:47 2025/6/23
**/
@Override
public BaseSiteInfo getSiteInfo(String tenantId) {
LambdaQueryWrapper<BaseSiteInfo> queryWrapper = new LambdaQueryWrapper<BaseSiteInfo>()
.eq(BaseSiteInfo::getTenantId,tenantId);
List<BaseSiteInfo> list = this.list(queryWrapper);
return list.isEmpty()?null:list.get(0);
}
}

View File

@ -297,7 +297,7 @@
// 初始化编辑器宽度,默认 1000
// ,initialFrameWidth:1000
// 初始化编辑器高度,默认 320
// ,initialFrameHeight:320
,initialFrameHeight:600
// 编辑器初始化结束后,编辑区域是否是只读的默认是false
, readonly: false
@ -507,17 +507,17 @@
, maxInputCount: 1
// 是否自动长高,默认true
, autoHeightEnabled: true
, autoHeightEnabled: false
//scaleEnabled
//是否可以拉伸长高,默认true(当开启时,自动长高失效)
//,scaleEnabled:false
//,minFrameWidth:800 //编辑器拖动时最小宽度,默认800
//,minFrameHeight:220 //编辑器拖动时最小高度,默认220
,scaleEnabled:true
// ,minFrameWidth:800 //编辑器拖动时最小宽度,默认800
,minFrameHeight:220 //编辑器拖动时最小高度,默认220
//autoFloatEnabled
//是否保持toolbar的位置不动,默认true
//,autoFloatEnabled:true
,autoFloatEnabled:true
//浮动时工具栏距离浏览器顶部的高度,用于某些具有固定头部的页面
//,topOffset:30
//编辑器底部距离工具栏高度(如果参数大于等于编辑器高度,则设置无效)

View File

@ -10,10 +10,11 @@ export function listInfo(query) {
}
// 查询站点基础信息详细
export function getInfo(id) {
export function getInfo(query) {
return request({
url: '/base/info/' + id,
method: 'get'
url: '/base/info/getSiteInfo',
method: 'get',
params: query
})
}

View File

@ -5,7 +5,7 @@
:destroy="true"
:config="editorConfig"
:editorDependencies="['ueditor.config.js','ueditor.all.js']"
style="height:500px;width: 100%; overflow: auto "/>
/>
</div>
</template>
<script>

View File

@ -80,8 +80,8 @@
</el-row>
<el-row>
<el-col :span="24">
<el-form-item label="站点联系方式html" prop="contactUs">
<editor v-model="form.contactUs" :min-height="192"/>
<el-form-item label="站点联系方式" prop="contactUs">
<editor v-model="form.contactUs" :min-height="400"/>
</el-form-item>
</el-col>
</el-row>
@ -146,16 +146,15 @@ export default {
}
}
},
created() {
onShow(){
this.getDataInfo()
},
methods: {
/** 查询站点基础信息列表 */
getList() {
getDataInfo() {
this.loading = true
listInfo(this.queryParams).then(response => {
this.infoList = response.data.records
this.total = response.data.total
this.loading = false
getInfo({}).then(response => {
this.form = response.data
})
},
/** 提交按钮 */