oms接入3.0产品库
This commit is contained in:
@@ -12,6 +12,9 @@ instance.interceptors.request.use(config => {
|
||||
if (/\/xiushan/.test(location.pathname)) {
|
||||
config.baseURL = "/xsjr"
|
||||
config.url = config.url.replace(/(app|auth|admin)\//, "")
|
||||
}else if (/project\/oms/.test(location.pathname)) {
|
||||
config.baseURL = "/omsapi"
|
||||
config.url = config.url.replace(/(app|auth|admin)\//, "")
|
||||
}
|
||||
if (!config.withoutToken && localStorage.getItem("ui-token")) {
|
||||
config.headers['Authorization'] = ["Bearer", localStorage.getItem("ui-token")].join(" ")
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
"main": "lib/cw-webapps.common.js",
|
||||
"scripts": {
|
||||
"serve": "vue-cli-service serve",
|
||||
"serve:oms": "npx cross-env NODE_ENV=oms vue-cli-service serve",
|
||||
"build": "vue-cli-service build",
|
||||
"lib": "vue-cli-service build --no-clean --target lib --dest lib packages/index.js&&npm unpublish --force&&npm publish",
|
||||
"lib:core": "vue-cli-service build --target lib --dest core/dist core/index.js --name vc-app-core&&npm unpublish --force&&npm publish",
|
||||
@@ -92,4 +91,4 @@
|
||||
"last 2 versions",
|
||||
"not ie <= 8"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
3
project/oms/apps.import.json
Normal file
3
project/oms/apps.import.json
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"AppForm": "配置表单"
|
||||
}
|
||||
232
project/oms/apps/AppArticles/components/Add.vue
Normal file
232
project/oms/apps/AppArticles/components/Add.vue
Normal file
@@ -0,0 +1,232 @@
|
||||
<template>
|
||||
<ai-detail showFooter class="add-detail">
|
||||
<template slot="title">
|
||||
<ai-title :title="params.id ? '编辑村务公开' : '添加村务公开'" :isShowBack="true" @onBackClick="onBack"
|
||||
:isShowBottomBorder="true"></ai-title>
|
||||
</template>
|
||||
<template slot="content">
|
||||
<ai-card title="基础信息">
|
||||
<template #content>
|
||||
<el-form :model="form" label-width="120px" ref="form">
|
||||
<el-form-item label="类型" prop="type" :rules="[{required: true, message: '请选择类型', trigger: 'change'}]">
|
||||
<el-select size="small" placeholder="请选择" v-model="form.type" style="width: 240px;" clearable>
|
||||
<el-option
|
||||
v-for="(item,i) in dict.getDict('villInfoType')" :key="i"
|
||||
:label="item.dictName"
|
||||
:value="item.dictValue">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="标题" prop="title" :rules="[{required: true, message: '请输入标题', trigger: 'blur'}]">
|
||||
<el-input type="textarea" :rows="2" v-model="form.title" clearable placeholder="请输入..." maxlength="100"
|
||||
show-word-limit></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="正文" prop="content" :rules="[{required: true, message: '请输入正文', trigger: 'blur'}]">
|
||||
<ai-editor v-model="form.content" :instance="instance"/>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="缩略图" prop="thumbUrl" :rules="[{required: true, message: '请上次缩略图', trigger: 'change'}]">
|
||||
<ai-uploader
|
||||
:isShowTip="true"
|
||||
:instance="instance"
|
||||
v-model="form.thumbUrl"
|
||||
:limit="1"
|
||||
:cropOps="cropOps"
|
||||
is-crop>
|
||||
<template slot="tips">最多上传1张图片,单个文件最大10MB,支持jpg、jpeg、png<br/>格式图片比例:1.6:1</template>
|
||||
</ai-uploader>
|
||||
</el-form-item> -->
|
||||
</el-form>
|
||||
</template>
|
||||
</ai-card>
|
||||
</template>
|
||||
<template slot="footer" class="footer">
|
||||
<el-button class="delete-btn footer-btn" @click="cancel(false)">取消</el-button>
|
||||
<el-button type="primary" size="small" @click="onSubmit()">保存</el-button>
|
||||
</template>
|
||||
</ai-detail>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {mapState} from 'vuex'
|
||||
|
||||
export default {
|
||||
name: 'Add',
|
||||
|
||||
props: {
|
||||
dict: Object,
|
||||
params: Object,
|
||||
instance: Function,
|
||||
areaId: String
|
||||
},
|
||||
|
||||
data() {
|
||||
return {
|
||||
form: {
|
||||
title: '',
|
||||
type: '',
|
||||
content: '',
|
||||
fileIds: [],
|
||||
thumbUrl: []
|
||||
},
|
||||
fileList: [],
|
||||
isDetail: true,
|
||||
cropOps: {
|
||||
width: "336px",
|
||||
height: "210px"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
computed: {
|
||||
...mapState(['user'])
|
||||
},
|
||||
|
||||
created() {
|
||||
if (this.params && this.params.id) {
|
||||
this.getInfo()
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
onBack() {
|
||||
this.cancel()
|
||||
},
|
||||
|
||||
getInfo() {
|
||||
this.instance.post(`/appvillageinfo/queryDetailById?id=${this.params.id}`).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.form = {
|
||||
...res.data
|
||||
}
|
||||
this.form.thumbUrl = res.data.thumbUrl ? JSON.parse(res.data.thumbUrl) : []
|
||||
this.fileList = res.data.files || []
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
onSubmit() {
|
||||
this.$refs.form.validate((valid) => {
|
||||
if (valid) {
|
||||
this.instance.post(`/appvillageinfo/addOrUpdate`, {
|
||||
...this.form,
|
||||
fileIds: this.fileList.map(v => v.id),
|
||||
thumbUrl: this.form.thumbUrl.length ? JSON.stringify([{
|
||||
url: this.form.thumbUrl[0].url
|
||||
}]) : ''
|
||||
}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success(`${this.params.id ? '编辑成功' : '提交成功'}`)
|
||||
setTimeout(() => {
|
||||
this.cancel(true)
|
||||
}, 800)
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
cancel(isRefresh) {
|
||||
this.$emit('change', {
|
||||
type: 'list',
|
||||
isRefresh: !!isRefresh
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.add-detail {
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
background: #F2F4F6 !important;
|
||||
|
||||
.map-wrapper {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
height: 400px;
|
||||
|
||||
.search-input {
|
||||
position: absolute;
|
||||
top: 20px;
|
||||
left: 20px;
|
||||
z-index: 1111;
|
||||
width: 220px !important;
|
||||
height: 32px !important;
|
||||
}
|
||||
|
||||
#map {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
z-index: 11;
|
||||
width: 100%;
|
||||
height: 400px;
|
||||
}
|
||||
}
|
||||
|
||||
::v-deep .el-form-item__content {
|
||||
margin-left: 140px !important;
|
||||
}
|
||||
|
||||
.add-detail__form {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
|
||||
.el-input {
|
||||
width: 328px;
|
||||
}
|
||||
}
|
||||
|
||||
.add-form {
|
||||
&:first-child {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
}
|
||||
|
||||
.add-form__item, .add-detail__form {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 0 90px 0 50px;
|
||||
}
|
||||
|
||||
::v-deep .ai-detail__footer {
|
||||
background: #fff !important;
|
||||
}
|
||||
|
||||
::v-deep .ai-detail {
|
||||
div {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
}
|
||||
|
||||
::v-deep .ai-detail__content--active {
|
||||
padding: 20px;
|
||||
box-sizing: border-box;
|
||||
|
||||
.ai-detail__content--wrapper {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.aibar {
|
||||
padding: 0 16px;
|
||||
}
|
||||
|
||||
.add-form {
|
||||
background: #fff;
|
||||
}
|
||||
}
|
||||
|
||||
::v-deep .ai-wrapper {
|
||||
align-items: inherit !important;
|
||||
}
|
||||
|
||||
.footer-btn {
|
||||
width: 92px;
|
||||
}
|
||||
|
||||
el-form {
|
||||
padding-bottom: 80px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
77
project/oms/apps/AppArticles/components/Detail.vue
Normal file
77
project/oms/apps/AppArticles/components/Detail.vue
Normal file
@@ -0,0 +1,77 @@
|
||||
<template>
|
||||
<ai-detail class="event-detail">
|
||||
<template #title>
|
||||
<ai-title title="村务公开详情" :isShowBack="true" @onBackClick="onBack" isShowBottomBorder>
|
||||
</ai-title>
|
||||
</template>
|
||||
<template #content>
|
||||
<ai-card :title="info.title" titlePosition="center">
|
||||
<template #title>
|
||||
<h2>{{ info.title }}</h2>
|
||||
<p class="subTitle">{{ info.createDate }} {{ info.unitName || '-' }}</p>
|
||||
</template>
|
||||
<template #content>
|
||||
<img class="cover" :src="info.thumbUrl[0].url" v-if="info.thumbUrl && info.thumbUrl.length">
|
||||
<ai-article :value="info.content"></ai-article>
|
||||
</template>
|
||||
</ai-card>
|
||||
</template>
|
||||
</ai-detail>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'detail',
|
||||
|
||||
props: {
|
||||
instance: Function,
|
||||
dict: Object,
|
||||
permissions: Function,
|
||||
params: Object
|
||||
},
|
||||
|
||||
data () {
|
||||
return {
|
||||
info: {}
|
||||
}
|
||||
},
|
||||
|
||||
mounted () {
|
||||
this.getInfo()
|
||||
},
|
||||
|
||||
methods: {
|
||||
getInfo () {
|
||||
this.instance.post(`/appvillageinfo/queryDetailById?id=${this.params.id}`).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.info = res.data
|
||||
if (res.data.thumbUrl) {
|
||||
this.info.thumbUrl = JSON.parse(res.data.thumbUrl)
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
onBack () {
|
||||
this.$emit('change', {
|
||||
type: 'list'
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.cover {
|
||||
display: block;
|
||||
width: 300px;
|
||||
height: 140px;
|
||||
margin: 20px auto;
|
||||
}
|
||||
|
||||
.subTitle {
|
||||
text-align: center;
|
||||
font-size: 12px;
|
||||
font-weight: normal;
|
||||
}
|
||||
</style>
|
||||
292
project/oms/apps/AppArticles/components/Event.vue
Normal file
292
project/oms/apps/AppArticles/components/Event.vue
Normal file
@@ -0,0 +1,292 @@
|
||||
<template>
|
||||
<section class="event">
|
||||
<ai-list>
|
||||
<ai-title slot="title" title="村务公开" isShowBottomBorder></ai-title>
|
||||
<template slot="content">
|
||||
<ai-search-bar>
|
||||
<template slot="left">
|
||||
<el-button icon="iconfont iconAdd" type="primary" size="small" @click="add">添加</el-button>
|
||||
</template>
|
||||
<template slot="right">
|
||||
<el-input
|
||||
placeholder="请输入标题"
|
||||
size="small"
|
||||
clearable
|
||||
v-model="search.title"
|
||||
@keyup.enter.native="search.current = 1, getList()"
|
||||
@clear="search.current = 1, search.title = '', getList()"
|
||||
suffix-icon="iconfont iconSearch" />
|
||||
</template>
|
||||
</ai-search-bar>
|
||||
<div class="ai-table">
|
||||
<ai-table
|
||||
:tableData="tableData"
|
||||
:col-configs="colConfigs"
|
||||
:total="total"
|
||||
:current.sync="search.current"
|
||||
:size.sync="search.size"
|
||||
@getList="getList">
|
||||
<el-table-column slot="options" label="操作" align="center" width="250" fixed="right">
|
||||
<template slot-scope="{ row }" class="fs-14">
|
||||
<div class="table-options">
|
||||
<el-button
|
||||
type="text"
|
||||
@click="publish(row)"
|
||||
title="发布">
|
||||
发布
|
||||
</el-button>
|
||||
<el-button
|
||||
type="text"
|
||||
title="详情"
|
||||
@click="toDetail(row.id)">
|
||||
详情
|
||||
</el-button>
|
||||
<el-button
|
||||
type="text"
|
||||
title="编辑"
|
||||
@click="toAdd(row.id)">
|
||||
编辑
|
||||
</el-button>
|
||||
<el-button
|
||||
@click="remove(row.id)"
|
||||
type="text"
|
||||
title="删除">
|
||||
删除
|
||||
</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</ai-table>
|
||||
</div>
|
||||
</template>
|
||||
</ai-list>
|
||||
<ai-dialog title="请选择发布平台企业" :visible.sync="dialog" width="600px" @onConfirm="saveSaas">
|
||||
<el-form ref="saasForm" :model="dialogForm" size="small" label-width="120px">
|
||||
<el-form-item required label="saas平台" prop="saasId" :rules="[{required: true, message: '请选择saas平台'}]">
|
||||
<el-select v-model="dialogForm.saasId" placeholder="请选择saas平台" style="width:100%;" @change="getCompanyList">
|
||||
<el-option
|
||||
v-for="item in saasList"
|
||||
:key="item.value"
|
||||
:label="item.name"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item required label="saas企业" prop="corpId" :rules="[{required: true, message: '请选择saas企业'}]">
|
||||
<el-select v-model="dialogForm.corpId" placeholder="请选择saas企业" style="width:100%;" @change="selectCompany">
|
||||
<el-option
|
||||
v-for="item in companyList"
|
||||
:key="item.value"
|
||||
:label="item.name"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item required label="地区" prop="areaId" :rules="[{required: true, message: '请选择发布地区'}]">
|
||||
<ai-area-get :instance="instance" v-model="dialogForm.areaId" :root="rootId" :name.sync="dialogForm.areaName" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</ai-dialog>
|
||||
</section>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapState } from 'vuex'
|
||||
|
||||
export default {
|
||||
name: 'event',
|
||||
|
||||
props: {
|
||||
instance: Function,
|
||||
dict: Object,
|
||||
},
|
||||
|
||||
computed: {
|
||||
...mapState(['user']),
|
||||
colConfigs() {
|
||||
return [
|
||||
{ prop: 'type', label: '类型', formart: v => this.dict.getLabel('villInfoType', v) },
|
||||
{ prop: 'title', label: '标题', align: 'left' },
|
||||
{ prop: 'createDate', label: '创建时间', dateFormart: 'YYYY-MM-DD', align: 'center' },
|
||||
{ prop: 'createUser', label: '发布人', align: 'center' },
|
||||
{ slot: 'options', label: '操作' }
|
||||
]
|
||||
}
|
||||
},
|
||||
|
||||
data () {
|
||||
return {
|
||||
search: {
|
||||
current: 1,
|
||||
size: 10,
|
||||
title: ''
|
||||
},
|
||||
total: 0,
|
||||
ids: [],
|
||||
tableData: [],
|
||||
dialog: false,
|
||||
dialogForm: {},
|
||||
saasList: [],
|
||||
companyList: [],
|
||||
rootId: ''
|
||||
}
|
||||
},
|
||||
mounted () {
|
||||
this.dict.load('villInfoType').then(() => {
|
||||
this.getList()
|
||||
this.getsaasList()
|
||||
})
|
||||
},
|
||||
|
||||
methods: {
|
||||
getsaasList() {
|
||||
this.instance.post("/appSaas/page", null, {
|
||||
params: {size: 10000}
|
||||
}).then(res => {
|
||||
if (res?.data) {
|
||||
this.saasList = res.data?.records
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
getCompanyList() {
|
||||
this.instance.post("/appCorp/page", null, {
|
||||
params: {saasId:this.dialogForm.saasId, size: 10000}
|
||||
}).then(res => {
|
||||
if (res?.data) {
|
||||
this.companyList = res.data.records
|
||||
this.rootId = ''
|
||||
this.dialogForm.areaId = ''
|
||||
this.corpId = ''
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
selectCompany() {
|
||||
this.companyList.map(item => {
|
||||
if(item.id == this.dialogForm.corpId) {
|
||||
this.rootId = item.areaId
|
||||
this.dialogForm.areaId = item.areaId
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
getList () {
|
||||
this.instance.post(`/appvillageinfo/list`, null, {
|
||||
params: {
|
||||
...this.search,
|
||||
areaId: this.areaId
|
||||
}
|
||||
}).then(res => {
|
||||
if (res.data) {
|
||||
this.tableData = res.data.records
|
||||
this.total = res.data.total
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
publish (params) {
|
||||
this.dialogForm.id = params.id
|
||||
this.dialog = true
|
||||
},
|
||||
|
||||
toAdd (id) {
|
||||
this.$emit('change', {
|
||||
type: 'add',
|
||||
params: {
|
||||
id
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
add () {
|
||||
this.$emit('change', {
|
||||
type: 'add',
|
||||
params: {
|
||||
id: ''
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
toEdit (id) {
|
||||
this.$emit('change', {
|
||||
type: 'add',
|
||||
params: {
|
||||
type: 'ReportAdd',
|
||||
id
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
toDetail (id) {
|
||||
this.$emit('change', {
|
||||
type: 'detail',
|
||||
params: {
|
||||
type: 'eventDetail',
|
||||
id
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
remove (id) {
|
||||
this.$confirm('确定删除该数据?').then(() => {
|
||||
this.instance.post(`/app/appvillageinfo/delete?ids=${id}`).then(res => {
|
||||
if (res.code == 0) {
|
||||
this.$message.success('删除成功!')
|
||||
this.getList()
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
saveSaas() {
|
||||
this.$refs.saasForm.validate(v => {
|
||||
if (v) {
|
||||
this.instance.post(`/appvillageinfo/sync?corpId=${this.dialogForm.corpId}&id=${this.dialogForm.id}&areaId=${this.dialogForm.areaId}`).then(res => {
|
||||
if (res?.code == 0) {
|
||||
this.dialog = false;
|
||||
this.$message.success("发布成功")
|
||||
this.dialogForm = {}
|
||||
} else {
|
||||
this.$message.error(res?.msg)
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.event {
|
||||
height: 100%;
|
||||
::v-deep th {
|
||||
font-weight: bold!important;
|
||||
}
|
||||
::v-deep .table-options{
|
||||
span{
|
||||
font-size: 14px!important;
|
||||
}
|
||||
}
|
||||
}
|
||||
.table-btn {
|
||||
margin-right: 16px;
|
||||
font-size: 14px;
|
||||
color: #2266FF;
|
||||
cursor: pointer;
|
||||
|
||||
&:hover {
|
||||
opacity: 0.6;
|
||||
}
|
||||
|
||||
&:last-child {
|
||||
margin-right: 0;
|
||||
}
|
||||
|
||||
&:last-child:hover {
|
||||
color: #f46;
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
223
project/oms/apps/AppCompany/components/List.vue
Normal file
223
project/oms/apps/AppCompany/components/List.vue
Normal file
@@ -0,0 +1,223 @@
|
||||
<template>
|
||||
<section class="list">
|
||||
<ai-list>
|
||||
<ai-title slot="title" title="企业管理" isShowBottomBorder/>
|
||||
<template #content>
|
||||
<ai-search-bar>
|
||||
<template #left>
|
||||
<el-select v-model="search.saasId" size="small" placeholder="请选择saas平台" @change="getDataInit">
|
||||
<el-option
|
||||
v-for="item in saasList"
|
||||
:key="item.value"
|
||||
:label="item.name"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</template>
|
||||
</ai-search-bar>
|
||||
<ai-search-bar>
|
||||
<template #left>
|
||||
<el-button type="primary" icon="iconfont iconAdd" @click="dialogForm = {}, dialog=true">添加</el-button>
|
||||
</template>
|
||||
<template #right>
|
||||
<el-input size="small" placeholder="企业名称" v-model="search.name" clearable @change="getDataInit"/>
|
||||
</template>
|
||||
</ai-search-bar>
|
||||
<ai-table :tableData="tableData" :total="page.total" :current.sync="page.current" :size.sync="page.size"
|
||||
@getList="getTableData" :col-configs="colConfigs" :dict="dict"
|
||||
@selection-change="v=>ids=v.filter(e=>e.id).map(e=>e.id)">
|
||||
<el-table-column slot="options" align="center" label="操作" fixed="right" width="240px">
|
||||
<div class="table-options" slot-scope="{ row }">
|
||||
<el-button type="text" @click="handleEnter(row.accessUrl)">打开</el-button>
|
||||
<el-button type="text" @click="handleSync(row.corpId)">同步</el-button>
|
||||
<el-button type="text" @click="toStatistics(row)">统计</el-button>
|
||||
<el-button type="text" @click="handleEdit(row)">编辑</el-button>
|
||||
<el-button type="text" @click="handleDelete(row.id)">删除</el-button>
|
||||
</div>
|
||||
</el-table-column>
|
||||
</ai-table>
|
||||
</template>
|
||||
</ai-list>
|
||||
<ai-dialog :title="dialogTitle" :visible.sync="dialog" width="600px" @onConfirm="saveSaas">
|
||||
<el-form ref="saasForm" :model="dialogForm" :rules="rules" size="small" label-width="120px">
|
||||
<el-form-item required label="名称" prop="name">
|
||||
<el-input v-model.trim="dialogForm.name" placeholder="请输入saas企业名称" clearable :maxLength="50"/>
|
||||
</el-form-item>
|
||||
<el-form-item required label="saas平台" prop="saasId">
|
||||
<el-select v-model="dialogForm.saasId" placeholder="请选择saas平台" style="width:100%;">
|
||||
<el-option
|
||||
v-for="item in saasList"
|
||||
:key="item.value"
|
||||
:label="item.name"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item required label="地区" prop="areaId" :rules="[{required: true, message: '请选择发布地区'}]">
|
||||
<ai-area-get :instance="instance" v-model="dialogForm.areaId" :name.sync="dialogForm.areaName" />
|
||||
</el-form-item>
|
||||
<el-form-item required label="企业CORP_ID" prop="corpId" :rules="[{required: true, message: '请输入企业CORP_ID'}]">
|
||||
<el-input v-model.trim="dialogForm.corpId" placeholder="请输入企业CORP_ID" clearable :maxLength="50"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="AGENT_ID" prop="corpAgentId">
|
||||
<el-input v-model.trim="dialogForm.corpAgentId" placeholder="请输入企业AGENT_ID" clearable :maxLength="50"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="CORP_SECRET" prop="corpSecret">
|
||||
<el-input v-model.trim="dialogForm.corpSecret" placeholder="请输入企业CORP_SECRET" clearable :maxLength="50"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="企业通讯录SECRET" prop="corpAddressBookSecret">
|
||||
<el-input v-model.trim="dialogForm.corpAddressBookSecret" placeholder="请输入企业通讯录SECRET" clearable :maxLength="50"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="访问地址" prop="accessUrl" :rules="[{required: true, message: '请输入访问地址'}]">
|
||||
<el-input v-model.trim="dialogForm.accessUrl" placeholder="请输入访问地址" clearable
|
||||
:maxLength="255"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</ai-dialog>
|
||||
</section>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
export default {
|
||||
name: "list",
|
||||
props: {
|
||||
instance: Function,
|
||||
dict: Object,
|
||||
permissions: Function
|
||||
},
|
||||
computed: {
|
||||
isEdit() {
|
||||
return !!this.dialogForm.id
|
||||
},
|
||||
dialogTitle() {
|
||||
return this.isEdit ? '修改saas企业' : '添加saas企业'
|
||||
},
|
||||
colConfigs() {
|
||||
return [
|
||||
{label: "名称", prop: "name"},
|
||||
{label: "saas平台", prop: "saasName", align: 'center'},
|
||||
{label: "地区", prop: "areaName", align: 'center'},
|
||||
{label: "企业CORP_ID", prop: "corpId", align: 'center'},
|
||||
{label: "访问地址", prop: "accessUrl"},
|
||||
{label: "创建时间", prop: "createTime"},
|
||||
{slot: "options"}
|
||||
]
|
||||
},
|
||||
rules() {
|
||||
return {
|
||||
name: [{required: true, message: "请输入saas企业名称"}],
|
||||
saasId: [{required: true, message: "请选择saas平台"}],
|
||||
}
|
||||
},
|
||||
updateRules() {
|
||||
return {
|
||||
password: [{required: true, message: "请输入平台密码"}]
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
page: {current: 1, size: 10, total: 0},
|
||||
dialog: false,
|
||||
dialogForm: {},
|
||||
tableData: [],
|
||||
search: {name: "", saasId: ''},
|
||||
ids: [],
|
||||
saasList: []
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getsaasList() {
|
||||
this.instance.post("/appSaas/page", null, {
|
||||
params: {size: 10000}
|
||||
}).then(res => {
|
||||
if (res?.data) {
|
||||
this.saasList = res.data?.records
|
||||
}
|
||||
})
|
||||
},
|
||||
getDataInit() {
|
||||
this.page.current = 1
|
||||
this.getTableData()
|
||||
},
|
||||
getTableData() {
|
||||
this.instance.post("/appCorp/page", null, {
|
||||
params: {...this.page, ...this.search}
|
||||
}).then(res => {
|
||||
if (res?.data) {
|
||||
this.tableData = res.data.records
|
||||
this.page.total = res.data.total
|
||||
}
|
||||
})
|
||||
},
|
||||
// 新增/修改
|
||||
saveSaas() {
|
||||
this.$refs.saasForm.validate(v => {
|
||||
if (v) {
|
||||
this.saasList.map(item => {
|
||||
if(item.id == this.dialogForm.saasId) {
|
||||
this.dialogForm.saasName = item.name
|
||||
}
|
||||
})
|
||||
this.instance.post("/appCorp/addOrUpdate", this.dialogForm).then(res => {
|
||||
if (res?.code == 0) {
|
||||
this.dialog = false;
|
||||
this.$message.success("保存成功")
|
||||
this.getTableData();
|
||||
} else {
|
||||
this.$message.error(res?.msg)
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
handleEdit(row) {
|
||||
this.dialogForm = row
|
||||
this.dialog = true
|
||||
},
|
||||
handleDelete(ids) {
|
||||
this.$confirm("是否要删除该Saas信息?").then(() => {
|
||||
this.instance.post("/appCorp/delete", null, {
|
||||
params: {ids}
|
||||
}).then(res => {
|
||||
if (res?.code == 0) {
|
||||
this.getTableData();
|
||||
this.$message.success("删除成功!");
|
||||
}
|
||||
})
|
||||
}).catch(() => 0)
|
||||
},
|
||||
handleSync(corpId) {
|
||||
this.$confirm("是否确定同步该企业数据?").then(() => {
|
||||
this.instance.post("/appCorpStat/syncData?corpId="+corpId, null, {}).then(res => {
|
||||
if (res?.code == 0) {
|
||||
this.getTableData();
|
||||
this.$message.success("同步成功!");
|
||||
}
|
||||
})
|
||||
}).catch(() => 0)
|
||||
},
|
||||
handleEnter(accessUrl) {
|
||||
window.open(accessUrl, "_blank");
|
||||
},
|
||||
toStatistics(item) {
|
||||
this.$emit('change', {
|
||||
type: 'Statistics',
|
||||
params: item
|
||||
})
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.getsaasList()
|
||||
this.getTableData()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.list {
|
||||
height: 100%;
|
||||
|
||||
}
|
||||
</style>
|
||||
364
project/oms/apps/AppCompany/components/Statistics.vue
Normal file
364
project/oms/apps/AppCompany/components/Statistics.vue
Normal file
@@ -0,0 +1,364 @@
|
||||
<template>
|
||||
<ai-detail class="Statistics">
|
||||
<template #title>
|
||||
<ai-title title="企业统计" :isShowBack="true" @onBackClick="onBack" isShowBottomBorder>
|
||||
</ai-title>
|
||||
</template>
|
||||
<template #content>
|
||||
<ai-card title="基本信息">
|
||||
<template #content>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="5">
|
||||
<div class="title">群总数</div>
|
||||
<div class="num">{{info.groupCount}}</div>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<div class="title">成员总数</div>
|
||||
<div class="num">{{info.userCount}}</div>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<div class="title">成员活跃总数</div>
|
||||
<div class="num">{{info.activeCount}}</div>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<div class="title">居民总人数</div>
|
||||
<div class="num">{{info.residentCount}}</div>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<div class="title">群成员总数</div>
|
||||
<div class="num">{{info.groupuserCount}}</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</template>
|
||||
</ai-card>
|
||||
<ai-card title="统计信息" class="chart-content">
|
||||
<template #title>
|
||||
<div class="tabs">
|
||||
<div class="item" v-for="(item, index) in tabs" :key="index" :class="index == activeIndex ? 'active' : ''" @click="tabClick(index)">{{item}}</div>
|
||||
</div>
|
||||
</template>
|
||||
<template #content>
|
||||
<div class="echart" id="echart" v-if="activeIndex != 2 && activeIndex != 3"></div>
|
||||
<div class="table" v-else-if="activeIndex == 2">
|
||||
<ai-search-bar>
|
||||
<template slot="right">
|
||||
<el-input
|
||||
v-model="innerMemberId"
|
||||
size="small"
|
||||
placeholder="输入群成员ID"
|
||||
@keyup.enter.native="(page.current = 1), getTableData()"
|
||||
clearable
|
||||
prefix-icon="iconfont iconSearch"
|
||||
/>
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="iconfont iconSearch"
|
||||
size="small"
|
||||
@click="(page.current = 1), getTableData()"
|
||||
>查询
|
||||
</el-button>
|
||||
<el-button
|
||||
icon="el-icon-refresh-right"
|
||||
size="small"
|
||||
@click="resetSearch"
|
||||
>重置</el-button
|
||||
>
|
||||
</template>
|
||||
</ai-search-bar>
|
||||
<ai-table :tableData="gropList" :total="page.total" :current.sync="page.current" :size.sync="page.size"
|
||||
@getList="getTableData" :col-configs="colConfigs" :dict="dict">
|
||||
<!-- <el-table-column slot="options" align="center" label="操作" fixed="right" width="240px">
|
||||
<div class="table-options" slot-scope="{ row }">
|
||||
<el-button type="text">打开</el-button>
|
||||
</div>
|
||||
</el-table-column> -->
|
||||
</ai-table>
|
||||
</div>
|
||||
<div class="table" v-else-if="activeIndex == 3">
|
||||
<ai-table :tableData="userList" :total="userPage.total" :current.sync="userPage.current" :size.sync="userPage.size"
|
||||
@getList="getUserTableData" :col-configs="userColConfigs" :dict="dict">
|
||||
<!-- <el-table-column slot="options" align="center" label="操作" fixed="right" width="240px">
|
||||
<div class="table-options" slot-scope="{ row }">
|
||||
<el-button type="text">打开</el-button>
|
||||
</div>
|
||||
</el-table-column> -->
|
||||
</ai-table>
|
||||
</div>
|
||||
</template>
|
||||
</ai-card>
|
||||
</template>
|
||||
</ai-detail>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import * as echarts from 'echarts'
|
||||
export default {
|
||||
name: 'Statistics',
|
||||
|
||||
props: {
|
||||
instance: Function,
|
||||
dict: Object,
|
||||
permissions: Function,
|
||||
params: Object
|
||||
},
|
||||
|
||||
data () {
|
||||
return {
|
||||
info: {},
|
||||
activeIndex: 0,
|
||||
tabs: ['概览', '群统计', '群列表', '成员与好友统计'],
|
||||
listData: [],
|
||||
pieData: [],
|
||||
myChart: null,
|
||||
gropList: [],
|
||||
page: {current: 1, size: 10, total: 0},
|
||||
innerMemberId: '',
|
||||
userList: [],
|
||||
userPage: {current: 1, size: 10, total: 0}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
colConfigs() {
|
||||
return [
|
||||
{label: "群名", prop: "name", width:200},
|
||||
{label: "创建时间", prop: "createTime", align: 'center', width:150},
|
||||
{label: "群成员数", prop: "memberCount", align: 'center', width:100},
|
||||
{label: "群主ID", prop: "owner", align: 'center', width:150},
|
||||
{label: "群公告", prop: "notice"},
|
||||
]
|
||||
},
|
||||
userColConfigs() {
|
||||
return [
|
||||
{label: "部门", prop: "departmentName"},
|
||||
{label: "姓名", prop: "name", align: 'center'},
|
||||
{label: "添加好友人数", prop: "residentCount", align: 'center'}
|
||||
]
|
||||
}
|
||||
},
|
||||
|
||||
mounted() {
|
||||
this.getInfo()
|
||||
this.getTableData()
|
||||
this.getUserTableData()
|
||||
},
|
||||
|
||||
methods: {
|
||||
chartInit() {
|
||||
var option = {}
|
||||
if(this.activeIndex != 1) {
|
||||
option = {
|
||||
tooltip: {
|
||||
trigger: 'axis'
|
||||
},
|
||||
legend: {
|
||||
data: ['群总数', '成员总数', '成员活跃总数', '居民总人数', '群成员总数']
|
||||
},
|
||||
grid: {
|
||||
left: '3%',
|
||||
right: '4%',
|
||||
bottom: '3%',
|
||||
containLabel: true
|
||||
},
|
||||
xAxis: {
|
||||
type: 'category',
|
||||
data: this.listData[5],
|
||||
},
|
||||
yAxis: {
|
||||
type: 'value'
|
||||
},
|
||||
series: [
|
||||
{
|
||||
name: '群总数',
|
||||
type: 'line',
|
||||
data: this.listData[0]
|
||||
},
|
||||
{
|
||||
name: '成员总数',
|
||||
type: 'line',
|
||||
data: this.listData[1]
|
||||
},
|
||||
{
|
||||
name: '成员活跃总数',
|
||||
type: 'line',
|
||||
data: this.listData[2]
|
||||
},
|
||||
{
|
||||
name: '居民总人数',
|
||||
type: 'line',
|
||||
data: this.listData[3]
|
||||
},
|
||||
{
|
||||
name: '群成员总数',
|
||||
type: 'line',
|
||||
data: this.listData[4]
|
||||
},
|
||||
]
|
||||
};
|
||||
}else {
|
||||
option = {
|
||||
tooltip: {
|
||||
trigger: 'item'
|
||||
},
|
||||
legend: {
|
||||
orient: 'vertical',
|
||||
left: 'left'
|
||||
},
|
||||
series: [
|
||||
{
|
||||
type: 'pie',
|
||||
radius: '50%',
|
||||
data: this.pieData,
|
||||
emphasis: {
|
||||
itemStyle: {
|
||||
shadowBlur: 10,
|
||||
shadowOffsetX: 0,
|
||||
shadowColor: 'rgba(0, 0, 0, 0.5)'
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
};
|
||||
}
|
||||
this.myChart.setOption(option);
|
||||
},
|
||||
getInfo() {
|
||||
this.myChart = echarts.init(document.getElementById("echart"));
|
||||
this.instance.post(`/appCorpStat/getLatestInfo?corpId=${this.params.corpId}`).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.info = res.data
|
||||
this.getCharInfo()
|
||||
}
|
||||
})
|
||||
},
|
||||
getCharInfo() {
|
||||
this.instance.post(`/appCorpStat/getLatestThreeMonthStat?corpId=${this.params.corpId}`).then(res => {
|
||||
if (res.code === 0) {
|
||||
if(res.data && res.data.length) {
|
||||
this.listData = []
|
||||
this.listData[0] = res.data.map(v => v.groupCount)
|
||||
this.listData[1] = res.data.map(v => v.userCount)
|
||||
this.listData[2] = res.data.map(v => v.activeCount)
|
||||
this.listData[3] = res.data.map(v => v.residentCount)
|
||||
this.listData[4] = res.data.map(v => v.groupuserCount)
|
||||
this.listData[5] = res.data.map(v => v.statDate)
|
||||
this.chartInit()
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
this.instance.post(`/wxcp/wxgroup/groupStatistic?corpId=${this.params.corpId}`).then(res => {
|
||||
if (res.code === 0) {
|
||||
if(res.data) {
|
||||
this.pieData = []
|
||||
Object.getOwnPropertyNames(res.data).forEach((key) => {
|
||||
var e = {
|
||||
value: res.data[key],
|
||||
name: key
|
||||
}
|
||||
this.pieData.push(e)
|
||||
});
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
resetSearch() {
|
||||
this.innerMemberId = ''
|
||||
this.page.current = 1
|
||||
this.getTableData()
|
||||
},
|
||||
getTableData() {
|
||||
this.instance.post(`/wxcp/wxgroup/list?corpId=${this.params.corpId}¤t=${this.page.current}&size=${this.page.size}&innerMemberId=${this.innerMemberId}`,).then(res => {
|
||||
if (res.code === 0) {
|
||||
if(res.data) {
|
||||
this.gropList = res.data.records
|
||||
this.page.total = res.data.total
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
getUserTableData() {
|
||||
this.instance.post(`/wxcp/wxuser/userStat?corpId=${this.params.corpId}¤t=${this.userPage.current}&size=${this.userPage.size}&mainDepartment=1`,).then(res => {
|
||||
if (res.code === 0) {
|
||||
if(res.data) {
|
||||
this.userList = res.data.records
|
||||
this.userPage.total = res.data.total
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
onBack () {
|
||||
this.$emit('change', {
|
||||
type: 'list'
|
||||
})
|
||||
},
|
||||
tabClick(index) {
|
||||
this.activeIndex = index
|
||||
this.myChart.dispose()
|
||||
if(index != 2 && index != 3) {
|
||||
this.$nextTick(() => {
|
||||
this.myChart = echarts.init(document.getElementById("echart"));
|
||||
this.chartInit()
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.cover {
|
||||
display: block;
|
||||
width: 300px;
|
||||
height: 140px;
|
||||
margin: 20px auto;
|
||||
}
|
||||
|
||||
.subTitle {
|
||||
text-align: center;
|
||||
font-size: 12px;
|
||||
font-weight: normal;
|
||||
}
|
||||
.title{
|
||||
line-height: 60px;
|
||||
font-size: 18px;
|
||||
text-align: center;
|
||||
color: #666;
|
||||
}
|
||||
.num{
|
||||
font-size: 32px;
|
||||
font-weight: 700;
|
||||
text-align: center;
|
||||
padding-bottom: 20px;
|
||||
}
|
||||
.tabs{
|
||||
.item{
|
||||
display: inline-block;
|
||||
padding: 0 20px;
|
||||
line-height: 54px;
|
||||
cursor: pointer;
|
||||
}
|
||||
.active{
|
||||
color: #26f;
|
||||
border-bottom: 2px solid #26f;
|
||||
}
|
||||
}
|
||||
.chart-content{
|
||||
height: calc(100% - 240px);
|
||||
::v-deep .ai-card__body{
|
||||
height: calc(100% - 70px);
|
||||
}
|
||||
.echart{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
.table{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
overflow-y: scroll;
|
||||
}
|
||||
}
|
||||
::v-deep .ai-detail__content--wrapper{
|
||||
height: 100%;
|
||||
}
|
||||
</style>
|
||||
273
project/oms/apps/AppCorpStatistics/AppCorpStatistics.vue
Normal file
273
project/oms/apps/AppCorpStatistics/AppCorpStatistics.vue
Normal file
@@ -0,0 +1,273 @@
|
||||
<template>
|
||||
<section class="AppCorpStatistics">
|
||||
<ai-detail>
|
||||
<!-- 标题 -->
|
||||
<ai-title slot="title" title="企微统计" isShowBottomBorder />
|
||||
<template #content>
|
||||
<ai-tree-menu title="企微统计">
|
||||
<el-tree
|
||||
@node-click="nodeClick"
|
||||
:props="props"
|
||||
:load="loadNode"
|
||||
lazy
|
||||
:expand-on-click-node="false"
|
||||
>
|
||||
</el-tree>
|
||||
</ai-tree-menu>
|
||||
|
||||
<div class="flex">
|
||||
<el-row :gutter="20" class="el-row">
|
||||
<el-col :span="5">
|
||||
<div class="title">群总数</div>
|
||||
<div class="num">{{info.groupCount}}</div>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<div class="title">成员总数</div>
|
||||
<div class="num">{{info.userCount}}</div>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<div class="title">成员活跃总数</div>
|
||||
<div class="num">{{info.activeCount}}</div>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<div class="title">居民总人数</div>
|
||||
<div class="num">{{info.residentCount}}</div>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<div class="title">群成员总数</div>
|
||||
<div class="num">{{info.groupuserCount}}</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<div class="table">
|
||||
<ai-search-bar>
|
||||
<template slot="right">
|
||||
<el-input
|
||||
v-model="name"
|
||||
size="small"
|
||||
placeholder="输入企微名称"
|
||||
@keyup.enter.native="(page.current = 1), getTableData()"
|
||||
clearable
|
||||
prefix-icon="iconfont iconSearch"
|
||||
/>
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="iconfont iconSearch"
|
||||
size="small"
|
||||
@click="(page.current = 1), getTableData()"
|
||||
>查询
|
||||
</el-button>
|
||||
<el-button
|
||||
icon="el-icon-refresh-right"
|
||||
size="small"
|
||||
@click="resetSearch"
|
||||
>重置</el-button
|
||||
>
|
||||
</template>
|
||||
</ai-search-bar>
|
||||
<ai-table :tableData="gropList" :total="page.total" :current.sync="page.current" :size.sync="page.size"
|
||||
@getList="getTableData" :col-configs="colConfigs" :dict="dict">
|
||||
</ai-table>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</ai-detail>
|
||||
</section>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapState } from 'vuex'
|
||||
|
||||
export default {
|
||||
name: 'AppCorpStatistics',
|
||||
label: 'saas企微统计',
|
||||
props: {
|
||||
dict: Object,
|
||||
instance: Function,
|
||||
params: Object,
|
||||
},
|
||||
|
||||
data() {
|
||||
return {
|
||||
props: {
|
||||
label: 'name',
|
||||
children: 'zones',
|
||||
isLeaf: 'leaf'
|
||||
},
|
||||
corpTotal: 0,
|
||||
info: {},
|
||||
gropList: [],
|
||||
page: {current: 1, size: 10, total: 0},
|
||||
areaId: '',
|
||||
name: ''
|
||||
}
|
||||
},
|
||||
|
||||
computed: {
|
||||
...mapState(['user']),
|
||||
|
||||
colConfigs() {
|
||||
return [
|
||||
{label: "企微名称", prop: "name", align: 'center', width:250},
|
||||
{label: "地区", prop: "areaName", align: 'center', width:150},
|
||||
{label: "创建时间", prop: "createTime", align: 'center', width:200},
|
||||
{label: 'CORP_ID', prop: "corpId"}
|
||||
]
|
||||
}
|
||||
},
|
||||
|
||||
mounted() {
|
||||
this.getInfo()
|
||||
this.getTableData()
|
||||
},
|
||||
|
||||
methods: {
|
||||
loadNode(node, resolve) {
|
||||
if (node.level == 0) {
|
||||
this.instance.post(`/appCorpStat/getCorpStatTotal`).then((res) => {
|
||||
if (res.data) {
|
||||
return resolve([{ name: `全国 (${res.data})`}]);
|
||||
}
|
||||
})
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
var areaId = node.data.id
|
||||
|
||||
if(node.level == 1) { //全国
|
||||
areaId = ''
|
||||
}
|
||||
this.instance.post(`/appCorpStat/getCorpStatByArea?areaId=${areaId}`).then((res) => {
|
||||
if (res.data) {
|
||||
res.data.map((item) => {
|
||||
item.name = item.name + `(${item.total})`
|
||||
})
|
||||
resolve(res.data)
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
nodeClick(list, node) {
|
||||
if(node.data.id) {
|
||||
this.areaId = node.data.id
|
||||
this.page.current = 1
|
||||
}else {
|
||||
this.areaId = ''
|
||||
}
|
||||
this.getInfo()
|
||||
this.getTableData()
|
||||
},
|
||||
|
||||
resetSearch() {
|
||||
this.name = ''
|
||||
this.page.current = 1
|
||||
this.getTableData()
|
||||
},
|
||||
|
||||
getInfo() {
|
||||
this.info = {}
|
||||
this.instance.post(`/appCorpStat/getLatestInfo?areaId=${this.areaId}`).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.info = res.data
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
getTableData() {
|
||||
this.gropList = []
|
||||
this.page.total = 0
|
||||
this.instance.post(`/appCorp/page?areaId=${this.areaId}¤t=${this.page.current}&size=${this.page.size}&name=${this.name}`,).then(res => {
|
||||
if (res.code === 0) {
|
||||
if(res.data) {
|
||||
this.gropList = res.data.records
|
||||
this.page.total = res.data.total
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.AppCorpStatistics {
|
||||
height: 100%;
|
||||
|
||||
.ai-detail {
|
||||
::v-deep .ai-detail__content {
|
||||
.ai-detail__content--wrapper {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
height: 100%;
|
||||
max-width: 100%;
|
||||
padding: 15px;
|
||||
|
||||
.AiTreeMenu {
|
||||
width: 22%;
|
||||
}
|
||||
|
||||
.flex {
|
||||
width: 78%;
|
||||
margin-left: 10px;
|
||||
padding: 15px;
|
||||
background-color: #fff;
|
||||
overflow-y: scroll;
|
||||
|
||||
.ai-search-ba {
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.ai-table {
|
||||
margin-top: 0 !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
::v-deep .el-tree {
|
||||
.el-tree-node__content {
|
||||
display: inline-flex;
|
||||
min-width: 100%;
|
||||
|
||||
&:hover {
|
||||
background: #e8efff;
|
||||
color: #222222;
|
||||
border-radius: 2px;
|
||||
}
|
||||
}
|
||||
|
||||
.is-current > .el-tree-node__content {
|
||||
background: #2266ff;
|
||||
|
||||
&:hover {
|
||||
background: #2266ff;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
span {
|
||||
color: #fff;
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.title{
|
||||
line-height: 60px;
|
||||
font-size: 18px;
|
||||
text-align: center;
|
||||
color: #666;
|
||||
}
|
||||
.num{
|
||||
font-size: 32px;
|
||||
font-weight: 700;
|
||||
text-align: center;
|
||||
padding-bottom: 20px;
|
||||
}
|
||||
|
||||
.el-row{
|
||||
background-color: #eee;
|
||||
margin: 0 0 16px!important;
|
||||
}
|
||||
</style>
|
||||
178
project/oms/apps/AppLicense/AppLicense.vue
Normal file
178
project/oms/apps/AppLicense/AppLicense.vue
Normal file
@@ -0,0 +1,178 @@
|
||||
<template>
|
||||
<section class="AppLicense">
|
||||
<ai-list>
|
||||
<ai-title slot="title" title="证书管理" isShowBottomBorder/>
|
||||
<template #content>
|
||||
<ai-search-bar>
|
||||
<template #left>
|
||||
<el-button type="primary" icon="iconfont iconAdd" @click="dialogForm={},dialog=true">添加</el-button>
|
||||
</template>
|
||||
<template #right>
|
||||
<el-input size="small" placeholder="搜索证书名称" v-model="search.condition" clearable
|
||||
@change="page.current=1,getTableData()"/>
|
||||
</template>
|
||||
</ai-search-bar>
|
||||
<ai-table :tableData="tableData" :total="page.total" :current.sync="page.current" :size.sync="page.size"
|
||||
@getList="getTableData" :col-configs="colConfigs" :dict="dict"
|
||||
@selection-change="v=>ids=v.filter(e=>e.id).map(e=>e.id)">
|
||||
<el-table-column slot="options" align="center" label="操作" fixed="right" width="160px">
|
||||
<el-row type="flex" justify="center" align="middle" slot-scope="{row}">
|
||||
<el-button type="text" @click="handleDownload(row.id)">下载</el-button>
|
||||
<el-button type="text" @click="handleDelete(row.id)">删除</el-button>
|
||||
</el-row>
|
||||
</el-table-column>
|
||||
</ai-table>
|
||||
</template>
|
||||
</ai-list>
|
||||
<!--添加证书-->
|
||||
<ai-dialog :title="dialogTitle" :visible.sync="dialog" width="600px"
|
||||
@onConfirm="saveLicense">
|
||||
<el-form ref="licenseForm" :model="dialogForm" :rules="rules" size="small"
|
||||
label-width="120px">
|
||||
<el-form-item required label="证书名称" prop="name">
|
||||
<el-input v-model.trim="dialogForm.name" placeholder="请输入证书名称" clearable
|
||||
:maxLength="100"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="主板序列号" prop="mainBoard">
|
||||
<el-input v-model.trim="dialogForm.mainBoard" placeholder="请输入主板序列号" clearable
|
||||
:maxLength="50"/>
|
||||
</el-form-item>
|
||||
<el-form-item required label="CPU" prop="cpu">
|
||||
<el-input v-model.trim="dialogForm.cpu" placeholder="请输入CPU信息" clearable
|
||||
:maxLength="50"/>
|
||||
</el-form-item>
|
||||
<el-form-item required label="MAC地址" prop="mac">
|
||||
<el-input v-model.trim="dialogForm.mac" placeholder="请输入MAC地址" clearable
|
||||
:maxLength="100"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="IP地址" prop="ipAddress">
|
||||
<el-input v-model.trim="dialogForm.ipAddress" placeholder="请输入IP地址" clearable
|
||||
:maxLength="100"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="过期日期" prop="expireDate">
|
||||
<el-input v-model.trim="dialogForm.expireDate" placeholder="请输入过期日期" clearable
|
||||
:maxLength="20"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</ai-dialog>
|
||||
</section>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
export default {
|
||||
name: "AppLicense",
|
||||
label: "证书管理",
|
||||
props: {
|
||||
instance: Function,
|
||||
dict: Object,
|
||||
permissions: Function
|
||||
},
|
||||
computed: {
|
||||
isEdit() {
|
||||
return !!this.dialogForm.id
|
||||
},
|
||||
dialogTitle() {
|
||||
return this.isEdit ? '修改证书' : '添加证书'
|
||||
},
|
||||
colConfigs() {
|
||||
return [
|
||||
{label: "证书名称", prop: "name"},
|
||||
{label: "CPU", prop: "cpu", align: 'center'},
|
||||
{label: "MAC地址", prop: "mac"},
|
||||
{label: "主板序列号", prop: "mainBoard"},
|
||||
{label: "IP地址", prop: "ipAddress"},
|
||||
{label: "过期日期", prop: "expireDate"},
|
||||
{label: "创建时间", prop: "createTime"},
|
||||
{slot: "options"}
|
||||
]
|
||||
},
|
||||
rules() {
|
||||
return {
|
||||
name: [{required: true, message: "请输入证书名称"}],
|
||||
cpu: [{required: true, message: "请输入CPU信息"}],
|
||||
mac: [{required: true, message: "请输入MAC地址"}],
|
||||
mainBoard: [{required: true, message: "请输入主板序列号"}],
|
||||
ipAddress: [{required: true, message: "请输入IP地址"}],
|
||||
expireDate: [{required: true, message: "请选择过期日期"}]
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
page: {current: 1, size: 10, total: 0},
|
||||
dialog: false,
|
||||
dialogForm: {},
|
||||
tableData: [],
|
||||
search: {condition: ""},
|
||||
ids: []
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getTableData() {
|
||||
this.instance.post("/sysLicense/page", null, {
|
||||
params: {...this.page, ...this.search}
|
||||
}).then(res => {
|
||||
if (res?.data) {
|
||||
this.tableData = res.data?.records
|
||||
this.page.total = res.data.total
|
||||
}
|
||||
})
|
||||
},
|
||||
// 新增/修改
|
||||
saveLicense() {
|
||||
this.$refs.licenseForm.validate(v => {
|
||||
if (v) {
|
||||
this.instance.post("/sysLicense/save", this.dialogForm).then(res => {
|
||||
if (res?.code == 0) {
|
||||
this.dialog = false;
|
||||
this.$message.success("保存成功")
|
||||
this.getTableData();
|
||||
} else {
|
||||
this.$message.error(res?.msg)
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
handleDelete(ids) {
|
||||
this.$confirm("是否要删除该证书信息?").then(() => {
|
||||
this.instance.post("/sysLicense/delete", null, {
|
||||
params: {ids}
|
||||
}).then(res => {
|
||||
if (res?.code == 0) {
|
||||
this.getTableData();
|
||||
this.$message.success("删除成功!");
|
||||
}
|
||||
})
|
||||
}).catch(() => 0)
|
||||
},
|
||||
handleDownload(id) {
|
||||
this.instance.post("/sysLicense/create?id="+id, null, {responseType: 'blob'}).then(res => {
|
||||
const link = document.createElement('a')
|
||||
console.log(res.type)
|
||||
let blob = new Blob([res], {type: res.type})
|
||||
link.style.display = 'none'
|
||||
link.href = URL.createObjectURL(blob)
|
||||
link.setAttribute('download', 'license.lic')
|
||||
document.body.appendChild(link)
|
||||
link.click()
|
||||
document.body.removeChild(link)
|
||||
|
||||
}).catch(() => {
|
||||
this.$message.error("证书生成失败!");
|
||||
})
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getTableData()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.AppLicense {
|
||||
height: 100%;
|
||||
|
||||
}
|
||||
</style>
|
||||
416
project/oms/apps/AppRoleRightsManager/AppRoleRightsManager.vue
Normal file
416
project/oms/apps/AppRoleRightsManager/AppRoleRightsManager.vue
Normal file
@@ -0,0 +1,416 @@
|
||||
<template>
|
||||
<section class="AppRoleRightsManager">
|
||||
<ai-list v-if="!showDetail">
|
||||
<ai-title slot="title" title="角色管理" isShowBottomBorder/>
|
||||
<template #content>
|
||||
<ai-search-bar>
|
||||
<template #right>
|
||||
<el-input
|
||||
size="small"
|
||||
v-model="search.roleName"
|
||||
placeholder="角色名称"
|
||||
clearable
|
||||
@change="searchList()"
|
||||
suffix-icon="iconfont iconSearch"/>
|
||||
</template>
|
||||
</ai-search-bar>
|
||||
<ai-search-bar>
|
||||
<template #left>
|
||||
<el-button size="small" type="primary" icon="iconfont iconAdd"
|
||||
@click="$router.push({hash:'#add'})"
|
||||
v-if="$permissions('admin_sysapprole_add')">
|
||||
添加
|
||||
</el-button>
|
||||
<el-button
|
||||
size="small"
|
||||
icon="iconfont iconDelete"
|
||||
:disabled="!multipleSelection.length"
|
||||
class="del-btn-list"
|
||||
@click="deleteApp('all')"
|
||||
v-if="$permissions('admin_sysapprole_del')"
|
||||
>删除
|
||||
</el-button>
|
||||
</template>
|
||||
</ai-search-bar>
|
||||
<ai-table :tableData="adminList" :colConfigs="colConfigs" :total="total" :current.sync="page.pageNum"
|
||||
:size.sync="page.pageSize"
|
||||
@getList="getTableData" :col-configs="colConfigs" :dict="dict"
|
||||
@selection-change="v=>multipleSelection=v">
|
||||
<el-table-column label="角色用户" slot="users" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-tooltip
|
||||
effect="light"
|
||||
placement="top"
|
||||
:disabled="scope.row.users.length <= 2"
|
||||
content="更多角色用户请点击详情按钮">
|
||||
<span v-if="scope.row.users.length">
|
||||
{{
|
||||
scope.row.users
|
||||
.slice(0, 2)
|
||||
.map((e) => e.name + "(" + e.phone + ")")
|
||||
.join(";")
|
||||
}}
|
||||
<span v-if="scope.row.users.length > 2">...</span>
|
||||
</span>
|
||||
<span v-else>-</span>
|
||||
</el-tooltip>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column slot="options" label="操作" fixed="right" align="center">
|
||||
<template slot-scope="{row}">
|
||||
<el-button type="text" @click="beforeCopy(row)" v-if="$permissions('admin_sysapprole_edit')">复制
|
||||
</el-button>
|
||||
<el-button type="text" @click="viewApp(row)" v-if="$permissions('admin_sysapprole_detail')">详情
|
||||
</el-button>
|
||||
<el-button type="text" @click="openRightsGraph(row)" v-if="$permissions('admin_sysapprole_detail')">关系图
|
||||
</el-button>
|
||||
<el-button type="text" @click="toAddAppRole(row)" v-if="$permissions('admin_sysapprole_edit')">编辑
|
||||
</el-button>
|
||||
<el-button type="text" @click="deleteApp(row)" v-if="$permissions('admin_sysapprole_del')">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</ai-table>
|
||||
<ai-dialog
|
||||
title="应用角色详情"
|
||||
:visible.sync="viewShow"
|
||||
width="600px"
|
||||
customFooter>
|
||||
<ai-card title="基本信息">
|
||||
<template #content>
|
||||
<ai-wrapper>
|
||||
<ai-info-item label="应用角色名称" :value="viewInfo.name" isLine/>
|
||||
</ai-wrapper>
|
||||
</template>
|
||||
</ai-card>
|
||||
<ai-card title="权限信息">
|
||||
<template #content>
|
||||
<div style="margin-bottom: 16px" v-text="roleList.map(e => e.name).join('、')"/>
|
||||
</template>
|
||||
</ai-card>
|
||||
<ai-card title="角色账号">
|
||||
<template #right>
|
||||
<span style="text-align: right; color: #999">
|
||||
共<span style="color: #26f" v-text="userList.length"/>个账号
|
||||
</span>
|
||||
</template>
|
||||
<template #content>
|
||||
<div class="datail-table-body" v-if="userList.length">
|
||||
<div class="datail-item" v-for="(item, index) in userList" :key="index">
|
||||
<span class="item-name">{{ item.name }}</span>
|
||||
<span style="color: #999">{{ item.phone }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</ai-card>
|
||||
<template #footer>
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="toAddAppRole(viewInfo)"
|
||||
v-if="$permissions('admin_sysapprole_edit')"
|
||||
>编辑角色
|
||||
</el-button>
|
||||
</template>
|
||||
</ai-dialog>
|
||||
<ai-dialog title="权限关系图" :visible.sync="rightsGraph" class="rightsGraphDialog" customFooter>
|
||||
<rights-graph :instance="instance" :dict="dict" :app="selectApp"/>
|
||||
<el-button slot="footer" @click="rightsGraph=false">关闭</el-button>
|
||||
</ai-dialog>
|
||||
<!--复制角色-->
|
||||
<el-dialog
|
||||
class="editStyle"
|
||||
:visible.sync="copyDialog"
|
||||
width="520px"
|
||||
@close="dataInit()"
|
||||
title="复制角色">
|
||||
<el-form :model="form" label-width="80px">
|
||||
<el-form-item label="角色名" :rules="[{ required: true, message: '', trigger: 'blur' }]">
|
||||
<el-input
|
||||
v-model="editName"
|
||||
placeholder="请输入..."
|
||||
size="small"
|
||||
clearable
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" style="text-align: center">
|
||||
<el-button
|
||||
style="width: 92px"
|
||||
size="small"
|
||||
@click="copyDialog = false"
|
||||
>取消
|
||||
</el-button
|
||||
>
|
||||
<el-button
|
||||
style="width: 92px"
|
||||
size="small"
|
||||
type="primary"
|
||||
@click="copyFn()"
|
||||
:disabled="!editName"
|
||||
>
|
||||
确认
|
||||
</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</template>
|
||||
</ai-list>
|
||||
<rights-add v-else :instance="instance" :dict="dict" :permissions="permissions"/>
|
||||
</section>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import RightsAdd from "./rightsAdd";
|
||||
import RightsGraph from "./rightsGraph";
|
||||
|
||||
export default {
|
||||
name: "AppRoleRightsManager",
|
||||
components: {RightsGraph, RightsAdd},
|
||||
label: "权限管理(运营平台版)",
|
||||
provide() {
|
||||
return {
|
||||
top: this
|
||||
}
|
||||
},
|
||||
props: {
|
||||
instance: Function,
|
||||
dict: Object,
|
||||
permissions: Function,
|
||||
actions: {
|
||||
default: () => ({
|
||||
list: '/admin/role/page',
|
||||
apps: '/admin/role/list-all',
|
||||
delete: '/admin/role/del',
|
||||
detail: '/admin/role/queryById-checked',
|
||||
modify: '/admin/role/modify',
|
||||
})
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
colConfigs() {
|
||||
return [
|
||||
{type: "selection"},
|
||||
{label: "角色名", prop: "name", width: '100px'},
|
||||
{label: "用户数量", prop: "roleCount", align: 'center', width: '80px'},
|
||||
{slot: "users"},
|
||||
{slot: "options"}
|
||||
]
|
||||
},
|
||||
showDetail() {
|
||||
return this.$route.hash == "#add"
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
page: {pageNum: 1, pageSize: 10},
|
||||
search: {roleName: ''},
|
||||
adminList: [], //列表数据
|
||||
total: 0,
|
||||
multipleSelection: [],
|
||||
delShow: false,
|
||||
delParams: "",
|
||||
delIds: [],
|
||||
viewShow: false,
|
||||
viewInfo: {},
|
||||
roleList: [], //详情权限列表
|
||||
row: {},
|
||||
copyDialog: false,
|
||||
titleDel: "",
|
||||
form: {},
|
||||
editName: "",
|
||||
userList: [],
|
||||
rightsGraph: false,
|
||||
selectApp: {}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getTableData();
|
||||
},
|
||||
methods: {
|
||||
//查询table列表
|
||||
getTableData() {
|
||||
this.adminList = [];
|
||||
this.instance.post(this.actions.list, null, {
|
||||
params: {...this.page, ...this.search}
|
||||
}).then(res => {
|
||||
if (res?.data) {
|
||||
this.total = res.data.total;
|
||||
this.adminList = res.data.records;
|
||||
}
|
||||
})
|
||||
},
|
||||
//查询
|
||||
searchList() {
|
||||
this.page.pageNum = 1;
|
||||
this.getTableData();
|
||||
},
|
||||
//添加按钮
|
||||
toAddAppRole(item) {
|
||||
this.$router.push({
|
||||
hash: "#add",
|
||||
query: {
|
||||
id: item.id,
|
||||
name: item.name
|
||||
},
|
||||
});
|
||||
},
|
||||
//删除
|
||||
deleteApp(e) {
|
||||
if (e == "all") {
|
||||
this.multipleSelection.map((item) => {
|
||||
this.delIds.push(item.id);
|
||||
});
|
||||
this.delParams = `ids=${this.delIds}`;
|
||||
this.titleDel = "确定要执行删除操作吗?";
|
||||
} else {
|
||||
this.delParams = `ids=${e.id}`;
|
||||
this.titleDel = "确定需要删除该角色吗?";
|
||||
}
|
||||
this.$confirm(this.titleDel, {
|
||||
type: "error",
|
||||
}).then(() => {
|
||||
this.instance.post(`${this.actions.delete}?${this.delParams}`).then(res => {
|
||||
if (res?.msg == "success") {
|
||||
this.getTableData();
|
||||
} else {
|
||||
this.$message.error(res.msg);
|
||||
}
|
||||
});
|
||||
}).catch(() => 0);
|
||||
},
|
||||
//查看信息
|
||||
viewApp(e) {
|
||||
this.userList = e.users;
|
||||
this.viewInfo = e;
|
||||
this.viewShow = true;
|
||||
this.getRowInfo(this.viewInfo.appId, this.viewInfo.id);
|
||||
},
|
||||
//查询 row 信息
|
||||
getRowInfo(appId, id) {
|
||||
this.roleList = [];
|
||||
this.instance.post(`${this.actions.detail}?id=${appId}&roleId=${id}`)
|
||||
.then(res => {
|
||||
if (res?.data) {
|
||||
this.roleList = res.data.filter(e => e.checked)
|
||||
}
|
||||
})
|
||||
},
|
||||
//复制
|
||||
beforeCopy(row) {
|
||||
this.row = row;
|
||||
this.copyDialog = true;
|
||||
this.getRowInfo(this.row.appId, this.row.id);
|
||||
},
|
||||
//确认复制
|
||||
copyFn() {
|
||||
let crr = [];
|
||||
let appRoleList = this.roleList;
|
||||
for (let i = 0; i < appRoleList.length; i++) {
|
||||
if (appRoleList[i].checked) {
|
||||
crr.push(appRoleList[i].id);
|
||||
if (appRoleList[i].list.length) {
|
||||
for (let j = 0; j < appRoleList[i].list.length; j++) {
|
||||
if (appRoleList[i].list[j].checked) {
|
||||
crr.push(appRoleList[i].list[j].id);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
this.instance.post(`${this.actions.modify}?menus=${crr}`, null, {
|
||||
params: {
|
||||
roleName: this.editName,
|
||||
appId: this.row.appId,
|
||||
},
|
||||
})
|
||||
.then((res) => {
|
||||
if (res.code == 0) {
|
||||
this.$message({message: "复制成功", type: "success"});
|
||||
this.copyDialog = false;
|
||||
this.searchList()
|
||||
}
|
||||
});
|
||||
},
|
||||
dataInit() {
|
||||
this.multipleSelection = [];
|
||||
this.row = {};
|
||||
},
|
||||
openRightsGraph(row) {
|
||||
this.rightsGraph = true
|
||||
this.selectApp = row
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.AppRoleRightsManager {
|
||||
height: 100%;
|
||||
|
||||
|
||||
::v-deep .ai-dialog {
|
||||
.ai-card {
|
||||
box-shadow: none;
|
||||
border: 1px solid #eee;
|
||||
|
||||
.aibar {
|
||||
height: 40px;
|
||||
background: #f3f6f9;
|
||||
}
|
||||
|
||||
.ai-card__body {
|
||||
padding: 0 16px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
::v-deep .rightsGraphDialog {
|
||||
.el-dialog__body {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.ai-dialog__content {
|
||||
padding-bottom: 0;
|
||||
}
|
||||
}
|
||||
|
||||
::v-deep .datail-table-body {
|
||||
width: 100%;
|
||||
height: auto;
|
||||
margin-bottom: 16px;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
|
||||
.datail-item {
|
||||
flex-shrink: 0;
|
||||
width: 50%;
|
||||
height: 24px;
|
||||
line-height: 24px;
|
||||
|
||||
span {
|
||||
display: inline-block;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.item-name {
|
||||
width: 102px;
|
||||
padding-left: 16px;
|
||||
color: #333;
|
||||
}
|
||||
}
|
||||
|
||||
.datail-item:nth-of-type(2n - 1) {
|
||||
border-right: 1px solid rgba(208, 212, 220, 1);
|
||||
width: calc(50% - 1px);
|
||||
}
|
||||
}
|
||||
|
||||
.padd-l0 {
|
||||
padding-left: 0 !important;
|
||||
}
|
||||
|
||||
.pad-l16 {
|
||||
padding-left: 16px;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
</style>
|
||||
190
project/oms/apps/AppRoleRightsManager/rightsAdd.vue
Normal file
190
project/oms/apps/AppRoleRightsManager/rightsAdd.vue
Normal file
@@ -0,0 +1,190 @@
|
||||
<template>
|
||||
<ai-detail class="rightsAdd">
|
||||
<ai-title :title="addTitle" slot="title" isShowBottomBorder isShowBack @onBackClick="back"/>
|
||||
<template #content>
|
||||
<el-form size="small" ref="rightsForm" :model="form" label-width="120px" :rules="rules">
|
||||
<ai-card title="基本信息">
|
||||
<template #content>
|
||||
<el-form-item label="应用角色名称" prop="roleName">
|
||||
<el-input v-model="form.roleName" placeholder="请输入应用角色名称" clearable/>
|
||||
</el-form-item>
|
||||
</template>
|
||||
</ai-card>
|
||||
<ai-card title="权限信息">
|
||||
<template #content>
|
||||
<el-form-item label="权限列表" prop="menus">
|
||||
<div class="roleList">
|
||||
<el-input v-model="filterText" placeholder="请输入..." clearable suffix-icon="iconfont iconSearch"
|
||||
@change="$refs.tree.filter(filterText)" :validate-event="false"/>
|
||||
<div class="tree_list">
|
||||
<el-tree class="filter-tree" ref="roleTree"
|
||||
:data="roleList"
|
||||
show-checkbox
|
||||
:props="defaultProps"
|
||||
default-expand-all
|
||||
:check-strictly="false"
|
||||
node-key="id"
|
||||
:default-checked-keys="form.menus"
|
||||
:filter-node-method="filterNode"
|
||||
@check="handleMenusSelect"/>
|
||||
</div>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</template>
|
||||
</ai-card>
|
||||
</el-form>
|
||||
</template>
|
||||
<template #footer>
|
||||
<el-button @click="back()">取消</el-button>
|
||||
<el-button type="primary" @click="confirm">保存</el-button>
|
||||
</template>
|
||||
</ai-detail>
|
||||
</template>
|
||||
<script>
|
||||
|
||||
export default {
|
||||
name: "rightsAdd",
|
||||
inject: ['top'],
|
||||
props: {
|
||||
instance: Function,
|
||||
dict: Object,
|
||||
permissions: Function
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
form: {},
|
||||
roleName: '',
|
||||
id: '',
|
||||
appList: [],
|
||||
roleList: [],
|
||||
defaultProps: {
|
||||
children: 'list',
|
||||
label: 'name'
|
||||
},
|
||||
treeList: [],
|
||||
filterText: '',
|
||||
msgTitle: '添加'
|
||||
}
|
||||
},
|
||||
created() {
|
||||
if (this.isEdit) {
|
||||
let {id, name: roleName} = this.$route.query
|
||||
this.form = {menus: [], id, roleName}
|
||||
this.msgTitle = '编辑'
|
||||
}
|
||||
this.getPermissions()
|
||||
},
|
||||
computed: {
|
||||
isEdit() {
|
||||
return this.$route.query.id
|
||||
},
|
||||
addTitle() {
|
||||
return this.isEdit ? '编辑应用角色' : '新增应用角色'
|
||||
},
|
||||
rules() {
|
||||
return {
|
||||
roleName: {required: true, message: '请输入应用角色名称'},
|
||||
menus: {required: true, message: '请选择权限列表内容'},
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
filterNode(value, data) {
|
||||
if (!value) return true;
|
||||
return data.name.indexOf(value) !== -1;
|
||||
},
|
||||
//应用名称选择 获取权限列表
|
||||
getId(data) {
|
||||
if (data.list.length) {
|
||||
data.list.forEach(item => {
|
||||
this.getId(item)
|
||||
})
|
||||
} else {
|
||||
if (data.checked) {
|
||||
this.form.menus?.push(data.id)
|
||||
}
|
||||
}
|
||||
},
|
||||
getPermissions() {
|
||||
this.filterText = ''
|
||||
let {id: roleId} = this.form
|
||||
this.instance.post(this.top.actions.detail, null, {
|
||||
params: {roleId}
|
||||
}).then(res => {
|
||||
if (res?.data) {
|
||||
this.roleList = res.data;
|
||||
if (this.isEdit) {
|
||||
this.roleList.forEach(e => this.getId(e))
|
||||
}
|
||||
this.roleList = this.roleList.filter(item => !(item.component && item.isApp == 0 && item.isMenu == 0))
|
||||
}
|
||||
})
|
||||
},
|
||||
handleMenusSelect(node, selected) {
|
||||
this.$set(this.form, 'menus', [...selected?.checkedKeys])
|
||||
this.$refs.rightsForm.validateField('menus')
|
||||
},
|
||||
//保存提交
|
||||
confirm() {
|
||||
this.$refs.rightsForm.validate(v => {
|
||||
if (v) {
|
||||
let menus = [this.$refs.roleTree?.getHalfCheckedKeys(), this.$refs.roleTree?.getCheckedKeys()]?.flat()?.toString()
|
||||
this.instance.post(this.top.actions.modify, null, {
|
||||
params: {...this.form, menus}
|
||||
}).then(res => {
|
||||
if (res?.msg == "success") {
|
||||
this.$message.success(`${this.msgTitle}应用角色成功`)
|
||||
this.back()
|
||||
this.top.searchList()
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
//取消 返回
|
||||
back() {
|
||||
this.$router.push({})
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.rightsAdd {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
position: relative;
|
||||
|
||||
.el-form-item {
|
||||
.el-select {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
&.is-error {
|
||||
.roleList {
|
||||
border-color: #f46;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.roleList {
|
||||
background-color: #fcfcfc;
|
||||
border-radius: 2px;
|
||||
border: solid 1px #d0d4dc;
|
||||
padding: 8px;
|
||||
|
||||
.input {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
padding: 5px;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.tree_list {
|
||||
padding: 5px;
|
||||
height: 370px;
|
||||
overflow: auto;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
</style>
|
||||
192
project/oms/apps/AppRoleRightsManager/rightsGraph.vue
Normal file
192
project/oms/apps/AppRoleRightsManager/rightsGraph.vue
Normal file
@@ -0,0 +1,192 @@
|
||||
<template>
|
||||
<section class="rightsGraph">
|
||||
<div id="RightGraph"/>
|
||||
</section>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import * as echarts from "echarts";
|
||||
|
||||
export default {
|
||||
name: "rightsGraph",
|
||||
inject: ['top'],
|
||||
props: {
|
||||
instance: Function,
|
||||
dict: Object,
|
||||
app: Object
|
||||
},
|
||||
computed: {
|
||||
graphData() {
|
||||
let data = [...this.users, ...this.nodes].map(e => {
|
||||
if (e.x) {
|
||||
return e
|
||||
} else return {...e, ...this.renderPosition(e)}
|
||||
})
|
||||
return [
|
||||
{
|
||||
data,
|
||||
links: this.links,
|
||||
categories: data.map(e => e.category).flat().map(name => ({name}))
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
graph: null,
|
||||
nodes: [],
|
||||
links: [],
|
||||
users: []
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
graphData: {
|
||||
deep: true, handler() {
|
||||
this.refreshGraph()
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
initGraph() {
|
||||
let dom = document.querySelector("#RightGraph")
|
||||
if (dom) {
|
||||
this.graph = echarts.init(dom)
|
||||
this.graph.setOption({
|
||||
tooltip: {},
|
||||
series: [
|
||||
{
|
||||
type: 'graph',
|
||||
layout: 'none',
|
||||
roam: true,
|
||||
label: {
|
||||
show: true,
|
||||
position: 'right',
|
||||
formatter: '{b}'
|
||||
},
|
||||
labelLayout: {
|
||||
hideOverlap: true,
|
||||
},
|
||||
scaleLimit: {
|
||||
min: 0.4,
|
||||
max: 4
|
||||
},
|
||||
lineStyle: {
|
||||
color: 'target',
|
||||
curveness: 0.1
|
||||
},
|
||||
emphasis: {
|
||||
focus: 'adjacency',
|
||||
lineStyle: {
|
||||
width: 5
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
})
|
||||
this.graph.on('click', this.handleNodeClick)
|
||||
}
|
||||
},
|
||||
refreshGraph() {
|
||||
this.graph?.setOption({
|
||||
series: this.graphData
|
||||
})
|
||||
},
|
||||
getAppRoles(role) {
|
||||
if (role) {
|
||||
this.nodes.push({...role, category: '应用角色', value: "应用角色", symbolSize: 15})
|
||||
} else this.instance.post(this.top.actions.list, null, {
|
||||
params: {pageSize: 999}
|
||||
}).then(res => {
|
||||
if (res?.data) {
|
||||
res.data.records.map(e => {
|
||||
this.getUsers(e.users, e.id)
|
||||
this.nodes.push({...e, category: '应用角色', value: "应用角色"})
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
getUsers(pending, source) {
|
||||
pending?.map(e => {
|
||||
if (!this.users.some(u => u.id == e.phone)) {
|
||||
this.users.push({id: e.phone, name: e.name, symbolSize: 5, category: '用户', value: "用户"})
|
||||
}
|
||||
this.links.push({source, target: e.phone})
|
||||
})
|
||||
},
|
||||
getPermissions({id: roleId, name: category, dataIndex}) {
|
||||
const addNodes = (list, source, category, pos) => {
|
||||
list?.map(e => {
|
||||
let node = {
|
||||
...e,
|
||||
symbolSize: 5,
|
||||
category,
|
||||
value: e.list?.length > 0 ? "应用" : "权限",
|
||||
}
|
||||
node = {...node, ...this.renderPosition(pos || node)}
|
||||
this.nodes.splice(dataIndex, 0, node)
|
||||
if (e.checked == 1) {
|
||||
this.links.push({source, target: e.id})
|
||||
}
|
||||
addNodes(e.list, e.id, e.label, node)
|
||||
})
|
||||
}
|
||||
roleId && this.instance.post(this.top.actions.detail, null, {
|
||||
params: {roleId}
|
||||
}).then(res => {
|
||||
if (res?.data) {
|
||||
addNodes(res.data, roleId, category)
|
||||
}
|
||||
})
|
||||
},
|
||||
handleNodeClick(v) {
|
||||
let {data: role, dataIndex} = v
|
||||
if (!this.nodes.some(e => e.category == role?.name)) {
|
||||
role && this.getPermissions({...role, dataIndex})
|
||||
}
|
||||
},
|
||||
renderPosition(node) {
|
||||
node = JSON.parse(JSON.stringify(node))
|
||||
let pos = {x: 0, y: 0}
|
||||
if (node?.x) {
|
||||
pos.x = Math.max(this.graph?.getWidth() / 3 * 2, node.x) + 100 + Math.random() * 50
|
||||
pos.y = node.y + Math.random() * 100 - 50
|
||||
} else if (node.value == '应用角色') {
|
||||
pos.x = this.graph?.getWidth() / 3 - 200 + Math.random() * 200
|
||||
pos.y = this.graph?.getHeight() / 2 - 100 + Math.random() * 200
|
||||
} else if (node.value == '应用') {
|
||||
pos.x = this.graph?.getWidth() / 3 * 2 - 100 + Math.random() * 100
|
||||
pos.y = Math.random() * this.graph?.getHeight()
|
||||
} else if (node.value == '用户') {
|
||||
pos.x = Math.random() * 50
|
||||
pos.y = Math.random() * this.graph?.getHeight()
|
||||
} else {
|
||||
pos.x = this.graph?.getWidth() - 100 + Math.random() * 100
|
||||
pos.y = Math.random() * this.graph?.getHeight()
|
||||
}
|
||||
return pos
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getAppRoles(this.app)
|
||||
this.getUsers(this.app.users, this.app.id)
|
||||
this.getPermissions(this.app)
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.initGraph()
|
||||
})
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.rightsGraph {
|
||||
height: 100%;
|
||||
|
||||
::v-deep #RightGraph {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
min-height: 500px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
197
project/oms/apps/AppSaas/AppSaas.vue
Normal file
197
project/oms/apps/AppSaas/AppSaas.vue
Normal file
@@ -0,0 +1,197 @@
|
||||
<template>
|
||||
<section class="AppSaas">
|
||||
<ai-list>
|
||||
<ai-title slot="title" title="平台配置" isShowBottomBorder/>
|
||||
<template #content>
|
||||
<ai-search-bar>
|
||||
<template #left>
|
||||
<el-button type="primary" icon="iconfont iconAdd" @click="dialogForm = {}, dialog=true">添加</el-button>
|
||||
</template>
|
||||
<template #right>
|
||||
<el-input size="small" placeholder="搜索名称" v-model="search.condition" clearable
|
||||
@change="page.current=1,getTableData()"/>
|
||||
</template>
|
||||
</ai-search-bar>
|
||||
<ai-table :tableData="tableData" :total="page.total" :current.sync="page.current" :size.sync="page.size"
|
||||
@getList="getTableData" :col-configs="colConfigs" :dict="dict"
|
||||
@selection-change="v=>ids=v.filter(e=>e.id).map(e=>e.id)">
|
||||
<el-table-column slot="options" align="center" label="操作" fixed="right" width="240px">
|
||||
<el-row type="flex" justify="center" align="middle" slot-scope="{row}">
|
||||
<el-button type="text" @click="handleEnter(row.accessUrl)">打开</el-button>
|
||||
<el-button type="text" @click="handleUpdate(row)">修改</el-button>
|
||||
<el-button type="text" @click="handleUpdatePwd(row)">修改密码</el-button>
|
||||
<el-button type="text" @click="handleDelete(row.id)">删除</el-button>
|
||||
</el-row>
|
||||
</el-table-column>
|
||||
</ai-table>
|
||||
</template>
|
||||
</ai-list>
|
||||
<!--添加SAAS平台-->
|
||||
<ai-dialog :title="dialogTitle" :visible.sync="dialog" width="600px"
|
||||
@onConfirm="saveSaas">
|
||||
<el-form ref="saasForm" :model="dialogForm" :rules="rules" size="small"
|
||||
label-width="120px">
|
||||
<el-form-item required label="名称" prop="name">
|
||||
<el-input v-model.trim="dialogForm.name" placeholder="请输入SaaS平台名称" clearable
|
||||
:maxLength="50"/>
|
||||
</el-form-item>
|
||||
<el-form-item required label="账号" prop="username">
|
||||
<el-input v-model.trim="dialogForm.username" placeholder="请输入平台账号" clearable
|
||||
:maxLength="50"/>
|
||||
</el-form-item>
|
||||
<el-form-item required label="密码" prop="password" v-if="!isEdit" :rules="[{required: true, message: '请输入平台密码'}]">
|
||||
<el-input v-model.trim="dialogForm.password" placeholder="请输入平台密码" clearable
|
||||
:maxLength="100"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="访问地址" prop="accessUrl">
|
||||
<el-input v-model.trim="dialogForm.accessUrl" placeholder="请输入访问地址" clearable
|
||||
:maxLength="255"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</ai-dialog>
|
||||
<!--修改密码-->
|
||||
<ai-dialog title="修改密码" :visible.sync="updateDialog" width="600px"
|
||||
@onConfirm="updatePwd">
|
||||
<el-form ref="updatePwdForm" :model="updatePwdForm" :rules="updateRules" size="small"
|
||||
label-width="120px">
|
||||
<el-form-item required label="密码" prop="password">
|
||||
<el-input v-model.trim="updatePwdForm.password" placeholder="请输入平台密码" clearable
|
||||
:maxLength="100"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</ai-dialog>
|
||||
</section>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
export default {
|
||||
name: "AppSaas",
|
||||
label: "Saas平台管理",
|
||||
props: {
|
||||
instance: Function,
|
||||
dict: Object,
|
||||
permissions: Function
|
||||
},
|
||||
computed: {
|
||||
isEdit() {
|
||||
return !!this.dialogForm.id
|
||||
},
|
||||
dialogTitle() {
|
||||
return this.isEdit ? '修改SaaS平台' : '添加SaaS平台'
|
||||
},
|
||||
colConfigs() {
|
||||
return [
|
||||
{label: "名称", prop: "name"},
|
||||
{label: "账号", prop: "username", align: 'center'},
|
||||
{label: "访问地址", prop: "accessUrl"},
|
||||
{label: "创建时间", prop: "createTime"},
|
||||
{slot: "options"}
|
||||
]
|
||||
},
|
||||
rules() {
|
||||
return {
|
||||
name: [{required: true, message: "请输入SaaS平台名称"}],
|
||||
username: [{required: true, message: "请输入平台账号"}],
|
||||
accessUrl: [{required: true, message: "请输入访问地址"}]
|
||||
}
|
||||
},
|
||||
updateRules() {
|
||||
return {
|
||||
password: [{required: true, message: "请输入平台密码"}]
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
page: {current: 1, size: 10, total: 0},
|
||||
dialog: false,
|
||||
updateDialog: false,
|
||||
dialogForm: {},
|
||||
updatePwdForm: {password: ''},
|
||||
tableData: [],
|
||||
search: {condition: ""},
|
||||
ids: [],
|
||||
currentSaas: ''
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getTableData() {
|
||||
this.instance.post("/appSaas/page", null, {
|
||||
params: {...this.page, ...this.search}
|
||||
}).then(res => {
|
||||
if (res?.data) {
|
||||
this.tableData = res.data?.records
|
||||
this.page.total = res.data.total
|
||||
}
|
||||
})
|
||||
},
|
||||
// 新增/修改
|
||||
saveSaas() {
|
||||
this.$refs.saasForm.validate(v => {
|
||||
if (v) {
|
||||
this.instance.post("/appSaas/addOrUpdate", this.dialogForm).then(res => {
|
||||
if (res?.code == 0) {
|
||||
this.dialog = false;
|
||||
this.$message.success("保存成功")
|
||||
this.getTableData();
|
||||
} else {
|
||||
this.$message.error(res?.msg)
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
// 新增/修改
|
||||
updatePwd() {
|
||||
this.$refs.updatePwdForm.validate(v => {
|
||||
if (v) {
|
||||
this.updatePwdForm.id = this.currentSaas.id
|
||||
this.instance.post("/appSaas/updatePwd", null, {params: this.updatePwdForm}).then(res => {
|
||||
if (res?.code == 0) {
|
||||
this.updateDialog = false;
|
||||
this.$message.success("密码修改成功")
|
||||
} else {
|
||||
this.$message.error(res?.msg)
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
handleUpdatePwd(row) {
|
||||
this.currentSaas = row
|
||||
this.updatePwdForm.password = ''
|
||||
this.updateDialog = true
|
||||
},
|
||||
handleUpdate(row) {
|
||||
this.dialogForm = row
|
||||
this.dialog = true
|
||||
},
|
||||
handleDelete(ids) {
|
||||
this.$confirm("是否要删除该Saas信息?").then(() => {
|
||||
this.instance.post("/appSaas/delete", null, {
|
||||
params: {ids}
|
||||
}).then(res => {
|
||||
if (res?.code == 0) {
|
||||
this.getTableData();
|
||||
this.$message.success("删除成功!");
|
||||
}
|
||||
})
|
||||
}).catch(() => 0)
|
||||
},
|
||||
handleEnter(accessUrl) {
|
||||
window.open(accessUrl, "_blank");
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getTableData()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.AppSaas {
|
||||
height: 100%;
|
||||
|
||||
}
|
||||
</style>
|
||||
8
project/oms/core.import.json
Normal file
8
project/oms/core.import.json
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"AppDictionary": "数据字典",
|
||||
"AppRightsManager": "权限管理",
|
||||
"AppMenuManager": "菜单管理",
|
||||
"AppSystemAccount": "账号管理",
|
||||
"AppQyWxConfig": "企业微信配置",
|
||||
"AppUserInfo": "个人中心"
|
||||
}
|
||||
15
project/oms/package.json
Normal file
15
project/oms/package.json
Normal file
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"name": "dvcp-oms",
|
||||
"description": "运营中心分包",
|
||||
"version": "2.0.0",
|
||||
"main": "dist/dvcp-oms.common.js",
|
||||
"files": [
|
||||
"dist"
|
||||
],
|
||||
"publishConfig": {
|
||||
"registry": "http://192.168.1.87:4873/"
|
||||
},
|
||||
"dependencies": {
|
||||
"dvcp-ui": "^1.42.2"
|
||||
}
|
||||
}
|
||||
@@ -71,15 +71,12 @@ module.exports = {
|
||||
'^/lan': '/'
|
||||
}
|
||||
},
|
||||
'/oms': {
|
||||
'/omsapi': {
|
||||
target: 'http://192.168.1.87:19898',
|
||||
changeOrigin: true,
|
||||
pathRewrite: {
|
||||
//地址重写
|
||||
'^/oms/app/': '/',
|
||||
'^/oms/auth/': '/',
|
||||
'^/oms/admin/': '/',
|
||||
'^/oms': '/'
|
||||
'^/omsapi': '/'
|
||||
}
|
||||
},
|
||||
'/xsjr': {
|
||||
|
||||
Reference in New Issue
Block a user