Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wenHuaBu_adminServer
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
node_server
wenHuaBu_adminServer
Commits
db4a75d8
Commit
db4a75d8
authored
Apr 18, 2024
by
lixinming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no message
parent
218abffc
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
110 additions
and
111 deletions
+110
-111
member.ts
src/biz/member/member.ts
+1
-1
officialWebsite.ts
src/biz/officialWebsite.ts
+80
-82
wenZiZiLiao.ts
src/biz/portal/dangJianGonZuo/wenZiZiLiao.ts
+11
-12
jiGouGuanLi.ts
src/biz/portal/fenZhiJiGou/jiGouGuanLi.ts
+3
-1
register.ts
src/biz/register.ts
+1
-1
enum.ts
src/config/enum.ts
+5
-2
errorEnum.ts
src/config/errorEnum.ts
+3
-1
router.ts
src/routers/officalWebsite/router.ts
+3
-7
router.ts
src/routers/portal/router.ts
+1
-2
router.ts
src/routers/router.ts
+2
-2
No files found.
src/biz/member/member.ts
View file @
db4a75d8
...
@@ -78,7 +78,7 @@ export async function unitMemberList({unitName, joinTime, unitMemberType, member
...
@@ -78,7 +78,7 @@ export async function unitMemberList({unitName, joinTime, unitMemberType, member
*/
*/
const
UnitBasicConfig
=
[
"userId"
,
"unitName"
,
"uscc"
,
"legalPerson"
,
"legalPersonPhone"
,
"legalPersonMail"
,
"unitMail"
,
"contactPerson"
,
"contactPersonDuties"
,
"contactPersonPhone"
,
const
UnitBasicConfig
=
[
"userId"
,
"unitName"
,
"uscc"
,
"legalPerson"
,
"legalPersonPhone"
,
"legalPersonMail"
,
"unitMail"
,
"contactPerson"
,
"contactPersonDuties"
,
"contactPersonPhone"
,
"uusinessLicenseUrl"
,
"addres"
,
"sheng"
,
"shi"
,
"qu"
];
"uusinessLicenseUrl"
,
"addres"
,
"sheng"
,
"shi"
,
"qu"
,
"applicationForm"
];
const
UnitConfig
=
[
"unitMemberType"
,
"yuanXiaoBanXueLeiXing"
,
"yuanXiaoZhuGuanBuMen"
,
"yuanXiaoFuZeRen"
,
"yuanXiaoFuZeRenZhiWu"
,
"yuanXiaoFuZeRenDianHua"
,
const
UnitConfig
=
[
"unitMemberType"
,
"yuanXiaoBanXueLeiXing"
,
"yuanXiaoZhuGuanBuMen"
,
"yuanXiaoFuZeRen"
,
"yuanXiaoFuZeRenZhiWu"
,
"yuanXiaoFuZeRenDianHua"
,
"yuanXiaoBanGongFuZeRen"
,
"yuanXiaoBanGongFuZeRenDianHua"
,
"ZhuYaoFuZeRenYouXiang"
,
"yuanXiaoKeYanFuZeRen"
,
"yuanXiaoKeYanFuZeRenDianHua"
,
"yuanXiaoBanGongFuZeRen"
,
"yuanXiaoBanGongFuZeRenDianHua"
,
"ZhuYaoFuZeRenYouXiang"
,
"yuanXiaoKeYanFuZeRen"
,
"yuanXiaoKeYanFuZeRenDianHua"
,
"jiaoXueFuZeRenXinMing"
,
"jiaoXueFuZeRenDianHua"
];
"jiaoXueFuZeRenXinMing"
,
"jiaoXueFuZeRenDianHua"
];
...
...
src/biz/officialWebsite.ts
View file @
db4a75d8
...
@@ -434,17 +434,16 @@ export async function zhuTiJiaoYu() {
...
@@ -434,17 +434,16 @@ export async function zhuTiJiaoYu() {
/**
/**
* 学习园地视频
资料
* 学习园地视频
图片
* @param param0
* @param param0
* @returns
* @returns
*/
*/
export
async
function
xueXiYuanDiShiPin
({
type
})
{
export
async
function
xueXiYuanDiShiPin
({})
{
let
dataList
=
[];
let
dataList
=
[];
let
wzDBList
=
await
find
(
TABLEENUM
.
文字资料
,
{});
let
spDBList
=
await
find
(
TABLEENUM
.
视频管理
,
{
videoType
:
type
,
display
:
STATE
.
是
});
wzDBList
.
forEach
(
info
=>
{
spDBList
.
forEach
(
info
=>
{
let
addInfo
:
any
=
extractData
(
info
,
[
"id"
,
"title"
,
"rank"
,
"type"
,
"imgUrl"
,
"coverUrl"
]);
let
addInfo
:
any
=
extractData
(
info
,
[
"id"
,
"title"
,
"videoUrl"
,
"videoTime"
,
"coverUrl"
]);
addInfo
.
updateTime
=
moment
(
addInfo
.
updateTime
).
format
(
"YYYY-MM-DD"
);
addInfo
.
videoTime
=
moment
(
addInfo
.
videoTime
).
format
(
"YYYY-MM-DD"
);
dataList
.
push
(
addInfo
);
dataList
.
push
(
addInfo
);
});
});
...
@@ -456,13 +455,13 @@ export async function xueXiYuanDiShiPin({type}) {
...
@@ -456,13 +455,13 @@ export async function xueXiYuanDiShiPin({type}) {
* @param param0
* @param param0
* @returns
* @returns
*/
*/
export
async
function
xueXiYuanDiWenZi
({
type
})
{
export
async
function
xueXiYuanDiWenZi
({})
{
let
dataList
=
[];
let
dataList
=
[];
let
wzDBList
=
await
find
(
TABLEENUM
.
文字资料
,
{
type
});
let
findParam
=
{
articleType
:{
"$in"
:[
ARTICLEPOSITION
.
学习园地
_
文字资料
]},
display
:
STATE
.
是
};
let
wzDBList
=
await
findToSortToPage
(
TABLEENUM
.
文章管理
,
findParam
,
[
"id"
,
"title"
,
"articleTime"
],
{
articleTime
:
-
1
},
1
);
wzDBList
.
forEach
(
info
=>
{
wzDBList
.
forEach
(
info
=>
{
let
addInfo
:
any
=
extractData
(
info
,
[
"title"
,
"rank"
,
"imgUrl"
,
"articleUrl"
,
"updateTime"
]);
let
addInfo
:
any
=
extractData
(
info
,
[
"id"
,
"title"
,
"articleTime"
]);
addInfo
.
id
=
info
.
articleTitle
addInfo
.
articleTime
=
moment
(
addInfo
.
articleTime
).
format
(
"YYYY-MM-DD"
);
addInfo
.
updateTime
=
moment
(
addInfo
.
updateTime
).
format
(
"YYYY-MM-DD"
);
dataList
.
push
(
addInfo
);
dataList
.
push
(
addInfo
);
});
});
...
@@ -487,24 +486,14 @@ export async function dangJianZiYuan({first, secondary, three, pageNumber}) {
...
@@ -487,24 +486,14 @@ export async function dangJianZiYuan({first, secondary, three, pageNumber}) {
dataList
.
push
({
id
,
title
,
desc
,
articleTime
:
moment
(
articleTime
).
format
(
"YYYY-MM-DD"
),
imgUrl
});
dataList
.
push
({
id
,
title
,
desc
,
articleTime
:
moment
(
articleTime
).
format
(
"YYYY-MM-DD"
),
imgUrl
});
});
});
}
else
{
//学习园地
}
else
{
//学习园地
if
(
secondary
==
PARTYBUILDSUBTYPEENUM
.
文字资料
)
{
let
findParam
=
{
articleType
:{
"$in"
:[
secondary
]},
display
:
STATE
.
是
};
let
wzDBList
=
await
findToPage
(
TABLEENUM
.
文字资料
,
{
type
:
three
},
[
"title"
,
"rank"
,
"imgUrl"
,
"articleUrl"
,
"updateTime"
],
pageNumber
);
let
dataBaseList
=
await
findToSortToPage
(
TABLEENUM
.
文章管理
,
findParam
,
[
"id"
,
"title"
,
"desc"
,
"articleTime"
,
"imgUrl"
],
{
articleTime
:
-
1
},
pageNumber
);
dataCount
=
await
findCount
(
TABLEENUM
.
文字资料
,
{
type
:
three
});
dataCount
=
await
findCount
(
TABLEENUM
.
文章管理
,
findParam
);
wzDBList
.
forEach
(
info
=>
{
dataBaseList
.
forEach
(
item
=>
{
let
addInfo
:
any
=
extractData
(
info
,
[
"title"
,
"rank"
,
"imgUrl"
,
"articleUrl"
,
"updateTime"
]);
let
{
title
,
desc
,
articleTime
,
imgUrl
,
id
}
=
item
;
addInfo
.
updateTime
=
moment
(
addInfo
.
updateTime
).
format
(
"YYYY-MM-DD"
);
dataList
.
push
({
id
,
title
,
desc
,
articleTime
:
moment
(
articleTime
).
format
(
"YYYY-MM-DD"
),
imgUrl
});
dataList
.
push
(
addInfo
);
});
});
}
else
{
let
spDBList
=
await
findToPage
(
TABLEENUM
.
视频管理
,
{
videoType
:
three
,
display
:
STATE
.
是
},
[
"title"
,
"videoUrl"
,
"videoTime"
],
pageNumber
);
dataCount
=
await
findCount
(
TABLEENUM
.
视频管理
,
{
videoType
:
three
,
display
:
STATE
.
是
});
spDBList
.
forEach
(
info
=>
{
let
addInfo
:
any
=
extractData
(
info
,
[
"title"
,
"videoUrl"
,
"videoTime"
]);
addInfo
.
videoTime
=
moment
(
addInfo
.
videoTime
).
format
(
"YYYY-MM-DD"
);
dataList
.
push
(
addInfo
);
});
}
}
}
return
{
dataList
,
dataCount
};
return
{
dataList
,
dataCount
};
...
@@ -526,13 +515,8 @@ export async function dangJianZiYuanMuLu({}) {
...
@@ -526,13 +515,8 @@ export async function dangJianZiYuanMuLu({}) {
value
:
PARTYBUILDTYPEENUM
.
学习园地
,
value
:
PARTYBUILDTYPEENUM
.
学习园地
,
subList
:[
subList
:[
{
{
name
:
"视频资料"
,
value
:
PARTYBUILDSUBTYPEENUM
.
视频资料
,
subList
:[]
},
{
name
:
"文字资料"
,
name
:
"文字资料"
,
value
:
PARTYBUILDSUBTYPEENUM
.
文字资料
,
value
:
ARTICLEPOSITION
.
学习园地
_
文字资料
,
subList
:[]
subList
:[]
}
}
]
]
...
@@ -547,19 +531,7 @@ export async function dangJianZiYuanMuLu({}) {
...
@@ -547,19 +531,7 @@ export async function dangJianZiYuanMuLu({}) {
subList
:[]
subList
:[]
});
});
}
}
for
(
let
key
in
DANGJIANVIDEO
)
{
let
anyKey
:
any
=
key
;
if
(
isNaN
(
anyKey
))
{
let
keyStr
=
key
;
let
value
=
DANGJIANVIDEO
[
key
];
dataList
[
1
].
subList
[
0
].
subList
.
push
({
name
:
keyStr
,
value
});
}
}
let
wenZiDBList
=
await
find
(
TABLEENUM
.
党建
,
{
type
:
PARTYBUILDTYPEENUM
.
学习园地
,
subType
:
PARTYBUILDSUBTYPEENUM
.
文字资料
});
wenZiDBList
.
forEach
(
info
=>
{
let
{
id
,
name
}
=
info
;
dataList
[
1
].
subList
[
1
].
subList
.
push
({
name
,
value
:
id
});
});
return
{
dataList
};
return
{
dataList
};
}
}
...
@@ -571,22 +543,32 @@ export async function dangJianZiYuanMuLu({}) {
...
@@ -571,22 +543,32 @@ export async function dangJianZiYuanMuLu({}) {
*/
*/
export
async
function
tongZhiGongGao
({
type
,
pageNumber
})
{
export
async
function
tongZhiGongGao
({
type
,
pageNumber
})
{
eccEnumValue
(
"通知公告"
,
"类型"
,
TONGZHIGONGGAO
,
type
);
eccEnumValue
(
"通知公告"
,
"类型"
,
TONGZHIGONGGAO
,
type
);
let
tableName
;
// let tableName;
switch
(
type
)
{
// switch (type) {
case
TONGZHIGONGGAO
.
会议通知
:
tableName
=
TABLEENUM
.
会议通知
;
break
;
// case TONGZHIGONGGAO.会议通知: tableName = TABLEENUM.会议通知; break;
case
TONGZHIGONGGAO
.
活动通知
:
tableName
=
TABLEENUM
.
活动通知
;
break
;
// case TONGZHIGONGGAO.活动通知: tableName = TABLEENUM.活动通知; break;
case
TONGZHIGONGGAO
.
项目公告
:
tableName
=
TABLEENUM
.
项目公告
;
break
;
// case TONGZHIGONGGAO.项目公告: tableName = TABLEENUM.项目公告; break;
}
// }
// let dbList = await findToPage(tableName, {push:STATE.是}, ["id", "name", "st", "addrest", "members", "desc"], pageNumber);
// let dataCount = await findCount(tableName, {push:STATE.是});
// let dataList = [];
// dbList.forEach(info => {
// let item:any = extractData(info, ["id", "name", "addrest"]);
// item.time = moment(info.st).format("YYYY-MM-DD");
// item.desc = info.desc || "";
// item.members = changeEnumValue(CODPARTICIPANT, info.members);
// dataList.push(item);
// });
let
findParam
=
{
articleType
:{
"$in"
:[
type
]},
display
:
STATE
.
是
};
let
dataBaseList
=
await
findToSortToPage
(
TABLEENUM
.
文章管理
,
findParam
,
[
"id"
,
"title"
,
"desc"
,
"imgUrl"
,
"articleTime"
],
{
articleTime
:
-
1
},
pageNumber
);
let
dataCount
=
await
findCount
(
TABLEENUM
.
文章管理
,
findParam
);
let
dbList
=
await
findToPage
(
tableName
,
{
push
:
STATE
.
是
},
[
"id"
,
"name"
,
"st"
,
"addrest"
,
"members"
,
"desc"
],
pageNumber
);
let
dataCount
=
await
findCount
(
tableName
,
{
push
:
STATE
.
是
});
let
dataList
=
[];
let
dataList
=
[];
dbList
.
forEach
(
info
=>
{
dataBaseList
.
forEach
(
info
=>
{
let
item
:
any
=
extractData
(
info
,
[
"id"
,
"name"
,
"addrest"
]);
let
{
id
,
title
,
desc
,
imgUrl
,
articleTime
}
=
info
;
item
.
time
=
moment
(
info
.
st
).
format
(
"YYYY-MM-DD"
);
dataList
.
push
({
item
.
desc
=
info
.
desc
||
""
;
id
,
title
,
desc
,
imgUrl
,
articleTime
:
moment
(
articleTime
).
format
(
"YYYY-MM-DD"
)
item
.
members
=
changeEnumValue
(
CODPARTICIPANT
,
info
.
members
);
});
dataList
.
push
(
item
);
});
});
return
{
dataList
,
dataCount
};
return
{
dataList
,
dataCount
};
...
@@ -595,20 +577,24 @@ export async function tongZhiGongGao({type, pageNumber}) {
...
@@ -595,20 +577,24 @@ export async function tongZhiGongGao({type, pageNumber}) {
export
async
function
tongZhiGongGaoInfo
({
id
,
type
})
{
export
async
function
tongZhiGongGaoInfo
({
id
,
type
})
{
eccEnumValue
(
"通知公告"
,
"类型"
,
TONGZHIGONGGAO
,
type
);
eccEnumValue
(
"通知公告"
,
"类型"
,
TONGZHIGONGGAO
,
type
);
let
tableName
;
//
let tableName;
switch
(
type
)
{
//
switch (type) {
case
TONGZHIGONGGAO
.
会议通知
:
tableName
=
TABLEENUM
.
会议通知
;
break
;
//
case TONGZHIGONGGAO.会议通知: tableName = TABLEENUM.会议通知; break;
case
TONGZHIGONGGAO
.
活动通知
:
tableName
=
TABLEENUM
.
活动通知
;
break
;
//
case TONGZHIGONGGAO.活动通知: tableName = TABLEENUM.活动通知; break;
case
TONGZHIGONGGAO
.
项目公告
:
tableName
=
TABLEENUM
.
项目公告
;
break
;
//
case TONGZHIGONGGAO.项目公告: tableName = TABLEENUM.项目公告; break;
}
//
}
let
dbData
=
await
findOnce
(
tableName
,
{
id
,
push
:
STATE
.
是
},
[
"id"
,
"name"
,
"st"
,
"addrest"
,
"members"
,
"desc"
]);
//
let dbData = await findOnce(tableName, {id, push:STATE.是}, ["id", "name", "st", "addrest", "members", "desc"]);
if
(
!
dbData
||
!
dbData
.
id
)
throw
new
BizError
(
ERRORENUM
.
目标数据不存在
);
//
if (!dbData || !dbData.id) throw new BizError(ERRORENUM.目标数据不存在);
let
dataInfo
:
any
=
extractData
(
dbData
,
[
"name"
,
"addrest"
]);
//
let dataInfo:any = extractData(dbData, ["name", "addrest"]);
dataInfo
.
time
=
moment
(
dbData
.
st
).
format
(
"YYYY-MM-DD"
);
//
dataInfo.time = moment(dbData.st).format("YYYY-MM-DD");
dataInfo
.
desc
=
dbData
.
desc
||
""
;
//
dataInfo.desc = dbData.desc || "";
dataInfo
.
members
=
changeEnumValue
(
CODPARTICIPANT
,
dbData
.
members
);
//
dataInfo.members = changeEnumValue(CODPARTICIPANT, dbData.members);
return
{
dataInfo
};
let
findParam
=
{
id
,
articleType
:{
"$in"
:[
type
]},
display
:
STATE
.
是
};
let
dataBaseInfo
=
await
findOnce
(
TABLEENUM
.
文章管理
,
findParam
,
[
"id"
,
"title"
,
"desc"
,
"imgUrl"
,
"articleTime"
]);
dataBaseInfo
.
articleTime
=
moment
(
dataBaseInfo
.
articleTime
).
format
(
"YYYY-MM-DD"
);
return
{
dataInfo
:
dataBaseInfo
};
}
}
...
@@ -648,15 +634,27 @@ export async function fenZhiJiGou() {
...
@@ -648,15 +634,27 @@ export async function fenZhiJiGou() {
export
async
function
fenHuiDongTai
({
agencyId
,
pageNumber
})
{
export
async
function
fenHuiDongTai
({
agencyId
,
pageNumber
})
{
let
selectParam
:
any
=
{};
let
nameMap
=
{};
if
(
agencyId
)
{
let
jigoiuInfo
=
await
findOnce
(
TABLEENUM
.
机构管理
,
{
id
:
agencyId
});
if
(
!
jigoiuInfo
||
!
jigoiuInfo
.
id
)
throw
new
BizError
(
ERRORENUM
.
找不到该机构
);
nameMap
[
agencyId
]
=
jigoiuInfo
.
name
;
}
else
{
let
jigoiuList
=
await
find
(
TABLEENUM
.
机构管理
,
{},
[
"id"
,
"name"
]);
jigoiuList
.
forEach
(
info
=>
{
nameMap
[
info
.
id
]
=
info
.
name
;
});
}
let
selectParam
:
any
=
{
isUse
:
STATE
.
是
};
if
(
agencyId
)
selectParam
.
agencyId
=
agencyId
;
if
(
agencyId
)
selectParam
.
agencyId
=
agencyId
;
let
jiGouList
=
await
findToPage
(
TABLEENUM
.
工作动态
,
selectParam
,
[
"id"
,
"title"
,
"activityTime"
,
"imgUrl"
],
pageNumber
);
let
jiGouList
=
await
findToPage
(
TABLEENUM
.
工作动态
,
selectParam
,
[
"id"
,
"title"
,
"activityTime"
,
"imgUrl"
,
"agencyId"
],
pageNumber
);
let
dataCount
=
await
findCount
(
TABLEENUM
.
工作动态
,
selectParam
);
let
dataCount
=
await
findCount
(
TABLEENUM
.
工作动态
,
selectParam
);
let
dataList
=
[];
let
dataList
=
[];
jiGouList
.
forEach
(
info
=>
{
jiGouList
.
forEach
(
info
=>
{
let
{
id
,
title
,
activityTime
,
imgUrl
}
=
info
;
let
{
id
,
title
,
activityTime
,
imgUrl
}
=
info
;
dataList
.
push
({
id
,
title
,
activityTime
:
moment
(
activityTime
).
format
(
"YYYY-MM-DD"
),
imgUrl
});
dataList
.
push
({
id
,
title
,
activityTime
:
moment
(
activityTime
).
format
(
"YYYY-MM-DD"
),
imgUrl
,
name
:
nameMap
[
info
.
agencyId
]
});
});
});
return
{
dataList
,
dataCount
}
return
{
dataList
,
dataCount
}
...
@@ -675,8 +673,8 @@ export async function fenHuiInfo({id}) {
...
@@ -675,8 +673,8 @@ export async function fenHuiInfo({id}) {
}
}
export
async
function
fenHuiDongTaiInfo
({
id
})
{
export
async
function
fenHuiDongTaiInfo
({
id
})
{
let
dongTaiInfo
=
await
findOnce
(
TABLEENUM
.
工作动态
,
{
id
,
isUse
:
true
},
[
"id"
,
"title"
,
"activityTime"
,
"imgUrl"
,
"desc"
]);
let
dongTaiInfo
=
await
findOnce
(
TABLEENUM
.
工作动态
,
{
id
,
isUse
:
STATE
.
是
},
[
"id"
,
"title"
,
"activityTime"
,
"imgUrl"
,
"desc"
]);
if
(
!
dongTaiInfo
||
!
dongTaiInfo
.
id
)
throw
new
BizError
(
ERRORENUM
.
目标数据不存在
);
if
(
!
dongTaiInfo
||
!
dongTaiInfo
.
id
)
throw
new
BizError
(
ERRORENUM
.
该动态未开放
);
let
dataInfo
:
any
=
extractData
(
dongTaiInfo
,
[
"title"
,
"activityTime"
,
"imgUrl"
,
"desc"
]);
let
dataInfo
:
any
=
extractData
(
dongTaiInfo
,
[
"title"
,
"activityTime"
,
"imgUrl"
,
"desc"
]);
dataInfo
.
activityTime
=
moment
(
dataInfo
.
activityTime
).
format
(
"YYYY-MM-DD"
);
dataInfo
.
activityTime
=
moment
(
dataInfo
.
activityTime
).
format
(
"YYYY-MM-DD"
);
return
{
dataInfo
}
return
{
dataInfo
}
...
...
src/biz/portal/dangJianGonZuo/wenZiZiLiao.ts
View file @
db4a75d8
...
@@ -21,25 +21,25 @@ import { eccReqParamater } from "../../../util/verificationParam";
...
@@ -21,25 +21,25 @@ import { eccReqParamater } from "../../../util/verificationParam";
* @returns
* @returns
*/
*/
export
async
function
list
({
userId
,
type
})
{
export
async
function
list
({
userId
,
type
})
{
eccEnumValue
(
"图片视频列表"
,
"类型"
,
VIDEOANDIMGTYPEENUM
,
type
);
if
(
type
)
eccEnumValue
(
"图片视频列表"
,
"类型"
,
VIDEOANDIMGTYPEENUM
,
type
);
let
dbList
=
await
find
(
TABLEENUM
.
文字资料
,
{
type
});
let
dbList
=
await
find
(
TABLEENUM
.
文字资料
,
{});
let
dataList
=
[];
let
dataList
=
[];
if
(
!
dbList
||
!
dbList
.
length
)
{
if
(
!
dbList
||
!
dbList
.
length
)
{
let
addList
=
[];
let
addList
=
[];
for
(
let
i
=
1
;
i
<=
8
;
i
++
)
{
for
(
let
i
=
1
;
i
<=
8
;
i
++
)
{
let
id
=
generateSystemId
(
TABLEENUM
.
文字资料
,
userId
);
let
id
=
generateSystemId
(
TABLEENUM
.
文字资料
,
userId
);
addList
.
push
({
id
,
rank
:
i
,
title
:
''
,
type
:
0
,
imgUrl
:
""
,
coverUrl
:
""
});
addList
.
push
({
id
,
rank
:
i
,
title
:
''
,
type
:
1
,
imgUrl
:
""
,
coverUrl
:
""
});
dataList
.
push
({
id
,
rank
:
i
,
title
:
''
,
type
:
0
,
imgUrl
:
""
,
coverUrl
:
""
});
dataList
.
push
({
id
,
rank
:
i
,
title
:
''
,
type
:
1
,
imgUrl
:
""
,
coverUrl
:
""
});
}
}
await
addManyData
(
TABLEENUM
.
文字资料
,
addList
);
await
addManyData
(
TABLEENUM
.
文字资料
,
addList
);
}
}
dataList
.
sort
((
a
:
any
,
b
:
any
)
=>
{
return
a
.
rank
-
b
.
rank
});
dataList
.
sort
((
a
:
any
,
b
:
any
)
=>
{
return
a
.
rank
-
b
.
rank
});
for
(
let
i
=
0
;
i
<
dbList
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
dbList
.
length
;
i
++
)
{
let
info
=
dbList
[
i
];
let
info
=
dbList
[
i
];
let
item
:
any
=
extractData
(
info
,
[
"id"
,
"title"
,
"rank"
,
"type"
,
"imgUrl"
,
"coverUrl"
]);
let
item
:
any
=
extractData
(
info
,
[
"id"
,
"title"
,
"rank"
,
"type"
,
"imgUrl"
,
"coverUrl"
]);
if
(
type
&&
item
.
type
==
type
)
dataList
.
push
(
item
);
dataList
.
push
(
item
);
}
}
return
{
dataList
};
return
{
dataList
};
...
@@ -49,17 +49,16 @@ export async function list({userId, type}) {
...
@@ -49,17 +49,16 @@ export async function list({userId, type}) {
/**
/**
* 预览
* 预览
*/
*/
export
async
function
preview
({
userId
,
type
})
{
export
async
function
preview
({
userId
})
{
eccEnumValue
(
"图片视频列表"
,
"类型"
,
VIDEOANDIMGTYPEENUM
,
type
);
let
dbList
=
await
find
(
TABLEENUM
.
文字资料
,
{});
let
dbList
=
await
find
(
TABLEENUM
.
文字资料
,
{
type
});
let
dataList
=
[];
let
dataList
=
[];
if
(
!
dbList
||
!
dbList
.
length
)
{
if
(
!
dbList
||
!
dbList
.
length
)
{
let
addList
=
[];
let
addList
=
[];
for
(
let
i
=
1
;
i
<=
8
;
i
++
)
{
for
(
let
i
=
1
;
i
<=
8
;
i
++
)
{
let
id
=
generateSystemId
(
TABLEENUM
.
文字资料
,
userId
);
let
id
=
generateSystemId
(
TABLEENUM
.
文字资料
,
userId
);
addList
.
push
({
id
,
rank
:
i
,
title
:
''
,
type
:
0
,
imgUrl
:
""
,
coverUrl
:
""
});
addList
.
push
({
id
,
rank
:
i
,
title
:
''
,
type
:
1
,
imgUrl
:
""
,
coverUrl
:
""
});
dataList
.
push
({
id
,
rank
:
i
,
title
:
''
,
type
:
0
,
imgUrl
:
""
,
coverUrl
:
""
});
dataList
.
push
({
id
,
rank
:
i
,
title
:
''
,
type
:
1
,
imgUrl
:
""
,
coverUrl
:
""
});
}
}
await
addManyData
(
TABLEENUM
.
文字资料
,
addList
);
await
addManyData
(
TABLEENUM
.
文字资料
,
addList
);
}
}
...
@@ -100,7 +99,7 @@ export async function del({userId, id}) {
...
@@ -100,7 +99,7 @@ export async function del({userId, id}) {
let
dataInfo
=
await
findOnce
(
TABLEENUM
.
文字资料
,
{
id
});
let
dataInfo
=
await
findOnce
(
TABLEENUM
.
文字资料
,
{
id
});
if
(
!
dataInfo
||
!
dataInfo
.
id
)
throw
new
BizError
(
ERRORENUM
.
目标数据不存在
);
if
(
!
dataInfo
||
!
dataInfo
.
id
)
throw
new
BizError
(
ERRORENUM
.
目标数据不存在
);
await
updateOneData
(
TABLEENUM
.
文字资料
,
{
id
},
{
title
:
''
,
imgUrl
:
''
,
position
:
0
,
articleTitle
:
''
,
articleUrl
:
''
,
updateTime
:
0
});
await
updateOneData
(
TABLEENUM
.
文字资料
,
{
id
},
{
title
:
""
,
imgUrl
:
""
,
type
:
1
,
coverUrl
:
""
,
updateTime
:
new
Date
().
valueOf
()
});
return
successResult
();
return
successResult
();
}
}
...
...
src/biz/portal/fenZhiJiGou/jiGouGuanLi.ts
View file @
db4a75d8
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
*/
*/
import
{
ERRORENUM
}
from
"../../../config/errorEnum"
;
import
{
ERRORENUM
}
from
"../../../config/errorEnum"
;
import
{
addOneData
}
from
"../../../data/add"
;
import
{
addOneData
}
from
"../../../data/add"
;
import
{
deleteOneData
}
from
"../../../data/delete"
;
import
{
delete
ManyData
,
delete
OneData
}
from
"../../../data/delete"
;
import
{
TABLEENUM
}
from
"../../../data/models/model"
;
import
{
TABLEENUM
}
from
"../../../data/models/model"
;
import
{
find
,
findCount
,
findOnce
,
findToPage
}
from
"../../../data/select"
;
import
{
find
,
findCount
,
findOnce
,
findToPage
}
from
"../../../data/select"
;
import
{
updateOneData
}
from
"../../../data/update"
;
import
{
updateOneData
}
from
"../../../data/update"
;
...
@@ -56,6 +56,8 @@ export async function del({userId, id}) {
...
@@ -56,6 +56,8 @@ export async function del({userId, id}) {
let
dataInfo
=
await
findOnce
(
TABLEENUM
.
机构管理
,
{
id
});
let
dataInfo
=
await
findOnce
(
TABLEENUM
.
机构管理
,
{
id
});
if
(
!
dataInfo
.
id
)
throw
new
BizError
(
ERRORENUM
.
目标数据不存在
);
if
(
!
dataInfo
.
id
)
throw
new
BizError
(
ERRORENUM
.
目标数据不存在
);
await
deleteOneData
(
TABLEENUM
.
机构管理
,
{
id
});
await
deleteOneData
(
TABLEENUM
.
机构管理
,
{
id
});
await
deleteManyData
(
TABLEENUM
.
工作动态
,
{
agencyId
:
id
});
await
deleteManyData
(
TABLEENUM
.
委员名单
,
{
agencyId
:
id
});
return
successResult
();
return
successResult
();
}
}
...
...
src/biz/register.ts
View file @
db4a75d8
...
@@ -235,7 +235,7 @@ export async function unitMemberRegister3({application, id}) {
...
@@ -235,7 +235,7 @@ export async function unitMemberRegister3({application, id}) {
remarks
=
"重新提交"
;
remarks
=
"重新提交"
;
}
}
await
updateOneData
(
TABLEENUM
.
用户表
,
{
userId
:
id
},
{
userRegisterState
,
application
,
registerFlow
:
REGISTERFLOW
.
完成第三步
});
await
updateOneData
(
TABLEENUM
.
用户表
,
{
userId
:
id
},
{
userRegisterState
,
application
Form
:
application
,
registerFlow
:
REGISTERFLOW
.
完成第三步
});
/**提交审批历史信息 */
/**提交审批历史信息 */
let
addApprovalHistory
=
{
let
addApprovalHistory
=
{
...
...
src/config/enum.ts
View file @
db4a75d8
...
@@ -56,7 +56,7 @@ export enum VIDEOANDIMGTYPEENUM {
...
@@ -56,7 +56,7 @@ export enum VIDEOANDIMGTYPEENUM {
* 通知公告
* 通知公告
*/
*/
export
enum
TONGZHIGONGGAO
{
export
enum
TONGZHIGONGGAO
{
会议通知
=
1
,
会议通知
=
9
,
活动通知
,
活动通知
,
项目公告
项目公告
}
}
...
@@ -141,7 +141,10 @@ export enum ARTICLEPOSITION {
...
@@ -141,7 +141,10 @@ export enum ARTICLEPOSITION {
品牌项目
_hgh
社会服务
,
品牌项目
_hgh
社会服务
,
品牌项目
_hgh
学术研究
,
品牌项目
_hgh
学术研究
,
品牌项目
_hgh
展演竞赛
,
品牌项目
_hgh
展演竞赛
,
学习园地
_
文字资料
学习园地
_
文字资料
,
通知公告
_hgh
会议通知
,
通知公告
_hgh
活动通知
,
通知公告
_hgh
项目公告
// 党建工作_hgh主题教育
// 党建工作_hgh主题教育
}
}
...
...
src/config/errorEnum.ts
View file @
db4a75d8
...
@@ -50,7 +50,9 @@ export enum ERRORENUM {
...
@@ -50,7 +50,9 @@ export enum ERRORENUM {
手机号不正确
,
手机号不正确
,
短信验证码发送失败
,
短信验证码发送失败
,
该手机号已被注册
,
该手机号已被注册
,
不存在该手机号的账号
不存在该手机号的账号
,
该动态未开放
,
找不到该机构
}
}
export
enum
ERRORCODEENUM
{
export
enum
ERRORCODEENUM
{
...
...
src/routers/officalWebsite/router.ts
View file @
db4a75d8
...
@@ -129,19 +129,15 @@ export const Config = {
...
@@ -129,19 +129,15 @@ export const Config = {
bindBiz
:
officialWebsiteBiz
.
zhuTiJiaoYu
bindBiz
:
officialWebsiteBiz
.
zhuTiJiaoYu
},
},
{
{
apiName
:
"学习园地-视频
资料
"
,
apiName
:
"学习园地-视频
图片
"
,
subUrl
:
'/xuexiyuandishipin'
,
subUrl
:
'/xuexiyuandishipin'
,
param
:[
param
:[],
{
key
:
"type"
,
type
:
"Number"
,
desc
:
"类型"
}
],
bindBiz
:
officialWebsiteBiz
.
xueXiYuanDiShiPin
bindBiz
:
officialWebsiteBiz
.
xueXiYuanDiShiPin
},
},
{
{
apiName
:
"学习园地-文字资料"
,
apiName
:
"学习园地-文字资料"
,
subUrl
:
'/xuexiyuandiwenzi'
,
subUrl
:
'/xuexiyuandiwenzi'
,
param
:[
param
:[],
{
key
:
"type"
,
type
:
"Number"
,
desc
:
"类型"
}
],
bindBiz
:
officialWebsiteBiz
.
xueXiYuanDiWenZi
bindBiz
:
officialWebsiteBiz
.
xueXiYuanDiWenZi
},
},
{
{
...
...
src/routers/portal/router.ts
View file @
db4a75d8
...
@@ -920,7 +920,6 @@ export const Config = {
...
@@ -920,7 +920,6 @@ export const Config = {
apiName
:
"预览"
,
apiName
:
"预览"
,
subUrl
:
'/dangjiangonzuo/wenziziliao/preview'
,
subUrl
:
'/dangjiangonzuo/wenziziliao/preview'
,
param
:[
param
:[
{
key
:
"type"
,
type
:
"Number"
,
desc
:
"类型"
}
],
],
bindBiz
:
wenZiZiLiaoBiz
.
preview
bindBiz
:
wenZiZiLiaoBiz
.
preview
},
},
...
@@ -932,7 +931,7 @@ export const Config = {
...
@@ -932,7 +931,7 @@ export const Config = {
{
key
:
"title"
,
type
:
"String"
,
desc
:
"展示标题"
},
{
key
:
"title"
,
type
:
"String"
,
desc
:
"展示标题"
},
{
key
:
"imgUrl"
,
type
:
"String"
,
desc
:
"图片or视频地址"
},
{
key
:
"imgUrl"
,
type
:
"String"
,
desc
:
"图片or视频地址"
},
{
key
:
"type"
,
type
:
"Number"
,
desc
:
"类型 参考公用接口videoimgtype"
},
{
key
:
"type"
,
type
:
"Number"
,
desc
:
"类型 参考公用接口videoimgtype"
},
{
key
:
"coverUrl"
,
type
:
"
Number"
,
desc
:
"视频封面地址 当类型为图片时可以不传"
,
notMustHave
:
true
},
{
key
:
"coverUrl"
,
type
:
"
String"
,
desc
:
"视频封面地址 当类型为图片时可以不传"
,
isNull
:
true
},
],
],
bindBiz
:
wenZiZiLiaoBiz
.
update
bindBiz
:
wenZiZiLiaoBiz
.
update
},
},
...
...
src/routers/router.ts
View file @
db4a75d8
...
@@ -23,10 +23,10 @@ const Look = false;//true更新文档
...
@@ -23,10 +23,10 @@ const Look = false;//true更新文档
export
async
function
setRouter
(
httpServer
){
export
async
function
setRouter
(
httpServer
){
if
(
Look
)
{
if
(
Look
)
{
await
getDoc
();
await
getDoc
();
//
await initDoc(portalRouter.FirstName, portalRouter.Config, portalRouter.FirstRouter);//网站编辑
await
initDoc
(
portalRouter
.
FirstName
,
portalRouter
.
Config
,
portalRouter
.
FirstRouter
);
//网站编辑
// await initDoc(publicRouter.FirstName, publicRouter.Config, publicRouter.FirstRouter);//公用组件
// await initDoc(publicRouter.FirstName, publicRouter.Config, publicRouter.FirstRouter);//公用组件
// await initDoc(memberRouter.FirstName, memberRouter.Config, memberRouter.FirstRouter);//用户路由
// await initDoc(memberRouter.FirstName, memberRouter.Config, memberRouter.FirstRouter);//用户路由
//
await initDoc(officalWebsiteRouter.FirstName, officalWebsiteRouter.Config, officalWebsiteRouter.FirstRouter);//官网路由
await
initDoc
(
officalWebsiteRouter
.
FirstName
,
officalWebsiteRouter
.
Config
,
officalWebsiteRouter
.
FirstRouter
);
//官网路由
// await initDoc(orderRouter.FirstName, orderRouter.Config, orderRouter.FirstRouter);//会费相关
// await initDoc(orderRouter.FirstName, orderRouter.Config, orderRouter.FirstRouter);//会费相关
// await initDoc(costRouter.FirstName, costRouter.Config, costRouter.FirstRouter);//支付
// await initDoc(costRouter.FirstName, costRouter.Config, costRouter.FirstRouter);//支付
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment