初始化项目

This commit is contained in:
2026-03-21 00:10:20 +08:00
parent bbf84afc8f
commit 52042abcb6
16 changed files with 276 additions and 286 deletions

View File

@@ -19,23 +19,14 @@ import org.springframework.boot.web.servlet.support.SpringBootServletInitializer
*/
@SpringBootApplication
public class ApiApplication extends SpringBootServletInitializer {
private static final Logger logger = LoggerFactory.getLogger(ApiApplication.class);
public static void main(String[] args) {
SpringApplication.run(ApiApplication.class, args);
logger.info(
"\n\n==============================================================\n"
+ "\n 启动完成接口地址http://127.0.0.1:{}\n"
+ "\n 默认管理账号: system 密码: admin\n"
+ "\n==============================================================\n",
Global.getProperty("server.port") + FileUtils.path("/"
+ Global.getProperty("server.servlet.context-path")));
}
@Override
protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) {
this.setRegisterErrorPageFilter(false); // 错误页面有容器来处理而不是SpringBoot
this.setRegisterErrorPageFilter(false);
return builder.sources(ApiApplication.class);
}

View File

@@ -78,7 +78,7 @@ public class MyCompany extends DataEntity<MyCompany> implements Serializable {
@ExcelField(title = "经营范围", attrName = "businessScope", align = Align.CENTER, sort = 120),
@ExcelField(title = "公司电话", attrName = "contactPhone", align = Align.CENTER, sort = 130),
@ExcelField(title = "公司邮箱", attrName = "contactEmail", align = Align.CENTER, sort = 140),
@ExcelField(title = "数据状态", attrName = "ustatus", align = Align.CENTER, sort = 150),
@ExcelField(title = "数据状态", attrName = "ustatus",dictType = "biz_status", align = Align.CENTER, sort = 150),
@ExcelField(title = "更新时间", attrName = "updateTime", align = Align.CENTER, sort = 160, dataFormat = "yyyy-MM-dd hh:mm"),
})
public MyCompany() {

View File

@@ -2,6 +2,7 @@ package com.jeesite.modules.biz.entity;
import java.io.Serializable;
import java.util.Date;
import com.jeesite.common.mybatis.annotation.JoinTable;
import com.jeesite.common.mybatis.annotation.JoinTable.Type;
import com.fasterxml.jackson.annotation.JsonFormat;
@@ -23,79 +24,80 @@ import java.io.Serial;
/**
* 便签信息 Entity
*
* @author gaoxq
* @version 2026-03-20
*/
@EqualsAndHashCode(callSuper = true)
@Table(name="my_notes", alias="a", label="便签信息", columns={
@Column(name="create_time", attrName="createTime", label="记录时间", isUpdate=false, isUpdateForce=true),
@Column(name="note_id", attrName="noteId", label="唯一标识", isPK=true),
@Column(name="title", attrName="title", label="标题", queryType=QueryType.LIKE),
@Column(name="content", attrName="content", label="内容", queryType=QueryType.LIKE),
@Column(name="priority", attrName="priority", label="级别"),
@Column(name="ustatus", attrName="ustatus", label="状态"),
@Column(name="start_time", attrName="startTime", label="开始时间", isQuery=false, isUpdateForce=true),
@Column(name="end_time", attrName="endTime", label="结束时间", isQuery=false, isUpdateForce=true),
@Column(name="type", attrName="type", label="类型"),
@Column(name="deadline", attrName="deadline", label="截至时间", isQuery=false),
@Column(name="update_time", attrName="updateTime", label="更新时间", isInsert=false, isQuery=false, isUpdateForce=true),
@Column(name="create_user", attrName="createUser", label="创建用户", isQuery=false),
}, orderBy="a.note_id DESC"
@Table(name = "my_notes", alias = "a", label = "便签信息", columns = {
@Column(name = "create_time", attrName = "createTime", label = "记录时间", isUpdate = false, isUpdateForce = true),
@Column(name = "note_id", attrName = "noteId", label = "唯一标识", isPK = true),
@Column(name = "title", attrName = "title", label = "标题", queryType = QueryType.LIKE),
@Column(name = "content", attrName = "content", label = "内容", queryType = QueryType.LIKE),
@Column(name = "priority", attrName = "priority", label = "级别"),
@Column(name = "ustatus", attrName = "ustatus", label = "状态"),
@Column(name = "start_time", attrName = "startTime", label = "开始时间", isQuery = false, isUpdateForce = true),
@Column(name = "end_time", attrName = "endTime", label = "结束时间", isQuery = false, isUpdateForce = true),
@Column(name = "type", attrName = "type", label = "类型"),
@Column(name = "deadline", attrName = "deadline", label = "截至时间", isQuery = false),
@Column(name = "update_time", attrName = "updateTime", label = "更新时间", isInsert = false, isQuery = false, isUpdateForce = true),
@Column(name = "create_user", attrName = "createUser", label = "创建用户", isUpdate = false, isUpdateForce = true),
}, orderBy = "a.create_time DESC"
)
@Data
public class MyNotes extends DataEntity<MyNotes> implements Serializable {
@Serial
private static final long serialVersionUID = 1L;
private Date createTime; // 记录时间
private String noteId; // 唯一标识
private String title; // 标题
private String content; // 内容
private String priority; // 级别
private String ustatus; // 状态
private Date startTime; // 开始时间
private Date endTime; // 结束时间
private String type; // 类型
private Date deadline; // 截至时间
private Date updateTime; // 更新时间
private String createUser; // 创建用户
@ExcelFields({
@ExcelField(title="记录时间", attrName="createTime", align=Align.CENTER, sort=10, dataFormat="yyyy-MM-dd hh:mm"),
@ExcelField(title="唯一标识", attrName="noteId", align=Align.CENTER, sort=20),
@ExcelField(title="标题", attrName="title", align=Align.CENTER, sort=30),
@ExcelField(title="内容", attrName="content", align=Align.CENTER, sort=40),
@ExcelField(title="级别", attrName="priority", align=Align.CENTER, sort=50),
@ExcelField(title="状态", attrName="ustatus", align=Align.CENTER, sort=60),
@ExcelField(title="开始时间", attrName="startTime", align=Align.CENTER, sort=70, dataFormat="yyyy-MM-dd hh:mm"),
@ExcelField(title="结束时间", attrName="endTime", align=Align.CENTER, sort=80, dataFormat="yyyy-MM-dd hh:mm"),
@ExcelField(title="类型", attrName="type", align=Align.CENTER, sort=90),
@ExcelField(title="截至时间", attrName="deadline", align=Align.CENTER, sort=100, dataFormat="yyyy-MM-dd hh:mm"),
@ExcelField(title="更新时间", attrName="updateTime", align=Align.CENTER, sort=110, dataFormat="yyyy-MM-dd hh:mm"),
@ExcelField(title="创建用户", attrName="createUser", align=Align.CENTER, sort=120),
})
public MyNotes() {
this(null);
}
public MyNotes(String id){
super(id);
}
public Date getCreateTime_gte() {
return sqlMap.getWhere().getValue("create_time", QueryType.GTE);
}
@Serial
private static final long serialVersionUID = 1L;
private Date createTime; // 记录时间
private String noteId; // 唯一标识
private String title; // 标题
private String content; // 内容
private String priority; // 级别
private String ustatus; // 状态
private Date startTime; // 开始时间
private Date endTime; // 结束时间
private String type; // 类型
private Date deadline; // 截至时间
private Date updateTime; // 更新时间
private String createUser; // 创建用户
public void setCreateTime_gte(Date createTime) {
sqlMap.getWhere().and("create_time", QueryType.GTE, createTime);
}
public Date getCreateTime_lte() {
return sqlMap.getWhere().getValue("create_time", QueryType.LTE);
}
@ExcelFields({
@ExcelField(title = "记录时间", attrName = "createTime", align = Align.CENTER, sort = 10, dataFormat = "yyyy-MM-dd hh:mm"),
@ExcelField(title = "唯一标识", attrName = "noteId", align = Align.CENTER, sort = 20),
@ExcelField(title = "标题", attrName = "title", align = Align.CENTER, sort = 30),
@ExcelField(title = "内容", attrName = "content", align = Align.CENTER, sort = 40),
@ExcelField(title = "级别", attrName = "priority", dictType = "biz_priority", align = Align.CENTER, sort = 50),
@ExcelField(title = "状态", attrName = "ustatus", dictType = "note_status", align = Align.CENTER, sort = 60),
@ExcelField(title = "开始时间", attrName = "startTime", align = Align.CENTER, sort = 70, dataFormat = "yyyy-MM-dd hh:mm"),
@ExcelField(title = "结束时间", attrName = "endTime", align = Align.CENTER, sort = 80, dataFormat = "yyyy-MM-dd hh:mm"),
@ExcelField(title = "类型", attrName = "type", align = Align.CENTER, sort = 90),
@ExcelField(title = "截至时间", attrName = "deadline", align = Align.CENTER, sort = 100, dataFormat = "yyyy-MM-dd hh:mm"),
@ExcelField(title = "更新时间", attrName = "updateTime", align = Align.CENTER, sort = 110, dataFormat = "yyyy-MM-dd hh:mm"),
@ExcelField(title = "创建用户", attrName = "createUser", align = Align.CENTER, sort = 120),
})
public MyNotes() {
this(null);
}
public MyNotes(String id) {
super(id);
}
public Date getCreateTime_gte() {
return sqlMap.getWhere().getValue("create_time", QueryType.GTE);
}
public void setCreateTime_gte(Date createTime) {
sqlMap.getWhere().and("create_time", QueryType.GTE, createTime);
}
public Date getCreateTime_lte() {
return sqlMap.getWhere().getValue("create_time", QueryType.LTE);
}
public void setCreateTime_lte(Date createTime) {
sqlMap.getWhere().and("create_time", QueryType.LTE, createTime);
}
public void setCreateTime_lte(Date createTime) {
sqlMap.getWhere().and("create_time", QueryType.LTE, createTime);
}
}

View File

@@ -2,6 +2,7 @@ package com.jeesite.modules.biz.entity;
import java.io.Serializable;
import java.util.Date;
import com.jeesite.common.mybatis.annotation.JoinTable;
import com.jeesite.common.mybatis.annotation.JoinTable.Type;
import com.fasterxml.jackson.annotation.JsonFormat;
@@ -23,84 +24,94 @@ import java.io.Serial;
/**
* 人员信息 Entity
*
* @author gaoxq
* @version 2026-03-20
*/
@EqualsAndHashCode(callSuper = true)
@Table(name="my_person", alias="a", label="人员信息", columns={
@Column(name="create_time", attrName="createTime", label="记录时间", isUpdate=false, isUpdateForce=true),
@Column(name="person_id", attrName="personId", label="唯一主键", isPK=true),
@Column(name="person_name", attrName="personName", label="姓名", queryType=QueryType.LIKE),
@Column(name="gender", attrName="gender", label="性别"),
@Column(name="id_card", attrName="idCard", label="身份证号"),
@Column(name="phone", attrName="phone", label="手机号码", isQuery=false),
@Column(name="email", attrName="email", label="邮箱", isQuery=false),
@Column(name="birth_date", attrName="birthDate", label="出生日期", isQuery=false),
@Column(name="address", attrName="address", label="居住地址", isQuery=false),
@Column(name="department", attrName="department", label="所属部门", isQuery=false),
@Column(name="position_name", attrName="positionName", label="职位", isQuery=false),
@Column(name="ustatus", attrName="ustatus", label="状态"),
@Column(name="company_id", attrName="companyId", label="公司编号"),
@Column(name="update_time", attrName="updateTime", label="更新时间", isInsert=false, isQuery=false, isUpdateForce=true),
}, orderBy="a.create_time DESC"
@Table(name = "my_person", alias = "a", label = "人员信息", columns = {
@Column(name = "create_time", attrName = "createTime", label = "记录时间", isUpdate = false, isUpdateForce = true),
@Column(name = "person_id", attrName = "personId", label = "唯一主键", isPK = true),
@Column(name = "person_name", attrName = "personName", label = "姓名", queryType = QueryType.LIKE),
@Column(name = "gender", attrName = "gender", label = "性别"),
@Column(name = "id_card", attrName = "idCard", label = "身份证号"),
@Column(name = "phone", attrName = "phone", label = "手机号码", isQuery = false),
@Column(name = "email", attrName = "email", label = "邮箱", isQuery = false),
@Column(name = "birth_date", attrName = "birthDate", label = "出生日期", isQuery = false),
@Column(name = "address", attrName = "address", label = "居住地址", isQuery = false),
@Column(name = "department", attrName = "department", label = "所属部门", isQuery = false),
@Column(name = "position_name", attrName = "positionName", label = "职位", isQuery = false),
@Column(name = "ustatus", attrName = "ustatus", label = "状态"),
@Column(name = "company_id", attrName = "companyId", label = "公司编号"),
@Column(name = "update_time", attrName = "updateTime", label = "更新时间", isInsert = false, isQuery = false, isUpdateForce = true),
}, joinTable = {
@JoinTable(type = Type.LEFT_JOIN, entity = MyCompany.class, alias = "b",
on = "a.company_id = b.company_id", attrName = "this",
columns = {
@Column(name = "company_name", attrName = "companyName", label = "公司全称"),
}),
}, orderBy = "a.create_time DESC"
)
@Data
public class MyPerson extends DataEntity<MyPerson> implements Serializable {
@Serial
private static final long serialVersionUID = 1L;
private Date createTime; // 记录时间
private String personId; // 唯一主键
private String personName; // 姓名
private String gender; // 性别
private String idCard; // 身份证号
private String phone; // 手机号码
private String email; // 邮箱
private Date birthDate; // 出生日期
private String address; // 居住地址
private String department; // 所属部门
private String positionName; // 职位
private String ustatus; // 状态
private String companyId; // 公司编号
private Date updateTime; // 更新时间
@ExcelFields({
@ExcelField(title="记录时间", attrName="createTime", align=Align.CENTER, sort=10, dataFormat="yyyy-MM-dd hh:mm"),
@ExcelField(title="唯一主键", attrName="personId", align=Align.CENTER, sort=20),
@ExcelField(title="姓名", attrName="personName", align=Align.CENTER, sort=30),
@ExcelField(title="性别", attrName="gender", align=Align.CENTER, sort=40),
@ExcelField(title="身份证号", attrName="idCard", align=Align.CENTER, sort=50),
@ExcelField(title="手机号码", attrName="phone", align=Align.CENTER, sort=60),
@ExcelField(title="邮箱", attrName="email", align=Align.CENTER, sort=70),
@ExcelField(title="出生日期", attrName="birthDate", align=Align.CENTER, sort=80, dataFormat="yyyy-MM-dd hh:mm"),
@ExcelField(title="居住地址", attrName="address", align=Align.CENTER, sort=90),
@ExcelField(title="所属部门", attrName="department", align=Align.CENTER, sort=100),
@ExcelField(title="职位", attrName="positionName", align=Align.CENTER, sort=110),
@ExcelField(title="状态", attrName="ustatus", align=Align.CENTER, sort=120),
@ExcelField(title="公司编号", attrName="companyId", align=Align.CENTER, sort=130),
@ExcelField(title="更新时间", attrName="updateTime", align=Align.CENTER, sort=140, dataFormat="yyyy-MM-dd hh:mm"),
})
public MyPerson() {
this(null);
}
public MyPerson(String id){
super(id);
}
public Date getCreateTime_gte() {
return sqlMap.getWhere().getValue("create_time", QueryType.GTE);
}
@Serial
private static final long serialVersionUID = 1L;
private Date createTime; // 记录时间
private String personId; // 唯一主键
private String personName; // 姓名
private String gender; // 性别
private String idCard; // 身份证号
private String phone; // 手机号码
private String email; // 邮箱
private Date birthDate; // 出生日期
private String address; // 居住地址
private String department; // 所属部门
private String positionName; // 职位
private String ustatus; // 状态
private String companyId; // 公司编号
private Date updateTime; // 更新时间
public void setCreateTime_gte(Date createTime) {
sqlMap.getWhere().and("create_time", QueryType.GTE, createTime);
}
public Date getCreateTime_lte() {
return sqlMap.getWhere().getValue("create_time", QueryType.LTE);
}
private String companyName;
@ExcelFields({
@ExcelField(title = "记录时间", attrName = "createTime", align = Align.CENTER, sort = 10, dataFormat = "yyyy-MM-dd hh:mm"),
@ExcelField(title = "唯一主键", attrName = "personId", align = Align.CENTER, sort = 20),
@ExcelField(title = "姓名", attrName = "personName", align = Align.CENTER, sort = 30),
@ExcelField(title = "性别", attrName = "gender", align = Align.CENTER, sort = 40),
@ExcelField(title = "身份证号", attrName = "idCard", align = Align.CENTER, sort = 50),
@ExcelField(title = "手机号码", attrName = "phone", align = Align.CENTER, sort = 60),
@ExcelField(title = "邮箱", attrName = "email", align = Align.CENTER, sort = 70),
@ExcelField(title = "出生日期", attrName = "birthDate", align = Align.CENTER, sort = 80, dataFormat = "yyyy-MM-dd hh:mm"),
@ExcelField(title = "居住地址", attrName = "address", align = Align.CENTER, sort = 90),
@ExcelField(title = "所属部门", attrName = "department", align = Align.CENTER, sort = 100),
@ExcelField(title = "职位", attrName = "positionName", align = Align.CENTER, sort = 110),
@ExcelField(title = "状态", attrName = "ustatus", dictType = "biz_status", align = Align.CENTER, sort = 120),
@ExcelField(title = "公司名称", attrName = "companyName", align = Align.CENTER, sort = 130),
@ExcelField(title = "更新时间", attrName = "updateTime", align = Align.CENTER, sort = 140, dataFormat = "yyyy-MM-dd hh:mm"),
})
public MyPerson() {
this(null);
}
public MyPerson(String id) {
super(id);
}
public Date getCreateTime_gte() {
return sqlMap.getWhere().getValue("create_time", QueryType.GTE);
}
public void setCreateTime_gte(Date createTime) {
sqlMap.getWhere().and("create_time", QueryType.GTE, createTime);
}
public Date getCreateTime_lte() {
return sqlMap.getWhere().getValue("create_time", QueryType.LTE);
}
public void setCreateTime_lte(Date createTime) {
sqlMap.getWhere().and("create_time", QueryType.LTE, createTime);
}
public void setCreateTime_lte(Date createTime) {
sqlMap.getWhere().and("create_time", QueryType.LTE, createTime);
}
}

View File

@@ -30,7 +30,7 @@ import java.io.Serial;
@Column(name = "web_account", attrName = "webAccount", label = "登录账号", isQuery = false),
@Column(name = "web_password", attrName = "webPassword", label = "登录密码", isQuery = false),
@Column(name = "remarks", attrName = "remarks", label = "说明事项", isQuery = false),
@Column(name = "login_user", attrName = "loginUser", label = "所属账户", isUpdate = false, isQuery = false, isUpdateForce = true),
@Column(name = "login_user", attrName = "loginUser", label = "所属账户", isUpdate = false, isUpdateForce = true),
@Column(name = "ustatus", attrName = "ustatus", label = "状态"),
}, orderBy = "a.create_time DESC"
)
@@ -57,7 +57,7 @@ public class MyWebsiteStorage extends DataEntity<MyWebsiteStorage> implements Se
@ExcelField(title = "登录密码", attrName = "webPassword", align = Align.CENTER, sort = 60),
@ExcelField(title = "说明事项", attrName = "remarks", align = Align.CENTER, sort = 70),
@ExcelField(title = "所属账户", attrName = "loginUser", align = Align.CENTER, sort = 80),
@ExcelField(title = "状态", attrName = "ustatus", dictType = "sys_status", align = Align.CENTER, sort = 90),
@ExcelField(title = "状态", attrName = "ustatus", dictType = "biz_status", align = Align.CENTER, sort = 90),
})
public MyWebsiteStorage() {
this(null);

View File

@@ -28,6 +28,7 @@
import { BasicForm, FormSchema, useForm } from '@jeesite/core/components/Form';
import { BasicDrawer, useDrawerInner } from '@jeesite/core/components/Drawer';
import { MyCompany, myCompanySave, myCompanyForm } from '@jeesite/biz/api/biz/myCompany';
import { formatToDateTime } from '@jeesite/core/utils/dateUtil';
const emit = defineEmits(['success', 'register']);
@@ -158,7 +159,7 @@
field: 'ustatus',
component: 'Select',
componentProps: {
dictType: '',
dictType: 'biz_status',
allowClear: true,
},
required: true,
@@ -189,6 +190,7 @@
isNewRecord: record.value.isNewRecord,
companyId: record.value.companyId || data.companyId,
};
data[record.value.isNewRecord ? 'createTime' : 'updateTime'] = formatToDateTime(new Date());
// console.log('submit', params, data, record);
const res = await myCompanySave(params, data);
showMessage(res.message);

View File

@@ -101,7 +101,7 @@
field: 'ustatus',
component: 'Select',
componentProps: {
dictType: '',
dictType: 'biz_status',
allowClear: true,
},
},
@@ -222,7 +222,7 @@
sorter: true,
width: 130,
align: 'left',
dictType: '',
dictType: 'biz_status',
},
{
title: t('更新时间'),

View File

@@ -28,6 +28,11 @@
import { BasicForm, FormSchema, useForm } from '@jeesite/core/components/Form';
import { BasicDrawer, useDrawerInner } from '@jeesite/core/components/Drawer';
import { MyNotes, myNotesSave, myNotesForm } from '@jeesite/biz/api/biz/myNotes';
import { formatToDateTime } from '@jeesite/core/utils/dateUtil';
import { useUserStore } from '@jeesite/core/store/modules/user';
const userStore = useUserStore();
const userinfo = computed(() => userStore.getUserInfo);
const emit = defineEmits(['success', 'register']);
@@ -70,7 +75,7 @@
field: 'priority',
component: 'Select',
componentProps: {
dictType: '',
dictType: 'biz_priority',
allowClear: true,
},
required: true,
@@ -80,7 +85,7 @@
field: 'ustatus',
component: 'Select',
componentProps: {
dictType: '',
dictType: 'note_status',
allowClear: true,
},
required: true,
@@ -104,11 +109,11 @@
},
},
{
label: t('类型'),
label: t('便签类型'),
field: 'type',
component: 'Select',
componentProps: {
dictType: '',
dictType: 'note_type',
allowClear: true,
},
required: true,
@@ -149,6 +154,12 @@
isNewRecord: record.value.isNewRecord,
noteId: record.value.noteId || data.noteId,
};
if(record.value.isNewRecord){
data.createUser = userinfo.value.loginCode;
}
data[record.value.isNewRecord ? 'createTime' : 'updateTime'] = formatToDateTime(new Date());
// console.log('submit', params, data, record);
const res = await myNotesSave(params, data);
showMessage(res.message);

View File

@@ -28,7 +28,7 @@
</div>
</template>
<script lang="ts" setup name="ViewsBizMyNotesList">
import { onMounted, ref, unref } from 'vue';
import { computed, onMounted, ref, unref } from 'vue';
import { useI18n } from '@jeesite/core/hooks/web/useI18n';
import { useMessage } from '@jeesite/core/hooks/web/useMessage';
import { useGlobSetting } from '@jeesite/core/hooks/setting';
@@ -42,6 +42,11 @@
import { useModal } from '@jeesite/core/components/Modal';
import { FormProps } from '@jeesite/core/components/Form';
import InputForm from './form.vue';
import { useUserStore } from '@jeesite/core/store/modules/user';
const userStore = useUserStore();
const userinfo = computed(() => userStore.getUserInfo);
const { t } = useI18n('biz.myNotes');
const { showMessage } = useMessage();
@@ -91,7 +96,7 @@
field: 'priority',
component: 'Select',
componentProps: {
dictType: '',
dictType: 'biz_priority',
allowClear: true,
},
},
@@ -100,7 +105,7 @@
field: 'ustatus',
component: 'Select',
componentProps: {
dictType: '',
dictType: 'note_status',
allowClear: true,
},
},
@@ -109,7 +114,7 @@
field: 'type',
component: 'Select',
componentProps: {
dictType: '',
dictType: 'note_type',
allowClear: true,
},
},
@@ -150,7 +155,7 @@
sorter: true,
width: 130,
align: 'left',
dictType: '',
dictType: 'biz_priority',
},
{
title: t('状态'),
@@ -159,7 +164,7 @@
sorter: true,
width: 130,
align: 'left',
dictType: '',
dictType: 'note_status',
},
{
title: t('开始时间'),
@@ -184,7 +189,7 @@
sorter: true,
width: 130,
align: 'left',
dictType: '',
dictType: 'note_type',
},
{
title: t('截至时间'),
@@ -223,6 +228,7 @@
confirm: handleDelete.bind(this, record),
},
auth: 'biz:myNotes:edit',
ifShow: record.ustatus == 'todo',
},
],
};
@@ -230,7 +236,10 @@
const [registerTable, { reload, getForm }] = useTable<MyNotes>({
api: myNotesListData,
beforeFetch: (params) => {
return params;
return {
... params,
createUser: userinfo.value.loginCode,
};
},
columns: tableColumns,
actionColumn: actionColumn,

View File

@@ -28,6 +28,7 @@
import { BasicForm, FormSchema, useForm } from '@jeesite/core/components/Form';
import { BasicDrawer, useDrawerInner } from '@jeesite/core/components/Drawer';
import { MyPerson, myPersonSave, myPersonForm } from '@jeesite/biz/api/biz/myPerson';
import { formatToDateTime } from '@jeesite/core/utils/dateUtil';
const emit = defineEmits(['success', 'register']);
@@ -49,7 +50,7 @@
colProps: { md: 24, lg: 24 },
},
{
label: t('姓名'),
label: t('员工姓名'),
field: 'personName',
component: 'Input',
componentProps: {
@@ -58,11 +59,12 @@
required: true,
},
{
label: t('性别'),
label: t('员工性别'),
field: 'gender',
component: 'Input',
component: 'Select',
componentProps: {
maxlength: 12,
dictType: 'sys_user_sex',
allowClear: true,
},
required: true,
},
@@ -129,20 +131,22 @@
{
label: t('所属公司'),
field: 'companyId',
component: 'Select',
componentProps: {
dictType: '',
allowClear: true,
},
fieldLabel: 'companyName',
component: 'ListSelect',
componentProps: {
selectType: 'bizCompSelect',
},
required: true,
},
{
label: t('人员状态'),
field: 'ustatus',
component: 'Select',
componentProps: {
dictType: '',
dictType: 'biz_status',
allowClear: true,
},
required: true,
},
];
@@ -170,6 +174,7 @@
isNewRecord: record.value.isNewRecord,
personId: record.value.personId || data.personId,
};
data[record.value.isNewRecord ? 'createTime' : 'updateTime'] = formatToDateTime(new Date());
// console.log('submit', params, data, record);
const res = await myPersonSave(params, data);
showMessage(res.message);

View File

@@ -84,7 +84,11 @@
{
label: t('性别'),
field: 'gender',
component: 'Input',
component: 'Select',
componentProps: {
dictType: 'sys_user_sex',
allowClear: true,
},
},
{
label: t('身份证号'),
@@ -92,12 +96,12 @@
component: 'Input',
},
{
label: t('公司编号'),
label: t('公司名称'),
field: 'companyId',
component: 'Select',
fieldLabel: 'companyName',
component: 'ListSelect',
componentProps: {
dictType: '',
allowClear: true,
selectType: 'bizCompSelect',
},
},
{
@@ -105,7 +109,7 @@
field: 'ustatus',
component: 'Select',
componentProps: {
dictType: '',
dictType: 'biz_status',
allowClear: true,
},
},
@@ -138,6 +142,7 @@
sorter: true,
width: 130,
align: 'left',
dictType: 'sys_user_sex',
},
{
title: t('身份证号'),
@@ -147,6 +152,14 @@
width: 130,
align: 'left',
},
{
title: t('公司名称'),
dataIndex: 'companyName',
key: 'b.company_name',
sorter: true,
width: 200,
align: 'left',
},
{
title: t('手机号码'),
dataIndex: 'phone',
@@ -202,16 +215,7 @@
sorter: true,
width: 130,
align: 'left',
dictType: '',
},
{
title: t('公司编号'),
dataIndex: 'companyId',
key: 'a.company_id',
sorter: true,
width: 130,
align: 'left',
dictType: '',
dictType: 'biz_status',
},
{
title: t('更新时间'),

View File

@@ -28,6 +28,11 @@
import { BasicForm, FormSchema, useForm } from '@jeesite/core/components/Form';
import { BasicDrawer, useDrawerInner } from '@jeesite/core/components/Drawer';
import { MyWebsiteStorage, myWebsiteStorageSave, myWebsiteStorageForm } from '@jeesite/biz/api/biz/myWebsiteStorage';
import { formatToDateTime } from '@jeesite/core/utils/dateUtil';
import { useUserStore } from '@jeesite/core/store/modules/user';
const userStore = useUserStore();
const userinfo = computed(() => userStore.getUserInfo);
const emit = defineEmits(['success', 'register']);
@@ -62,7 +67,7 @@
field: 'ustatus',
component: 'Select',
componentProps: {
dictType: 'sys_status',
dictType: 'biz_status',
allowClear: true,
},
required: true,
@@ -139,6 +144,12 @@
isNewRecord: record.value.isNewRecord,
websiteId: record.value.websiteId || data.websiteId,
};
if(record.value.isNewRecord){
data.loginUser = userinfo.value.loginCode;
}
data[record.value.isNewRecord ? 'createTime' : 'updateTime'] = formatToDateTime(new Date());
// console.log('submit', params, data, record);
const res = await myWebsiteStorageSave(params, data);
showMessage(res.message);

View File

@@ -28,7 +28,7 @@
</div>
</template>
<script lang="ts" setup name="ViewsBizMyWebsiteStorageList">
import { onMounted, ref, unref } from 'vue';
import { computed, onMounted, ref, unref } from 'vue';
import { useI18n } from '@jeesite/core/hooks/web/useI18n';
import { useMessage } from '@jeesite/core/hooks/web/useMessage';
import { useGlobSetting } from '@jeesite/core/hooks/setting';
@@ -42,6 +42,10 @@
import { useModal } from '@jeesite/core/components/Modal';
import { FormProps } from '@jeesite/core/components/Form';
import InputForm from './form.vue';
import { useUserStore } from '@jeesite/core/store/modules/user';
const userStore = useUserStore();
const userinfo = computed(() => userStore.getUserInfo);
const { t } = useI18n('biz.myWebsiteStorage');
const { showMessage } = useMessage();
@@ -73,7 +77,7 @@
field: 'ustatus',
component: 'Select',
componentProps: {
dictType: 'sys_status',
dictType: 'biz_status',
allowClear: true,
},
},
@@ -130,7 +134,7 @@
sorter: true,
width: 130,
align: 'center',
dictType: 'sys_status',
dictType: 'biz_status',
},
];
@@ -152,15 +156,29 @@
title: t('是否确认删除网站?'),
confirm: handleDelete.bind(this, record),
},
ifShow: record.ustatus == '2',
auth: 'biz:myWebsiteStorage:edit',
},
{
icon: 'ant-design:link-outlined',
color: 'warning',
title: t('访问'),
popConfirm: {
title: t('是否确认访问网站?'),
confirm: handleOpen.bind(this, record),
},
ifShow: record.ustatus == '1'
},
],
};
const [registerTable, { reload, getForm }] = useTable<MyWebsiteStorage>({
api: myWebsiteStorageListData,
beforeFetch: (params) => {
return params;
return {
...params,
loginUser: userinfo.value.loginCode,
};
},
columns: tableColumns,
actionColumn: actionColumn,
@@ -181,6 +199,11 @@
function handleForm(record: Recordable) {
openDrawer(true, record);
}
function handleOpen(record: Recordable) {
if (!record?.websiteUrl) return;
window.open(record.websiteUrl, '_blank');
}
async function handleExport() {
loading.value = true;
@@ -198,7 +221,7 @@
showMessage(res.message);
await handleSuccess(record);
}
async function handleSuccess(record: Recordable) {
await reload({ record });
}

View File

@@ -12,50 +12,22 @@ const searchForm: FormProps<MyCompany> = {
baseColProps: { md: 8, lg: 6 },
labelWidth: 90,
schemas: [
{
label: t('记录时间起'),
field: 'createTime_gte',
component: 'DatePicker',
componentProps: {
format: 'YYYY-MM-DD HH:mm',
showTime: { format: 'HH:mm' },
},
},
{
label: t('记录时间止'),
field: 'createTime_lte',
component: 'DatePicker',
componentProps: {
format: 'YYYY-MM-DD HH:mm',
showTime: { format: 'HH:mm' },
},
},
{
label: t('公司全称'),
field: 'companyName',
component: 'Input',
},
{
label: t('统一社会信用代码'),
label: t('信用代码'),
field: 'creditCode',
component: 'Input',
},
{
label: t('所在省份'),
field: 'province',
component: 'Input',
},
{
label: t('公司电话'),
field: 'contactPhone',
component: 'Input',
},
{
label: t('数据状态'),
field: 'ustatus',
component: 'Select',
componentProps: {
dictType: '',
dictType: 'biz_status',
allowClear: true,
},
},
@@ -68,9 +40,9 @@ const tableColumns: BasicColumn<MyCompany>[] = [
dataIndex: 'createTime',
key: 'a.create_time',
sorter: true,
width: 230,
align: 'left',
slot: 'firstColumn',
width: 150,
align: 'center',
fixed: 'left',
},
{
title: t('公司全称'),
@@ -93,7 +65,7 @@ const tableColumns: BasicColumn<MyCompany>[] = [
dataIndex: 'creditCode',
key: 'a.credit_code',
sorter: true,
width: 130,
width: 225,
align: 'left',
},
{
@@ -117,33 +89,9 @@ const tableColumns: BasicColumn<MyCompany>[] = [
dataIndex: 'establishDate',
key: 'a.establish_date',
sorter: true,
width: 130,
width: 150,
align: 'center',
},
{
title: t('所在省份'),
dataIndex: 'province',
key: 'a.province',
sorter: true,
width: 130,
align: 'left',
},
{
title: t('所在城市'),
dataIndex: 'city',
key: 'a.city',
sorter: true,
width: 130,
align: 'left',
},
{
title: t('注册地址'),
dataIndex: 'address',
key: 'a.address',
sorter: true,
width: 130,
align: 'left',
},
{
title: t('经营范围'),
dataIndex: 'businessScope',
@@ -169,21 +117,13 @@ const tableColumns: BasicColumn<MyCompany>[] = [
align: 'left',
},
{
title: t('数据状态'),
title: t('公司状态'),
dataIndex: 'ustatus',
key: 'a.ustatus',
sorter: true,
width: 130,
align: 'left',
dictType: '',
},
{
title: t('更新时间'),
dataIndex: 'updateTime',
key: 'a.update_time',
sorter: true,
width: 130,
align: 'center',
dictType: 'biz_status',
},
];
@@ -202,6 +142,6 @@ export default {
modalProps,
tableProps,
itemCode: 'companyId',
itemName: 'companyId',
isShowCode: false,
itemName: 'companyName',
isShowCode: true,
};

View File

@@ -31,25 +31,6 @@ const searchForm: FormProps = {
allowClear: true,
},
},
{
field: 'none',
component: 'None',
},
{
label: t('手机'),
field: 'mobile',
component: 'Input',
},
{
label: t('邮箱'),
field: 'email',
component: 'Input',
},
{
label: t('电话'),
field: 'phone',
component: 'Input',
},
],
};

View File

@@ -25,8 +25,8 @@
<script lang="ts" setup>
import { computed } from 'vue';
import { Avatar } from 'ant-design-vue';
import { useUserStore } from '@jeesite/core/store/modules/user';
import headerImg from '@jeesite/assets/images/header.jpg';
import { useUserStore } from '@jeesite/core/store/modules/user';
const userStore = useUserStore();
const userinfo = computed(() => userStore.getUserInfo);