Commit fce8d354 authored by Zhang Xiaojie's avatar Zhang Xiaojie

Merge branch 'dev' of gitlab.33.cn:CassiniatSaturn/fns_backend into dev

parents 0226875e 4acdd53a
# fns_backend # 中小企业协会综合服务平台
## Project setup [蓝湖链接](https://lanhuapp.com/web/#/item/project/stage?tid=ea8afdc1-edb1-42ab-8949-3dd33c902ee8&pid=77a1b069-1402-4b27-9919-66949a6288bf)
```
npm install [iconfont](https://at.alicdn.com/t/project/2711356/f1a7b90a-2ed1-48d9-9c85-5702bc3f0cf8.html?spm=a313x.7781069.1998910419.36)
```
[gitlab](https://gitlab.33.cn/CassiniatSaturn/fns_backend)
# 开发
### Compiles and hot-reloads for development
```
npm run serve npm run serve
```
### Compiles and minifies for production # 打包部署
```
npm run build “分平台管理员”和“其他管理员和客服经理”两种包部署。
```
## 平台管理员打包
npm run buildPlatform
## 其他管理员和客服经理打包
### Customize configuration npm run buildNormal
See [Configuration Reference](https://cli.vuejs.org/config/).
tar -czf fns_backend.tar fns_backend
scp fns_backend.tar root@121.40.18.70:/usr/share/nginx/html/fns_backend.tar
rm -rf fns_backend.tar
ssh root@121.40.18.70 'cd /usr/share/nginx/html && rm -rf fns_backend && tar -xzf fns_backend.tar && rm -rf fns_backend.tar'
echo '👉 http://121.40.18.70:2047/'
\ No newline at end of file
...@@ -9,9 +9,7 @@ ...@@ -9,9 +9,7 @@
"buildPlatform": "vue-cli-service build --mode platform", "buildPlatform": "vue-cli-service build --mode platform",
"buildNormal": "vue-cli-service build --mode normal", "buildNormal": "vue-cli-service build --mode normal",
"bdPlatform": "npm run buildPlatform & bash deployPlatform.sh", "bdPlatform": "npm run buildPlatform & bash deployPlatform.sh",
"bdNormal": "npm run buildNormal & bash deployNormal.sh", "bdNormal": "npm run buildNormal & bash deployNormal.sh"
"build": "vue-cli-service build --mode report",
"bd": "npm run build & bash deploy.sh"
}, },
"dependencies": { "dependencies": {
"@tiptap/extension-image": "^2.0.0-beta.15", "@tiptap/extension-image": "^2.0.0-beta.15",
......
...@@ -137,6 +137,7 @@ export default Vue.extend({ ...@@ -137,6 +137,7 @@ export default Vue.extend({
dataSource(): any[] { dataSource(): any[] {
return this.productList; return this.productList;
}, },
}, },
data() { data() {
return { return {
......
...@@ -38,7 +38,7 @@ export default <Module<iProductModuleState, {}>>{ ...@@ -38,7 +38,7 @@ export default <Module<iProductModuleState, {}>>{
}) })
if (ret.code === 200) { if (ret.code === 200) {
commit('save', { commit('save', {
list: ret.data.items, list:ret.data.items,
total: ret.data.total, total: ret.data.total,
}) })
state.loading = false state.loading = false
......
...@@ -143,7 +143,8 @@ export default Vue.extend({ ...@@ -143,7 +143,8 @@ export default Vue.extend({
this.tableLoading = false; this.tableLoading = false;
} }
}); });
}, } ,
query() { query() {
this.searchPageReqParams.offset = 0; this.searchPageReqParams.offset = 0;
this.fetchList(); this.fetchList();
......
...@@ -235,7 +235,9 @@ export default Vue.extend({ ...@@ -235,7 +235,9 @@ export default Vue.extend({
banner_status: 0, banner_status: 0,
}) })
if (ret.code === 200) { if (ret.code === 200) {
this.bannerList = ret.data.items this.bannerList = ret.data.items
// console.log(this.bannerList,'this.bannerList');
this.total = ret.data.total this.total = ret.data.total
this.tableLoading = false this.tableLoading = false
} }
......
...@@ -49,7 +49,7 @@ ...@@ -49,7 +49,7 @@
</a-form-model-item> </a-form-model-item>
</a-form-model> </a-form-model>
</a-modal> </a-modal>
<!-- 资讯列表 --> <!-- 列表 -->
<a-table :loading="loading" :columns="columns" :pagination="false" :data-source="list" :rowKey="record=>record.question" style=" text-align: center; margin-top:40px;" bordered> <a-table :loading="loading" :columns="columns" :pagination="false" :data-source="list" :rowKey="record=>record.question" style=" text-align: center; margin-top:40px;" bordered>
<template #created_at='text'> <template #created_at='text'>
{{text | formatDate}} {{text | formatDate}}
...@@ -313,15 +313,14 @@ export default Vue.extend({ ...@@ -313,15 +313,14 @@ export default Vue.extend({
faq_status: this.searchPageReqParams.faq_status, faq_status: this.searchPageReqParams.faq_status,
offset: this.searchPageReqParams.offset, offset: this.searchPageReqParams.offset,
}) })
const ret2 = await FAQService.getInstance().CheckList() const ret2 = await FAQService.getInstance().CheckList()
if (ret.code === 200) {
// this.chatList = covertItems(ret.data.items) if (ret.code === 200) {
this.chatList = ret.data.items this.chatList = ret.data.items
this.total=ret.data.total this.total=ret.data.total
this.addCount=ret2.data.count this.addCount=ret2.data.count
}
} this.loading=false
this.loading=false
}, },
//上/下架、删除 //上/下架、删除
async handleOk(record:any){ async handleOk(record:any){
......
...@@ -142,15 +142,16 @@ export default Vue.extend({ ...@@ -142,15 +142,16 @@ export default Vue.extend({
this.getList() this.getList()
}, },
methods:{ methods:{
getList() { async getList() {
this.tableLoading = true this.tableLoading = true
notify.notifyList({ const ret=await notify.notifyList({
limit: this.pagination.defaultPageSize, limit: this.pagination.defaultPageSize,
offset: (this.pagination.current - 1) * this.pagination.defaultPageSize, offset: (this.pagination.current - 1) * this.pagination.defaultPageSize,
notify_status: 0, notify_status: 0,
notify_type: this.types notify_type: this.types
}).then(res => { })
this.list = res.data.items .then(res => {
this.list=res.data.items
this.pagination.total = res.data.total this.pagination.total = res.data.total
this.tableLoading = false this.tableLoading = false
}).catch(() => { }).catch(() => {
......
...@@ -157,7 +157,8 @@ export default Vue.extend({ ...@@ -157,7 +157,8 @@ export default Vue.extend({
offset: (this.pagination.current - 1) * this.pagination.defaultPageSize offset: (this.pagination.current - 1) * this.pagination.defaultPageSize
} }
this.tableLoading = true this.tableLoading = true
news.articleList(params).then(res => { news.articleList(params)
.then(res => {
this.list = res.data.items this.list = res.data.items
this.articleType = this.searchPageReqParams.article_type this.articleType = this.searchPageReqParams.article_type
this.pagination.total = res.data.total this.pagination.total = res.data.total
...@@ -165,6 +166,7 @@ export default Vue.extend({ ...@@ -165,6 +166,7 @@ export default Vue.extend({
}).catch(() => { }).catch(() => {
this.tableLoading = false this.tableLoading = false
}) })
}, },
// findTitle() { // findTitle() {
// const searchParams = this.searchPageReqParams.article_type === 1 ? "searchByPolicy" : "searchByTitle" // const searchParams = this.searchPageReqParams.article_type === 1 ? "searchByPolicy" : "searchByTitle"
......
...@@ -618,6 +618,7 @@ export default Vue.extend({ ...@@ -618,6 +618,7 @@ export default Vue.extend({
eModalType, eModalType,
modalType: undefined as undefined | eModalType, modalType: undefined as undefined | eModalType,
dataSource: [] as any[], dataSource: [] as any[],
start:'',
}; };
}, },
async mounted() { async mounted() {
...@@ -626,18 +627,25 @@ export default Vue.extend({ ...@@ -626,18 +627,25 @@ export default Vue.extend({
} }
}, },
created() { created() {
this.isCreated(); // this.isCreated();
}, },
methods: { methods: {
moment, moment,
isCreated() { // isCreated() {
if (this.modalType === this.eModalType.create) { // if (this.modalType === this.eModalType.create) {
} else { // console.log(this.modalType,'this.modalType');
this.formData.startTime = moment("00:00", "HH:mm"); // console.log(this.eModalType.create,'this.eModalType.create');
this.formData.endTime = moment("23:00", "HH:mm"); // } else {
} // console.log(this.modalType,'this.modalType');
}, // console.log(this.eModalType.create,'this.eModalType.create');
// // this.formData.startTime = moment("00:00", "HH:mm");
// // this.formData.endTime = moment("23:00", "HH:mm");
// }
// },
getDisabledHours() { getDisabledHours() {
let hours = []; let hours = [];
let time = this.formData.startTime; let time = this.formData.startTime;
let time2 = this.formData.endTime; let time2 = this.formData.endTime;
...@@ -686,8 +694,9 @@ export default Vue.extend({ ...@@ -686,8 +694,9 @@ export default Vue.extend({
selectedHour == hour; selectedHour == hour;
var hour = time._d.getHours(); var hour = time._d.getHours();
var minute = time._d.getMinutes(); var minute = time._d.getMinutes();
// console.log(this.modalType,'this.modalType');
console.log(selectedHour, "this.selectedHour"); // console.log( this.eModalType.create,' this.eModalType.create');
// console.log(selectedHour, "this.selectedHour");
let minutes = []; let minutes = [];
if (selectedHour == hour) { if (selectedHour == hour) {
...@@ -764,10 +773,12 @@ export default Vue.extend({ ...@@ -764,10 +773,12 @@ export default Vue.extend({
this.formData.openDays.push("7"); this.formData.openDays.push("7");
} }
const arr2 = transfterStrToDate(record.opening_hours); const arr2 = transfterStrToDate(record.opening_hours);
if (arr2?.length === 2) { if (arr2?.length === 2) {
const [startDate, endDate] = arr2; const [startDate, endDate] = arr2;
this.formData.startTime = moment(startDate);
this.formData.endTime = moment(endDate); this.formData.startTime = moment(startDate)
this.formData.endTime = moment(endDate);
} }
const ret = await AddressService.getInstance().note(record.id); const ret = await AddressService.getInstance().note(record.id);
if (ret.code === 200) { if (ret.code === 200) {
...@@ -1036,6 +1047,9 @@ export default Vue.extend({ ...@@ -1036,6 +1047,9 @@ export default Vue.extend({
this.searchPageReqParams.endTime = undefined; this.searchPageReqParams.endTime = undefined;
}, },
clickAddOutlet() { clickAddOutlet() {
this.formData.startTime = moment("00:00", "HH:mm");
this.formData.endTime = moment("23:00", "HH:mm");
(this.$refs.headerselect3 as any)?.init(); (this.$refs.headerselect3 as any)?.init();
this.visible = true; this.visible = true;
this.modalType = eModalType.create; this.modalType = eModalType.create;
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<span class=" font-semibold">新增时间:</span> <span class=" font-semibold">新增时间:</span>
<timerange class=" mr-3" :startTime="queryParam.start" :endTime="queryParam.end" <timerange class=" mr-3" :startTime="queryParam.start" :endTime="queryParam.end"
@getNewTime="getNewTime"/> @getNewTime="getNewTime"/>
<a-input placeholder="姓名模糊搜索" v-model="queryParam.user_name" style=" width:150px; margin-right:10px;"/> <!-- <a-input placeholder="姓名模糊搜索" v-model="queryParam.user_name" style=" width:150px; margin-right:10px;"/> -->
<a-input placeholder="手机号模糊搜索" v-model="queryParam.phone" style=" width:150px; margin-right:10px;" /> <a-input placeholder="手机号模糊搜索" v-model="queryParam.phone" style=" width:150px; margin-right:10px;" />
<a-button type="primary" style=" margin-right:10px;" @click="query">查询</a-button> <a-button type="primary" style=" margin-right:10px;" @click="query">查询</a-button>
<a-button type="primary" @click="reset">重置</a-button> <a-button type="primary" @click="reset">重置</a-button>
......
...@@ -54,6 +54,7 @@ ...@@ -54,6 +54,7 @@
> >
<a-button <a-button
type="primary" type="primary"
v-if="isBackAdmin"
style="margin-right: 10px" style="margin-right: 10px"
@click="importExcel" @click="importExcel"
:loading="loading" :loading="loading"
...@@ -82,7 +83,7 @@ import { bank } from "@/types/staff"; ...@@ -82,7 +83,7 @@ import { bank } from "@/types/staff";
import { fooList } from "@/views/Root/OutletManagement/components/HeaderSelect/const"; import { fooList } from "@/views/Root/OutletManagement/components/HeaderSelect/const";
import { PAGE_SIZE } from "@/const/config/page"; import { PAGE_SIZE } from "@/const/config/page";
import HeaderSelect from "@/views/Root/OutletManagement/components/HeaderSelect/index.vue"; import HeaderSelect from "@/views/Root/OutletManagement/components/HeaderSelect/index.vue";
import { eNewRoleRelatedToBackEnd } from "@/types/role"; import { eNewRoleRelatedToBackEnd, eRole } from "@/types/role";
import { mapMutations } from "vuex"; import { mapMutations } from "vuex";
import { getOldRoleFromUserMsg } from "@/utils/user"; import { getOldRoleFromUserMsg } from "@/utils/user";
import { menuList } from "@/views/Root/getMenuList"; import { menuList } from "@/views/Root/getMenuList";
...@@ -106,6 +107,9 @@ export default Vue.extend({ ...@@ -106,6 +107,9 @@ export default Vue.extend({
role() { role() {
return getUserMsg()?.newRole; return getUserMsg()?.newRole;
}, },
isBackAdmin(){
return getUserMsg()?.newRole === eNewRoleRelatedToBackEnd.BackAdmin;
},
}, },
data() { data() {
return { return {
......
...@@ -149,6 +149,7 @@ export const menuList: iMenuConfigItem[] = [ ...@@ -149,6 +149,7 @@ export const menuList: iMenuConfigItem[] = [
eRole.firstLevel_branch, eRole.firstLevel_branch,
eRole.secondary_branch, eRole.secondary_branch,
eRole.firstLevel_sub_clientManager, eRole.firstLevel_sub_clientManager,
eRole.firstLevel_sub_branch
], ],
}, },
{ {
...@@ -250,6 +251,7 @@ export const menuList: iMenuConfigItem[] = [ ...@@ -250,6 +251,7 @@ export const menuList: iMenuConfigItem[] = [
eRole.secondary_sub_branch, eRole.secondary_sub_branch,
eRole.firstLevel_sub_clientManager, eRole.firstLevel_sub_clientManager,
eRole.secondary_sub_clientManager, eRole.secondary_sub_clientManager,
eRole.secondary_branch
], ],
}, },
{ {
...@@ -305,6 +307,14 @@ export const menuList: iMenuConfigItem[] = [ ...@@ -305,6 +307,14 @@ export const menuList: iMenuConfigItem[] = [
roles: [eRole.platform_management], roles: [eRole.platform_management],
}, },
{ {
getName: () => '聊天管理',
onClick: (e: Event) => {},
routeName: 'chat',
path: '/backend/chat',
component: () => import('@/views/Root/Chat/index.vue'),
roles: [eRole.superManager],
},
{
getName: () => '安全设置', getName: () => '安全设置',
onClick: (e: Event) => {}, onClick: (e: Event) => {},
component: () => import('@/views/Root/Security/index.vue'), component: () => import('@/views/Root/Security/index.vue'),
...@@ -357,14 +367,6 @@ export const menuList: iMenuConfigItem[] = [ ...@@ -357,14 +367,6 @@ export const menuList: iMenuConfigItem[] = [
], ],
}, },
{ {
getName: () => '聊天管理',
onClick: (e: Event) => {},
routeName: 'chat',
path: '/backend/chat',
component: () => import('@/views/Root/Chat/index.vue'),
roles: [eRole.superManager],
},
{
getName: () => '发布活动内容', getName: () => '发布活动内容',
routeName: 'publishActivity', routeName: 'publishActivity',
hiddeInMenu: true, hiddeInMenu: true,
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
</template> --> </template> -->
<div class="flex justify-between items-center"> <div class="flex justify-between items-center">
<img class="w-5 h-7 mr-3" src="@/assets/images/avatar.png" alt="头像"> <img class="w-5 h-7 mr-3" src="@/assets/images/avatar.png" alt="头像">
<span @click="isModal">{{ phone }}</span> <span class="hover" @click="isModal">{{ phone }}</span>
<span class="inline-block ml-3 cursor-pointer" @click="logout">退出</span> <span class="inline-block ml-3 cursor-pointer" @click="logout">退出</span>
</div> </div>
...@@ -167,10 +167,10 @@ export default Vue.extend({ ...@@ -167,10 +167,10 @@ export default Vue.extend({
this.roleLevel='一级分行' this.roleLevel='一级分行'
break; break;
case 2: case 2:
this.roleLevel='一级支行' this.roleLevel='二级分行'
break; break;
case 3: case 3:
this.roleLevel='二级分行' this.roleLevel='一级支行'
break; break;
case 4: case 4:
this.roleLevel='二级支行' this.roleLevel='二级支行'
...@@ -227,4 +227,7 @@ export default Vue.extend({ ...@@ -227,4 +227,7 @@ export default Vue.extend({
/deep/ .ant-layout-header { /deep/ .ant-layout-header {
background: #fff; background: #fff;
} }
.hover:hover{
color: #4345c4;
}
</style> </style>
\ No newline at end of file
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