Commit 79fec321 authored by 赵啸非's avatar 赵啸非

Merge remote-tracking branch 'origin/master'

# Conflicts:
#	enterprise-manager-ui/admin/src/views/company/drawershow.vue
parents ee80ab23 c8bfc69f
# 企业服务平台
## 测试信息
测试环境:http://192.168.0.212:8085
\ No newline at end of file
...@@ -24,9 +24,9 @@ export default { ...@@ -24,9 +24,9 @@ export default {
} }
}, },
methods: { methods: {
change() { change(e) {
this.visible = false; this.visible = false;
this.$emit("confirm"); this.$emit("confirm",e);
} }
}, },
data() { data() {
......
...@@ -3,8 +3,8 @@ ...@@ -3,8 +3,8 @@
<el-form-item> <el-form-item>
<slot name="prepend"></slot> <slot name="prepend"></slot>
<slot> <slot>
<el-button v-if="!noSaveBtn" type="primary" @click='$emit("submit")' size='small' icon='el-icon-circle-check-outline'>保存</el-button> <el-button v-if="!noSaveBtn" type="primary" @click='$emit("submit")' icon='el-icon-circle-check-outline'>保存</el-button>
<el-button v-if="!noCancelBtn" @click="$router.go(-1)" size='small' icon='el-icon-circle-close-outline'>取消</el-button> <el-button v-if="!noCancelBtn" @click="$router.go(-1)" icon='el-icon-circle-close-outline'>取消</el-button>
</slot> </slot>
<slot name="append"></slot> <slot name="append"></slot>
</el-form-item> </el-form-item>
......
<template> <template>
<div class="page"> <div class="page">
<LayoutTable :data="tableData" :config="tableConfig"> <LayoutTable :data="tableData" :config="tableConfig" notDel>
</LayoutTable> </LayoutTable>
<drawer-show ref="drawerform" @ok="getData" /> <drawer-show ref="drawerform" @ok="getData" />
......
<template> <template>
<!-- 弹出框表单 --> <!-- 弹出框表单 -->
<el-drawer <el-drawer
:title="title" :title="title"
:visible.sync="open" :visible.sync="open"
:direction="direction" :direction="direction"
:destroy-on-close="true" :destroy-on-close="true"
size="70%"> size="70%"
<el-form ref="form" :model="form" :rules="rules" label-width="120px"> >
<el-row> <el-form ref="form" :model="form" :rules="rules" label-width="120px" style="padding:0 40px;">
<Field :span="20" label="标签名称" prop="labelName" v-model="form.labelName" placeholder="请输入标签名称"/> <el-row>
<Field :span="20" label="标签描述" prop="labelDesc" v-model="form.labelDesc" placeholder="请输入标签描述"/> <Field
<Field :span="20" label="标签图标"><imageUpload v-model="form.labelLogoPath" prePath="/file/preview"/></Field> :span="20"
<Field :span="20" label="排序" prop="sort" type="num" v-model="form.sort" placeholder="请输入排序"/> label="标签名称"
<Field :span="20" label="备注" prop="remark" v-model="form.remark" type="textarea" placeholder="请输入备注"/> prop="labelName"
v-model="form.labelName"
</el-row> placeholder="请输入标签名称"
/>
<form-buttons @submit='submitForm' v-if="pageInfo.type!='view'" noCancelBtn /> <Field
</el-form> :span="20"
label="标签描述"
</el-drawer> prop="labelDesc"
v-model="form.labelDesc"
placeholder="请输入标签描述"
/>
<Field :span="20" label="标签图标">
<imageUpload v-model="form.labelLogoPath" prePath="/file/preview" />
</Field>
<Field
:span="20"
label="排序"
prop="sort"
type="num"
v-model="form.sort"
placeholder="请输入排序"
/>
<Field
:span="20"
label="备注"
prop="remark"
v-model="form.remark"
type="textarea"
placeholder="请输入备注"
/>
</el-row>
<el-form-item v-if="pageInfo.type!='view'" class="formbtns">
<el-button type="primary" @click="submitForm" icon="el-icon-circle-check-outline">保存</el-button>
<el-button @click="open=false" icon="el-icon-circle-close-outline">取消</el-button>
</el-form-item>
</el-form>
</el-drawer>
</template> </template>
<script> <script>
import form from "@/assets/mixins/formdialog"; import form from "@/assets/mixins/formdialog";
export default { export default {
name: "LabelsDetail", name: "LabelsDetail",
mixins: [form], mixins: [form],
components: { components: {},
created() {
}, this.changePath("labels");
created() { },
this.changePath("labels") data() {
}, return {
data() { // 遮罩层
return { loading: true,
// 遮罩层 // 弹出层标题
loading: true, title: "标注",
// 弹出层标题 // 是否显示弹出层
title: "标注", open: false,
// 是否显示弹出层 direction: "rtl",
open: false, toString: [],
direction:"rtl", toDate: [],
toString:[ // 表单校验
], rules: {
toDate:[ labelName: [
], { required: true, message: "请输入标签名称", trigger: "blur" },
// 表单校验 { max: 128, message: "最多只能录入128个字符", trigger: "blur" }
rules: { ],
labelName: [ createTime: [{ required: true, message: "请选择创建时间" }]
{required: true,message: "请输入标签名称", trigger: "blur" }, }
{max: 128,message: "最多只能录入128个字符",trigger: "blur",}, };
], },
createTime: [
{required: true,message: "请选择创建时间" },
],
}
};
},
methods: { methods: {
/** 编辑 */ /** 编辑 */
edit(row) { edit(row) {
this.reset() this.reset();
this.query = { id: row.id }; this.query = { id: row.id };
this.urls.currUrl ="labels/edit"; this.urls.currUrl = "labels/edit";
this.getData(); this.getData();
this.pageInfo.type="edit" this.pageInfo.type = "edit";
this.title = "修改标注"; this.title = "修改标注";
}, },
/** 新增 */ /** 新增 */
add(row) { add(row) {
this.reset() this.reset();
this.urls.currUrl = "labels/add"; this.urls.currUrl = "labels/add";
this.getData(); this.getData();
this.pageInfo.type="add" this.pageInfo.type = "add";
this.title = "新增标注"; this.title = "新增标注";
}, },
/** 查看*/ /** 查看*/
view(row) { view(row) {
this.reset() this.reset();
this.query = { id: row.id }; this.query = { id: row.id };
this.urls.currUrl ="labels/view"; this.urls.currUrl = "labels/view";
this.getData(); this.getData();
this.pageInfo.type="view" this.pageInfo.type = "view";
this.title = "标注详细"; this.title = "标注详细";
}, },
/**取消按钮 */ /**取消按钮 */
cancel() { cancel() {
this.open = false; this.open = false;
}, },
/**获取数据后弹框 */ /**获取数据后弹框 */
afterRender(data) { afterRender(data) {
this.open = true; this.open = true;
}, },
afterSubmit(data) { afterSubmit(data) {
this.open = false; this.open = false;
this.$emit("ok"); this.$emit("ok");
}, },
// 表单重置 // 表单重置
reset() { reset() {
this.form = { this.form = {
labelName : "", labelName: "",
labelDesc : "", labelDesc: "",
labelLogoPath : "", labelLogoPath: "",
sort : 0, sort: 0,
remark : "", remark: ""
}; };
this.resetForm("form"); this.resetForm("form");
}, },
resetForm(refName) { resetForm(refName) {
if (this.$refs[refName]) { if (this.$refs[refName]) {
this.$refs[refName].resetFields(); this.$refs[refName].resetFields();
} }
}, }
}, }
}; };
</script> </script>
<style lang="less" scoped>
.formbtns {
display: flex;
justify-content: flex-end;
align-items: center;
height: 60px;
margin-top: 30px;
}
</style>
...@@ -28,6 +28,11 @@ ...@@ -28,6 +28,11 @@
<profiles.nacos.server-addr>127.0.0.1:8848</profiles.nacos.server-addr> <profiles.nacos.server-addr>127.0.0.1:8848</profiles.nacos.server-addr>
<profiles.nacos.group>DEFAULT_GROUP</profiles.nacos.group> <profiles.nacos.group>DEFAULT_GROUP</profiles.nacos.group>
<profiles.nacos.namespace>smart-gov</profiles.nacos.namespace> <profiles.nacos.namespace>smart-gov</profiles.nacos.namespace>
<profiles.rabbitmq.host>192.168.0.251</profiles.rabbitmq.host>
<profiles.rabbitmq.port>5672</profiles.rabbitmq.port>
<profiles.rabbitmq.username>root_mq</profiles.rabbitmq.username>
<profiles.rabbitmq.password>xhx@2022</profiles.rabbitmq.password>
<profiles.rabbitmq.virtualhost>/</profiles.rabbitmq.virtualhost>
<profiles.log.path>/home/mortals/app/logs</profiles.log.path> <profiles.log.path>/home/mortals/app/logs</profiles.log.path>
<profiles.log.level>info</profiles.log.level> <profiles.log.level>info</profiles.log.level>
<profiles.publish.path>/home/publish</profiles.publish.path> <profiles.publish.path>/home/publish</profiles.publish.path>
......
...@@ -18,6 +18,6 @@ public class NewsReq extends BaseReq { ...@@ -18,6 +18,6 @@ public class NewsReq extends BaseReq {
/** /**
* 分类id * 分类id
*/ */
private Long categoryId; private Long newsCategoryId;
} }
...@@ -13,6 +13,8 @@ import com.mortals.xhx.base.system.user.service.UserService; ...@@ -13,6 +13,8 @@ import com.mortals.xhx.base.system.user.service.UserService;
import com.mortals.xhx.busiz.applets.req.NewsReq; import com.mortals.xhx.busiz.applets.req.NewsReq;
import com.mortals.xhx.busiz.applets.rsp.NewsListInfo; import com.mortals.xhx.busiz.applets.rsp.NewsListInfo;
import com.mortals.xhx.common.utils.BeanUtil; import com.mortals.xhx.common.utils.BeanUtil;
import com.mortals.xhx.module.category.model.CategoryQuery;
import com.mortals.xhx.module.category.service.CategoryService;
import com.mortals.xhx.module.dept.model.DeptQuery; import com.mortals.xhx.module.dept.model.DeptQuery;
import com.mortals.xhx.module.dept.service.DeptService; import com.mortals.xhx.module.dept.service.DeptService;
import com.mortals.xhx.module.news.model.NewsCategoryQuery; import com.mortals.xhx.module.news.model.NewsCategoryQuery;
...@@ -21,6 +23,7 @@ import com.mortals.xhx.module.news.model.NewsQuery; ...@@ -21,6 +23,7 @@ import com.mortals.xhx.module.news.model.NewsQuery;
import com.mortals.xhx.module.news.service.NewsCategoryService; import com.mortals.xhx.module.news.service.NewsCategoryService;
import com.mortals.xhx.module.news.service.NewsService; import com.mortals.xhx.module.news.service.NewsService;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.poi.ss.formula.functions.T;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.ObjectUtils; import org.springframework.util.ObjectUtils;
...@@ -60,6 +63,7 @@ public class NewsApiController extends AbstractBaseController<NewsReq> { ...@@ -60,6 +63,7 @@ public class NewsApiController extends AbstractBaseController<NewsReq> {
@Autowired @Autowired
private UserService userService; private UserService userService;
protected void init(Map<String, Object> model, Context context) { protected void init(Map<String, Object> model, Context context) {
this.addDict(model, "top", paramService.getParamBySecondOrganize("News", "top")); this.addDict(model, "top", paramService.getParamBySecondOrganize("News", "top"));
this.addDict(model, "viewNums", paramService.getParamBySecondOrganize("News", "viewNums")); this.addDict(model, "viewNums", paramService.getParamBySecondOrganize("News", "viewNums"));
...@@ -69,10 +73,27 @@ public class NewsApiController extends AbstractBaseController<NewsReq> { ...@@ -69,10 +73,27 @@ public class NewsApiController extends AbstractBaseController<NewsReq> {
} }
/**
* 新闻频道分类
*/
@PostMapping(value = "categoryList")
public Rest<Object> categoryList(){
String busiDesc = "新闻频道";
Rest<Object> rest = Rest.ok();
try {
rest.setData(newsCategoryService.find(new NewsCategoryQuery()));
}catch (Exception e) {
log.error(busiDesc, e);
rest = Rest.fail(super.convertException(e));
}
return rest;
}
/** /**
* 新闻列表 * 新闻列表
*/ */
@PostMapping(value = "list") @PostMapping(value = "newsList")
public Rest<Object> newsList(@RequestBody NewsReq newsReq) { public Rest<Object> newsList(@RequestBody NewsReq newsReq) {
String busiDesc = "新闻列表"; String busiDesc = "新闻列表";
log.info("【{}】【请求体】--> {}", busiDesc, JSONObject.toJSONString(newsReq)); log.info("【{}】【请求体】--> {}", busiDesc, JSONObject.toJSONString(newsReq));
...@@ -86,8 +107,8 @@ public class NewsApiController extends AbstractBaseController<NewsReq> { ...@@ -86,8 +107,8 @@ public class NewsApiController extends AbstractBaseController<NewsReq> {
PageInfo pageInfo = buildPageInfo(newsReq); PageInfo pageInfo = buildPageInfo(newsReq);
NewsQuery query = new NewsQuery(); NewsQuery query = new NewsQuery();
if(!ObjectUtils.isEmpty(newsReq.getCategoryId())){ if(!ObjectUtils.isEmpty(newsReq.getNewsCategoryId())){
query.setCategoryId(newsReq.getCategoryId()); query.setCategoryId(newsReq.getNewsCategoryId());
} }
query.setOrderColList(Arrays.asList(new OrderCol("createTime", OrderCol.DESCENDING))); query.setOrderColList(Arrays.asList(new OrderCol("createTime", OrderCol.DESCENDING)));
...@@ -113,7 +134,7 @@ public class NewsApiController extends AbstractBaseController<NewsReq> { ...@@ -113,7 +134,7 @@ public class NewsApiController extends AbstractBaseController<NewsReq> {
/** /**
* 新闻详细 * 新闻详细
*/ */
@PostMapping(value = "info") @PostMapping(value = "newsInfo")
public Rest<NewsEntity> appealInfo(@RequestBody NewsReq newsReq) { public Rest<NewsEntity> appealInfo(@RequestBody NewsReq newsReq) {
String busiDesc = "新闻详细"; String busiDesc = "新闻详细";
log.info("【{}】【请求体】--> {}", busiDesc, JSONObject.toJSONString(newsReq)); log.info("【{}】【请求体】--> {}", busiDesc, JSONObject.toJSONString(newsReq));
......
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