|
@@ -62,6 +62,7 @@ export class SelfAssessmentListRow extends DataModel<SelfAssessmentListRow> {
|
|
|
province: { clientSide: 'number', serverSide: 'number' },
|
|
province: { clientSide: 'number', serverSide: 'number' },
|
|
|
provincePoints: { clientSide: 'number', serverSide: 'number' },
|
|
provincePoints: { clientSide: 'number', serverSide: 'number' },
|
|
|
level: { clientSide: 'number', serverSide: 'string' },
|
|
level: { clientSide: 'number', serverSide: 'string' },
|
|
|
|
|
+ progress: { clientSide: 'number', serverSide: 'number' },
|
|
|
};
|
|
};
|
|
|
this._convertKeyType = (key) => {
|
|
this._convertKeyType = (key) => {
|
|
|
if (key.endsWith('Text') || key.endsWith('_text')) {
|
|
if (key.endsWith('Text') || key.endsWith('_text')) {
|
|
@@ -96,6 +97,8 @@ export class SelfAssessmentListRow extends DataModel<SelfAssessmentListRow> {
|
|
|
createtime = '' as string;
|
|
createtime = '' as string;
|
|
|
updatetime = '' as string;
|
|
updatetime = '' as string;
|
|
|
selfText = '' as string;
|
|
selfText = '' as string;
|
|
|
|
|
+ /** -1=未提交,0=草稿,1=已自评,2~5 各级审核完成 */
|
|
|
|
|
+ progress = null as number|null;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/** 传承协议列表行 */
|
|
/** 传承协议列表行 */
|
|
@@ -135,6 +138,157 @@ export class AgreementListRow extends DataModel<AgreementListRow> {
|
|
|
deletetime = '' as string|null;
|
|
deletetime = '' as string|null;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+/** 保护单位账号:传承人传承协议分页列表行(ich/check/getUserAgreement) */
|
|
|
|
|
+export class UserAgreementListRow extends DataModel<UserAgreementListRow> {
|
|
|
|
|
+ constructor() {
|
|
|
|
|
+ super(UserAgreementListRow, '传承人传承协议列表项');
|
|
|
|
|
+ this.setNameMapperCase('Camel', 'Snake');
|
|
|
|
|
+ this._convertTable = {
|
|
|
|
|
+ id: { clientSide: 'number', serverSide: 'number' },
|
|
|
|
|
+ sitesId: { clientSide: 'number', serverSide: 'number' },
|
|
|
|
|
+ batch: { clientSide: 'number', serverSide: 'number' },
|
|
|
|
|
+ ichId: { clientSide: 'number', serverSide: 'number' },
|
|
|
|
|
+ agreementId: { clientSide: 'number', serverSide: 'number' },
|
|
|
|
|
+ userId: { clientSide: 'number', serverSide: 'number' },
|
|
|
|
|
+ year: { clientSide: 'number', serverSide: 'number' },
|
|
|
|
|
+ apprentice: { clientSide: 'number', serverSide: 'number' },
|
|
|
|
|
+ activity: { clientSide: 'number', serverSide: 'number' },
|
|
|
|
|
+ course: { clientSide: 'number', serverSide: 'number' },
|
|
|
|
|
+ progress: { clientSide: 'number', serverSide: 'number' },
|
|
|
|
|
+ level: { clientSide: 'number', serverSide: 'string' },
|
|
|
|
|
+ };
|
|
|
|
|
+ this._convertKeyType = (key) => {
|
|
|
|
|
+ if (key.endsWith('Text') || key.endsWith('_text')) {
|
|
|
|
|
+ return { clientSide: 'string', serverSide: 'undefined' };
|
|
|
|
|
+ }
|
|
|
|
|
+ return undefined;
|
|
|
|
|
+ };
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ id = 0 as number;
|
|
|
|
|
+ title = '' as string;
|
|
|
|
|
+ associationId = '' as string;
|
|
|
|
|
+ sitesId = 0 as number;
|
|
|
|
|
+ level = null as number|string|null;
|
|
|
|
|
+ batch = 0 as number;
|
|
|
|
|
+ gender = '' as string;
|
|
|
|
|
+ basicMobile = '' as string|null;
|
|
|
|
|
+ basicUnit = '' as string|null;
|
|
|
|
|
+ ichId = 0 as number;
|
|
|
|
|
+ ichTitle = '' as string;
|
|
|
|
|
+ /** 已填写的传承协议记录 ID,未填写时为 null */
|
|
|
|
|
+ agreementId = null as number|null;
|
|
|
|
|
+ userId = null as number|null;
|
|
|
|
|
+ year = null as number|null;
|
|
|
|
|
+ partyA = '' as string|null;
|
|
|
|
|
+ partyB = '' as string|null;
|
|
|
|
|
+ apprentice = null as number|null;
|
|
|
|
|
+ activity = null as number|null;
|
|
|
|
|
+ course = null as number|null;
|
|
|
|
|
+ mobile = '' as string|null;
|
|
|
|
|
+ partyAMobile = '' as string|null;
|
|
|
|
|
+ partyAContact = '' as string|null;
|
|
|
|
|
+ idCard = '' as string|null;
|
|
|
|
|
+ health = '' as string|null;
|
|
|
|
|
+ ich = '' as string|null;
|
|
|
|
|
+ partyASign = '' as string|null;
|
|
|
|
|
+ partyBSign = '' as string|null;
|
|
|
|
|
+ /** -1=未提交,0=草稿,1=已自评,2=审核完成 */
|
|
|
|
|
+ progress = null as number|null;
|
|
|
|
|
+ createtime = '' as string|null;
|
|
|
|
|
+ updatetime = '' as string|null;
|
|
|
|
|
+ deletetime = '' as string|null;
|
|
|
|
|
+ batchText = '' as string;
|
|
|
|
|
+ ichSiteTypeText = '' as string;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+/** 保护单位账号:传承人列表行(ich/check/getInheritorList) */
|
|
|
|
|
+export class InheritorCheckListRow extends DataModel<InheritorCheckListRow> {
|
|
|
|
|
+ constructor() {
|
|
|
|
|
+ super(InheritorCheckListRow, '传承人列表项');
|
|
|
|
|
+ this.setNameMapperCase('Camel', 'Snake');
|
|
|
|
|
+ this._convertTable = {
|
|
|
|
|
+ id: { clientSide: 'number', serverSide: 'number' },
|
|
|
|
|
+ sitesId: { clientSide: 'number', serverSide: 'number' },
|
|
|
|
|
+ batch: { clientSide: 'number', serverSide: 'number' },
|
|
|
|
|
+ ichId: { clientSide: 'number', serverSide: 'number' },
|
|
|
|
|
+ checkId: { clientSide: 'number', serverSide: 'number' },
|
|
|
|
|
+ userId: { clientSide: 'number', serverSide: 'number' },
|
|
|
|
|
+ year: { clientSide: 'number', serverSide: 'number' },
|
|
|
|
|
+ weigh: { clientSide: 'number', serverSide: 'number' },
|
|
|
|
|
+ deductPoints: { clientSide: 'number', serverSide: 'number' },
|
|
|
|
|
+ points: { clientSide: 'number', serverSide: 'number' },
|
|
|
|
|
+ self: { clientSide: 'number', serverSide: 'number' },
|
|
|
|
|
+ ichUnit: { clientSide: 'number', serverSide: 'number' },
|
|
|
|
|
+ unitPoints: { clientSide: 'number', serverSide: 'number' },
|
|
|
|
|
+ county: { clientSide: 'number', serverSide: 'number' },
|
|
|
|
|
+ countyPoints: { clientSide: 'number', serverSide: 'number' },
|
|
|
|
|
+ district: { clientSide: 'number', serverSide: 'number' },
|
|
|
|
|
+ districtPoints: { clientSide: 'number', serverSide: 'number' },
|
|
|
|
|
+ province: { clientSide: 'number', serverSide: 'number' },
|
|
|
|
|
+ provincePoints: { clientSide: 'number', serverSide: 'number' },
|
|
|
|
|
+ progress: { clientSide: 'number', serverSide: 'number' },
|
|
|
|
|
+ level: { clientSide: 'number', serverSide: 'string' },
|
|
|
|
|
+ };
|
|
|
|
|
+ this._convertKeyType = (key) => {
|
|
|
|
|
+ if (key.endsWith('Text') || key.endsWith('_text')) {
|
|
|
|
|
+ return { clientSide: 'string', serverSide: 'undefined' };
|
|
|
|
|
+ }
|
|
|
|
|
+ return undefined;
|
|
|
|
|
+ };
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ id = 0 as number;
|
|
|
|
|
+ title = '' as string;
|
|
|
|
|
+ /** 关联项目 ID(接口可能返回字符串数字) */
|
|
|
|
|
+ associationId = '' as string;
|
|
|
|
|
+ sitesId = 0 as number;
|
|
|
|
|
+ level = null as number|string|null;
|
|
|
|
|
+ batch = 0 as number;
|
|
|
|
|
+ gender = '' as string;
|
|
|
|
|
+ basicMobile = '' as string|null;
|
|
|
|
|
+ basicUnit = '' as string|null;
|
|
|
|
|
+ ichId = 0 as number;
|
|
|
|
|
+ ichTitle = '' as string;
|
|
|
|
|
+ checkId = null as number|null;
|
|
|
|
|
+ userId = null as number|null;
|
|
|
|
|
+ year = null as number|null;
|
|
|
|
|
+ inheritor = '' as string|null;
|
|
|
|
|
+ unit = '' as string|null;
|
|
|
|
|
+ ichName = '' as string|null;
|
|
|
|
|
+ mobile = '' as string|null;
|
|
|
|
|
+ idCard = '' as string|null;
|
|
|
|
|
+ address = '' as string|null;
|
|
|
|
|
+ weigh = null as number|null;
|
|
|
|
|
+ deductPoints = null as number|null;
|
|
|
|
|
+ points = null as number|null;
|
|
|
|
|
+ self = null as number|null;
|
|
|
|
|
+ ichUnit = null as number|null;
|
|
|
|
|
+ unitPoints = null as number|null;
|
|
|
|
|
+ county = null as number|null;
|
|
|
|
|
+ countyPoints = null as number|null;
|
|
|
|
|
+ district = null as number|null;
|
|
|
|
|
+ districtPoints = null as number|null;
|
|
|
|
|
+ province = null as number|null;
|
|
|
|
|
+ provincePoints = null as number|null;
|
|
|
|
|
+ createtime = '' as string|null;
|
|
|
|
|
+ updatetime = '' as string|null;
|
|
|
|
|
+ /** -1=未提交,0=草稿,1=已自评,2=项目保护单位审核完成,3=县(区)文旅部门审核完成,4=设区市文旅部门/省非遗中心审核完成,5=省文化和旅游厅审核完成 */
|
|
|
|
|
+ progress = null as number|null;
|
|
|
|
|
+ flagText = '' as string;
|
|
|
|
|
+ typeText = '' as string;
|
|
|
|
|
+ openStatusText = '' as string;
|
|
|
|
|
+ statusText = '' as string;
|
|
|
|
|
+ regionText = '' as string;
|
|
|
|
|
+ levelText = '' as string;
|
|
|
|
|
+ crTypeText = '' as string;
|
|
|
|
|
+ ichTypeText = '' as string;
|
|
|
|
|
+ claimStatusText = '' as string;
|
|
|
|
|
+ isMultipleClaimsText = '' as string;
|
|
|
|
|
+ batchText = '' as string;
|
|
|
|
|
+ ichSiteTypeText = '' as string;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
/** 传承人基础信息(ich/check/basic) */
|
|
/** 传承人基础信息(ich/check/basic) */
|
|
|
export class InheritorCheckBasicInfo extends DataModel<InheritorCheckBasicInfo> {
|
|
export class InheritorCheckBasicInfo extends DataModel<InheritorCheckBasicInfo> {
|
|
|
constructor() {
|
|
constructor() {
|
|
@@ -221,6 +375,8 @@ export class SelfAssessmentDetail extends DataModel<SelfAssessmentDetail> {
|
|
|
content: {
|
|
content: {
|
|
|
customToClientFn: (value) => {
|
|
customToClientFn: (value) => {
|
|
|
try {
|
|
try {
|
|
|
|
|
+ if (typeof value === 'object')
|
|
|
|
|
+ return value;
|
|
|
return JSON.parse(value as string);
|
|
return JSON.parse(value as string);
|
|
|
} catch {
|
|
} catch {
|
|
|
return {};
|
|
return {};
|
|
@@ -377,6 +533,26 @@ export function getCheckAnnexType(mimetype: string) {
|
|
|
|
|
|
|
|
export type CheckAnnexTypeValue = (typeof CheckAnnexType)[keyof typeof CheckAnnexType];
|
|
export type CheckAnnexTypeValue = (typeof CheckAnnexType)[keyof typeof CheckAnnexType];
|
|
|
|
|
|
|
|
|
|
+/** 自查表审核提交(POST /ich/check/review) */
|
|
|
|
|
+export interface IchCheckReviewPayload {
|
|
|
|
|
+ /** 自查表 ID */
|
|
|
|
|
+ id: number;
|
|
|
|
|
+ /** 项目保护单位意见: 1=优秀,2=合格,3=不合格,4=丧失传承能力,5=取消资格 */
|
|
|
|
|
+ ichUnit?: number;
|
|
|
|
|
+ unitPoints?: number;
|
|
|
|
|
+ /** 县(区)文旅部门审核意见,取值同 ichUnit */
|
|
|
|
|
+ county?: number;
|
|
|
|
|
+ countyPoints?: number;
|
|
|
|
|
+ /** 设区市文旅部门、省非遗中心审核意见,取值同 ichUnit */
|
|
|
|
|
+ district?: number;
|
|
|
|
|
+ districtPoints?: number;
|
|
|
|
|
+ /** 省文化和旅游厅意见,取值同 ichUnit */
|
|
|
|
|
+ province?: number;
|
|
|
|
|
+ provincePoints?: number;
|
|
|
|
|
+ /** 0=草稿,1=已自评,2=项目保护单位审核完成,3=县(区)文旅部门审核完成,4=设区市文旅部门/省非遗中心审核完成,5=省文化和旅游厅审核完成 */
|
|
|
|
|
+ progress: number;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
/** 证明材料修改与新增请求体(POST /ich/check/saveAnnex) */
|
|
/** 证明材料修改与新增请求体(POST /ich/check/saveAnnex) */
|
|
|
export interface SaveCheckAnnexPayload {
|
|
export interface SaveCheckAnnexPayload {
|
|
|
id?: number;
|
|
id?: number;
|
|
@@ -491,6 +667,7 @@ export class AssessmentContentApi extends AppServerRequestModule<DataModel> {
|
|
|
|
|
|
|
|
async getSelfAssessmentList(data: {
|
|
async getSelfAssessmentList(data: {
|
|
|
userId?: number;
|
|
userId?: number;
|
|
|
|
|
+ progress?: number;
|
|
|
level?: number;
|
|
level?: number;
|
|
|
year?: number;
|
|
year?: number;
|
|
|
keywords?: string;
|
|
keywords?: string;
|
|
@@ -499,6 +676,7 @@ export class AssessmentContentApi extends AppServerRequestModule<DataModel> {
|
|
|
}) {
|
|
}) {
|
|
|
const res = await this.post('/ich/check/getList', {
|
|
const res = await this.post('/ich/check/getList', {
|
|
|
user_id: data.userId,
|
|
user_id: data.userId,
|
|
|
|
|
+ progress: data.progress,
|
|
|
level: data.level,
|
|
level: data.level,
|
|
|
year: data.year,
|
|
year: data.year,
|
|
|
keywords: data.keywords,
|
|
keywords: data.keywords,
|
|
@@ -527,6 +705,56 @@ export class AssessmentContentApi extends AppServerRequestModule<DataModel> {
|
|
|
return normalizePaginated<AgreementListRow>(AgreementListRow, res.data as KeyValue);
|
|
return normalizePaginated<AgreementListRow>(AgreementListRow, res.data as KeyValue);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 保护单位账号:传承人传承协议分页列表
|
|
|
|
|
+ * @param data.progress -1=未提交,0=草稿,1=已自评,2=审核完成
|
|
|
|
|
+ */
|
|
|
|
|
+ async getUserAgreementList(data: {
|
|
|
|
|
+ userId?: number;
|
|
|
|
|
+ progress?: number;
|
|
|
|
|
+ level?: number;
|
|
|
|
|
+ year?: number;
|
|
|
|
|
+ keywords?: string;
|
|
|
|
|
+ page?: number;
|
|
|
|
|
+ pageSize?: number;
|
|
|
|
|
+ }) {
|
|
|
|
|
+ const res = await this.post('/ich/check/getUserAgreement', {
|
|
|
|
|
+ user_id: data.userId,
|
|
|
|
|
+ progress: data.progress,
|
|
|
|
|
+ level: data.level,
|
|
|
|
|
+ year: data.year,
|
|
|
|
|
+ keywords: data.keywords,
|
|
|
|
|
+ page: data.page,
|
|
|
|
|
+ pageSize: data.pageSize,
|
|
|
|
|
+ }, '传承人传承协议列表');
|
|
|
|
|
+ return normalizePaginated<UserAgreementListRow>(UserAgreementListRow, res.data as KeyValue);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 保护单位账号:传承人分页列表
|
|
|
|
|
+ * @param data.progress -1=未提交,0=草稿,1=已自评,2=项目保护单位审核完成,3=县(区)文旅部门审核完成,4=设区市文旅部门/省非遗中心审核完成,5=省文化和旅游厅审核完成
|
|
|
|
|
+ */
|
|
|
|
|
+ async getInheritorList(data: {
|
|
|
|
|
+ userId?: number;
|
|
|
|
|
+ progress?: number;
|
|
|
|
|
+ level?: number;
|
|
|
|
|
+ year?: number;
|
|
|
|
|
+ keywords?: string;
|
|
|
|
|
+ page?: number;
|
|
|
|
|
+ pageSize?: number;
|
|
|
|
|
+ }) {
|
|
|
|
|
+ const res = await this.post('/ich/check/getInheritorList', {
|
|
|
|
|
+ user_id: data.userId,
|
|
|
|
|
+ progress: data.progress,
|
|
|
|
|
+ level: data.level,
|
|
|
|
|
+ year: data.year,
|
|
|
|
|
+ keywords: data.keywords,
|
|
|
|
|
+ page: data.page,
|
|
|
|
|
+ pageSize: data.pageSize,
|
|
|
|
|
+ }, '传承人列表');
|
|
|
|
|
+ return normalizePaginated<InheritorCheckListRow>(InheritorCheckListRow, res.data as KeyValue);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
async saveAgreement(dataModel: AgreementDetail) {
|
|
async saveAgreement(dataModel: AgreementDetail) {
|
|
|
return this.post('/ich/check/saveAgreement', dataModel.toServerSide(), '传承协议保存');
|
|
return this.post('/ich/check/saveAgreement', dataModel.toServerSide(), '传承协议保存');
|
|
|
}
|
|
}
|
|
@@ -535,6 +763,25 @@ export class AssessmentContentApi extends AppServerRequestModule<DataModel> {
|
|
|
return this.post('/ich/check/save', dataModel.toServerSide(), '自查评估表保存');
|
|
return this.post('/ich/check/save', dataModel.toServerSide(), '自查评估表保存');
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 自查评估表审核
|
|
|
|
|
+ * POST `/ich/check/review`
|
|
|
|
|
+ */
|
|
|
|
|
+ async reviewSelfAssessment(payload: IchCheckReviewPayload) {
|
|
|
|
|
+ return this.post('/ich/check/review', {
|
|
|
|
|
+ id: payload.id,
|
|
|
|
|
+ ich_unit: payload.ichUnit,
|
|
|
|
|
+ unit_points: payload.unitPoints,
|
|
|
|
|
+ county: payload.county,
|
|
|
|
|
+ county_points: payload.countyPoints,
|
|
|
|
|
+ district: payload.district,
|
|
|
|
|
+ district_points: payload.districtPoints,
|
|
|
|
|
+ province: payload.province,
|
|
|
|
|
+ province_points: payload.provincePoints,
|
|
|
|
|
+ progress: payload.progress,
|
|
|
|
|
+ }, '自查评估表审核');
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
async downloadSelfAssessmentPdf(id: number) {
|
|
async downloadSelfAssessmentPdf(id: number) {
|
|
|
await downloadPdfBlob('/pdf/create', id, this.config.baseUrl, `self-assessment-${id}.pdf`);
|
|
await downloadPdfBlob('/pdf/create', id, this.config.baseUrl, `self-assessment-${id}.pdf`);
|
|
|
}
|
|
}
|