Commit f1772225 authored by 赵啸非's avatar 赵啸非

修改新闻相关

parent 504d7e2e
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
size="50%"> size="50%">
<el-form ref="form" :model="form" :rules="rules" label-width="120px"> <el-form ref="form" :model="form" :rules="rules" label-width="120px">
<el-row> <el-row>
<Field label="类型" :span="20" prop="categoryId" v-model="form.categoryId" type="radio" :enum-data="dict.categoryId" placeholder="请输入分类id"/> <Field label="类型" :span="20" prop="categoryId" v-model="form.categoryId" type="select" :enum-data="dict.categoryId" placeholder="请输入分类id"/>
<Field :span="20" label="封面"><imageUpload v-model="form.titleLogoPath" prePath="/file/preview"/></Field> <Field :span="20" label="封面"><imageUpload v-model="form.titleLogoPath" prePath="/file/preview"/></Field>
<Field label="标题" :span="20" prop="title" v-model="form.title" placeholder="请输入标题"/> <Field label="标题" :span="20" prop="title" v-model="form.title" placeholder="请输入标题"/>
<Field :span="20" label="内容"><editor v-model="form.content" :min-height="256"/></Field> <Field :span="20" label="内容"><editor v-model="form.content" :min-height="256"/></Field>
......
package com.mortals.xhx.module.dept.web; package com.mortals.xhx.module.dept.web;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.mortals.framework.exception.AppException;
import com.mortals.framework.model.Context; import com.mortals.framework.model.Context;
import com.mortals.framework.model.OrderCol; import com.mortals.framework.model.OrderCol;
import com.mortals.framework.util.StringUtils; import com.mortals.framework.util.StringUtils;
...@@ -12,8 +11,6 @@ import com.mortals.xhx.module.dept.model.DeptQuery; ...@@ -12,8 +11,6 @@ import com.mortals.xhx.module.dept.model.DeptQuery;
import com.mortals.xhx.module.dept.model.DeptTreeSelect; import com.mortals.xhx.module.dept.model.DeptTreeSelect;
import com.mortals.xhx.module.dept.service.DeptService; import com.mortals.xhx.module.dept.service.DeptService;
import com.mortals.xhx.module.staff.service.StaffService; import com.mortals.xhx.module.staff.service.StaffService;
import com.mortals.xhx.module.workman.model.WorkmanQuery;
import com.mortals.xhx.module.workman.service.WorkmanService;
import org.apache.commons.lang3.ArrayUtils; import org.apache.commons.lang3.ArrayUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
...@@ -41,8 +38,6 @@ public class DeptController extends BaseCRUDJsonBodyMappingController<DeptServic ...@@ -41,8 +38,6 @@ public class DeptController extends BaseCRUDJsonBodyMappingController<DeptServic
@Autowired @Autowired
private DeptService deptService; private DeptService deptService;
@Autowired @Autowired
private WorkmanService workmanService;
@Autowired
private StaffService staffService; private StaffService staffService;
...@@ -54,7 +49,6 @@ public class DeptController extends BaseCRUDJsonBodyMappingController<DeptServic ...@@ -54,7 +49,6 @@ public class DeptController extends BaseCRUDJsonBodyMappingController<DeptServic
protected void init(Map<String, Object> model, Context context) { protected void init(Map<String, Object> model, Context context) {
this.addDict(model, "deptStatus", paramService.getParamBySecondOrganize("Dept", "deptStatus")); this.addDict(model, "deptStatus", paramService.getParamBySecondOrganize("Dept", "deptStatus"));
this.addDict(model, "deptName", deptService.find(new DeptQuery()).stream().collect(Collectors.toMap(x->x.getId().toString(), y->y.getDeptName(),(o, n)->n))); this.addDict(model, "deptName", deptService.find(new DeptQuery()).stream().collect(Collectors.toMap(x->x.getId().toString(), y->y.getDeptName(),(o, n)->n)));
this.addDict(model, "workName", workmanService.find(new WorkmanQuery()).stream().collect(Collectors.toMap(x->x.getId().toString(), y->y.getName(),(o, n)->n)));
super.init(model, context); super.init(model, context);
} }
...@@ -134,14 +128,6 @@ public class DeptController extends BaseCRUDJsonBodyMappingController<DeptServic ...@@ -134,14 +128,6 @@ public class DeptController extends BaseCRUDJsonBodyMappingController<DeptServic
} }
@Override
protected int doListAfter(DeptEntity query, Map<String, Object> model, Context context) throws AppException {
int allPerson =staffService.queryAllPerson();
model.put("allPerson",allPerson);
return super.doListAfter(query, model, context);
}
......
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