mk 5 months ago
parent
commit
f7b159fb16
  1. 3
      epmet-oper-web/.env.development
  2. 16
      epmet-oper-web/src/js/columns/miniPro/partnerApp.js
  3. 3
      epmet-oper-web/src/utils/loadTinymce.js
  4. 42
      epmet-oper-web/src/views/modules/customer/customize/menu-customer-add-or-update.vue
  5. 34
      epmet-oper-web/src/views/modules/customer/customize/menuCustomer.vue
  6. 70
      epmet-oper-web/src/views/modules/customer/manage/customer-add-or-update.vue
  7. 2
      epmet-oper-web/src/views/modules/dyform/formList.vue
  8. 156
      epmet-oper-web/src/views/modules/partner/app/index.vue
  9. 275
      epmet-oper-web/src/views/modules/sys/upgrade-version-history.vue

3
epmet-oper-web/.env.development

@ -1,8 +1,9 @@
NODE_ENV=development
# VUE_APP_API_SERVER = http://118.190.150.119:41080/api
# VUE_APP_API_SERVER = http://192.168.1.144/api
VUE_APP_API_SERVER = http://192.168.1.144/api
# VUE_APP_API_SERVER = http://192.168.51.36:8080/api
# VUE_APP_API_SERVER = https://epmet-dev.elinkservice.cn/api
VUE_APP_NODE_ENV=dev
#项目根路径
VUE_APP_PUBLIC_PATH=epmet-oper

16
epmet-oper-web/src/js/columns/miniPro/partnerApp.js

@ -38,12 +38,12 @@ export default [{
block: true,
width: 40
},
{
key: 'secret',
title: '秘钥',
display: ['formA', 'formU', 'table', 'model'],
fixed: false,
block: true,
width: 200
},
// {
// key: 'secret',
// title: '秘钥',
// display: ['formA', 'formU', 'table', 'model'],
// fixed: false,
// block: true,
// width: 200
// },
]

3
epmet-oper-web/src/utils/loadTinymce.js

@ -17,7 +17,8 @@ export default function loadTinymce(cb) {
background: 'rgba(255, 255, 255, 0.5)'
})
loadScript('https://lib.baomitu.com/tinymce/latest/tinymce.min.js', () => {
// loadScript('https://lib.baomitu.com/tinymce/latest/tinymce.min.js', () => {
loadScript('http://lib.baomitu.com/tinymce/4.9.2/tinymce.min.js', () => {
loading.close()
// eslint-disable-next-line no-undef
tinymceObj = tinymce

42
epmet-oper-web/src/views/modules/customer/customize/menu-customer-add-or-update.vue

@ -49,10 +49,10 @@ export default {
iconList: [],
iconListVisible: false,
dataForm: {
id: '',
id: '', // id
type: 0,
name: '',
pid: '0',
pid: '0', // pid
customerId:'',
parentName: '',
url: '',
@ -91,16 +91,38 @@ export default {
},
//
getInfo () {
this.$http.get(`/gov/access/govMenuCustomerRelation/${this.dataForm.id}`).then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
async getInfo () {
let {data: epmetRelationResult} = await this.$http.get(`/gov/access/govMenuCustomerRelation/getCustomizedMenuInfo?menuId=${this.dataForm.id}&customerId=${this.dataForm.customerId}`)
if (epmetRelationResult.code !== 0) {
this.$message.error("网络错误")
return
}
this.dataForm = {
...this.dataForm,
...res.data
if (epmetRelationResult.data !== null) {
//
this.dataForm.type = epmetRelationResult.data.type
this.dataForm.name = epmetRelationResult.data.name
this.dataForm.pid = epmetRelationResult.data.pid
this.dataForm.parentName = epmetRelationResult.data.parentName
this.dataForm.url = epmetRelationResult.data.url
this.dataForm.useFlag = epmetRelationResult.data.useFlag
this.dataForm.sort = epmetRelationResult.data.sort
this.dataForm.icon = epmetRelationResult.data.icon
} else {
//
let { data: epmeMenuResult } = await this.$http.get(`/gov/access/menu/${this.dataForm.id}`)
this.dataForm.type = epmeMenuResult.data.type
this.dataForm.name = epmeMenuResult.data.name
this.dataForm.pid = epmeMenuResult.data.pid
this.dataForm.parentName = epmeMenuResult.data.parentName
this.dataForm.url = epmeMenuResult.data.url
this.dataForm.useFlag = 1
this.dataForm.sort = epmeMenuResult.data.sort
this.dataForm.icon = epmeMenuResult.data.icon
}
}).catch(() => {})
},
// ,
iconListCurrentChangeHandle (icon) {

34
epmet-oper-web/src/views/modules/customer/customize/menuCustomer.vue

@ -33,6 +33,7 @@
<el-table-column label="序号" fixed="left" type="index" align="center" width="50" />
<el-table-column prop="name" :label="$t('menu.name')" header-align="center" min-width="150"></el-table-column>
<el-table-column prop="originName" label="原名" header-align="center" min-width="150"></el-table-column>
<el-table-column prop="icon" :label="$t('menu.icon')" header-align="center" align="center">
<template slot-scope="scope">
<svg class="icon-svg" aria-hidden="true"><use :xlink:href="`#${scope.row.icon}`"></use></svg>
@ -49,7 +50,7 @@
<el-table-column :label="$t('handle')" fixed="right" header-align="center" align="center" width="150">
<template slot-scope="scope">
<el-button type="text" size="small" @click="addOrUpdateHandle(scope.row.id)">{{ $t('update') }}</el-button>
<el-button type="text" size="small" @click="onAddOrUpdateClick(scope.row.id)">{{ $t('update') }}</el-button>
<el-button type="text" size="small" v-if="scope.row.useFlag == '0'" @click="open(scope.row.id)">{{ '开启' }}</el-button>
<el-button type="text" size="small" v-if="scope.row.useFlag == '1'" @click="close(scope.row.id)">{{ '关闭' }}</el-button>
</template>
@ -298,13 +299,13 @@ export default {
});
},
open(id) {
open(menuId) {
let menuIds = [];
this.multipleSelection = [];
this.getData(this.dataList);
if (id != '') {
menuIds = [id];
if (menuId != '') {
menuIds = [menuId];
} else {
if (this.multipleSelection.length > 0) {
menuIds = this.multipleSelection;
@ -314,8 +315,9 @@ export default {
}
let params = {
ids: menuIds,
use: '1'
menuIds: menuIds,
use: '1',
customerId: this.customerId
};
this.$http.post('/gov/access/govMenuCustomerRelation/useUpdate/', params).then(({ data: res }) => {
console.log(res);
@ -325,13 +327,13 @@ export default {
}
});
},
close(id) {
close(menuId) {
let menuIds = [];
this.multipleSelection = [];
this.getData(this.dataList);
if (id != '') {
menuIds = [id];
if (menuId != '') {
menuIds = [menuId];
} else {
if (this.multipleSelection.length > 0) {
menuIds = this.multipleSelection;
@ -340,8 +342,9 @@ export default {
}
}
let params = {
ids: menuIds,
use: '0'
menuIds: menuIds,
use: '0',
customerId: this.customerId
};
this.$http.post('/gov/access/govMenuCustomerRelation/useUpdate/', params).then(({ data: res }) => {
console.log(res);
@ -407,6 +410,15 @@ export default {
//
diaCancel() {
this.$emit('cancleBack');
},
onAddOrUpdateClick(menuId) {
this.addOrUpdateVisible = true
this.$nextTick(() => {
this.$refs.addOrUpdate.dataForm.customerId = this.customerId
this.$refs.addOrUpdate.dataForm.id = menuId
this.$refs.addOrUpdate.init()
})
}
}
};

70
epmet-oper-web/src/views/modules/customer/manage/customer-add-or-update.vue

@ -110,13 +110,19 @@
<el-form-item label="联系方式" prop="paUser.phone">
<el-input
v-model="dataForm.paUser.phone"
placeholder="联系方式"
placeholder="超级管理员联系方式"
></el-input>
</el-form-item>
<el-form-item label="证件号" prop="paUser.idCard">
<el-form-item label="超级管理员证件号" prop="paUser.idCard">
<el-input
v-model="dataForm.paUser.idCard"
placeholder="证件号"
placeholder="超级管理员证件号"
></el-input>
</el-form-item>
<el-form-item label="电子门牌uri前缀" prop="houseQrcodePre">
<el-input
v-model="dataForm.houseQrcodePre"
placeholder="电子门牌uri前缀"
></el-input>
</el-form-item>
</el-form>
@ -142,6 +148,7 @@ export default {
visible: false,
dataForm: {
id: "",
houseQrcodePre: "",
paAgency: {
logo: "",
agencyName: "",
@ -192,19 +199,10 @@ export default {
],
functionList: [],
};
},
components: {
CForm,
CDialog,
},
created() {
this.queryFunctionList();
},
computed: {
dataRule() {
return {
logo: [
//
dataRule: {
"logo": [
{
required: false,
message: this.$t("validate.required"),
@ -215,14 +213,14 @@ export default {
{
required: true,
message: "客户名称必填",
trigger: "blue",
trigger: "blur",
},
],
"paAgency.agencyName": [
{
required: true,
message: '根级组织名称必填',
trigger: 'blue'
trigger: 'blur'
}
],
"paAgency.level": [
@ -236,46 +234,63 @@ export default {
{
required: true,
message: '组织地区码必填',
trigger: 'blue'
trigger: 'blur'
}
],
"paAgency.province": [
{
required: true,
message: '组织省份必填',
trigger: 'blue'
trigger: 'blur'
}
],
"paUser.realName": [
{
required: true,
message: '管理员姓名必填',
trigger: 'blue'
trigger: 'blur'
}
],
"paUser.phone": [
{
required: true,
message: '管理员电话必填',
trigger: 'blue'
trigger: 'blur'
}
],
"paUser.idCard": [
{
required: true,
message: '管理员证件号必填',
trigger: 'blue'
trigger: 'blur'
}
],
"paAgency.validityTime": [
{
required: true,
message: '必填',
trigger: 'change'
message: '有效期必填',
trigger: 'blur'
}
],
"houseQrcodePre": [
{
required: true,
message: '二维码uri前缀必填',
trigger: 'blur'
}
]
}
};
},
components: {
CForm,
CDialog,
},
created() {
// this.queryFunctionList();
},
computed: {
},
methods: {
// logo
@ -319,11 +334,6 @@ export default {
return false;
}
if (true) {
this.$message.info("成功");
return;
}
console.log(this.dataForm);
this.$http["post"]("/oper/crm/customer/initLocally", this.dataForm)
.then(({ data: res }) => {

2
epmet-oper-web/src/views/modules/dyform/formList.vue

@ -137,7 +137,7 @@ export default {
} else {
this.$message({
type: 'error',
nessage: res.msg
message: res.msg
})
}

156
epmet-oper-web/src/views/modules/partner/app/index.vue

@ -51,14 +51,41 @@
:operationWidth="80"
:operations="operations"
@editShow="editShow"
@copySecret="copySecret"
@resetSecret="resetSecret"
@showSecrets="showSecrets"
@del="del">
</c-table>
</el-card>
<edit ref="edit"
@editDiaOK="editDiaOK"></edit>
<!--密钥查看-->
<el-dialog
title="密钥查看"
:visible.sync="isShowSecretsDlgShow"
width="30%">
<el-form :model="dataForm"
@keyup.enter.native="loadData()">
<el-form-item label="对称加密密钥">
<el-input
type="textarea"
:rows="2"
placeholder="请输入内容"
v-model="secrets.symSecret" readonly>
</el-input>
<el-button @click="resetSymSecret">重置</el-button>
</el-form-item>
<el-form-item label="非对称加密密钥">
<el-input
type="textarea"
:rows="5"
placeholder="请输入内容"
v-model="secrets.asymSecretPublic" readonly>
</el-input>
<el-button @click="resetAsymSecret">重置</el-button>
</el-form-item>
</el-form>
</el-dialog>
</div>
</template>
@ -78,6 +105,7 @@ import { requestPost } from "@/js/dai/request";
import { envIsDev, mockUrlPrefix } from "@/js/dai/config";
import { Loading } from "element-ui";
import nextTick from "dai-js/tools/nextTick";
import params from "@/views/modules/sys/params.vue";
//
const isMockEnv = envIsDev && false;
@ -89,11 +117,19 @@ export default {
data () {
return {
// appId
currAppId: null,
//
isShowSecretsDlgShow: false,
secrets: {
symSecret: null,
asymSecretPublic: null
},
tableUrl: requestUrlPrefix + "/commonservice/externalapp/list",
//
tableParams: {
customerId: "",
customerType: "internal",
customerType: "external",
},
operations: [
@ -110,30 +146,42 @@ export default {
},
},
{
lable: "复制秘钥", //
lable: "查看秘钥", //
size: "mini",
style: "margin: 0 6px;",
type: "text",
slot: "",
plain: false,
methodName: "copySecret", //
isShow: (row) => {
return true;
},
},
{
lable: "重置秘钥", //
size: "mini",
style: "margin: 0 6px;",
type: "text",
slot: "",
plain: false,
methodName: "resetSecret", //
methodName: "showSecrets", //
isShow: (row) => {
return true;
},
},
// {
// lable: "", //
// size: "mini",
// style: "margin: 0 6px;",
// type: "text",
// slot: "",
// plain: false,
// methodName: "copySecret", //
// isShow: (row) => {
// return true;
// },
// },
// {
// lable: "", //
// size: "mini",
// style: "margin: 0 6px;",
// type: "text",
// slot: "",
// plain: false,
// methodName: "resetSecret", //
// isShow: (row) => {
// return true;
// },
// },
// {
// lable: "", //
// size: "mini",
// style: "margin: 0 6px;",
@ -280,6 +328,80 @@ export default {
editDiaOK () {
this.refresh();
},
/**
* 显示密钥
*/
showSecrets(row) {
//
this.currAppId = row.appId
let url = `/commonservice/externalapp/getSecrets`;
let params = {
appId: row.appId
}
window.app.ajax.get(
url,
params,
(data, msg) => {
this.secrets.symSecret = data.symSecret
this.secrets.asymSecretPublic = data.asymSecretPublic
},
(data, msg) => {
})
this.isShowSecretsDlgShow = true
},
/**
* 重置对称加密密钥
*/
resetSymSecret() {
this.$confirm('确认重置?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
let url = "/commonservice/externalapp/resetSymSecret";
let params = {
appId: this.currAppId
}
window.app.ajax.post(url, params,
(data, msg) => {
this.$message.success('重置成功')
this.secrets.symSecret = data;
},
(msg, data) => {
this.$message.info('重置失败')
})
})
},
/**
* 重置非对称加密密钥
*/
resetAsymSecret() {
this.$confirm('确认重置?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
let url = "/commonservice/externalapp/resetAsymSecrets";
let params = {
appId: this.currAppId
}
window.app.ajax.post(url, params,
(data, msg) => {
this.$message.success('重置成功')
this.secrets.asymSecretPublic = data.publicKey;
},
(msg, data) => {
this.$message.info('重置失败')
})
})
}
},
};
</script>

275
epmet-oper-web/src/views/modules/sys/upgrade-version-history.vue

@ -0,0 +1,275 @@
<template>
<div>
<el-card shadow="never" class="aui-card--fill">
<!-- 按钮 -->
<div class="btn-group">
<el-button type="primary" @click="onAddBtnClick">新增</el-button>
<el-button type="primary" @click="onEditBtnClick">修改</el-button>
</div>
<!-- 数据列表 -->
<div>
<el-table :data="histories" border style="width: 100%">
<el-table-column prop="versionNo" label="版本">
</el-table-column>
<el-table-column label="操作" :width="80">
<template slot-scope="scope">
<el-button type="primary" size="small" @click="onEditBtnClick(scope.row.id)">编辑</el-button>
</template>
</el-table-column>
</el-table>
</div>
<!-- 分页条-->
<el-pagination background layout="prev, pager, next" @current-change="onCurrentPageChanged"
:current-page="this.pageArgs.pageNo" :page-size="this.pageArgs.pageSize" :total="this.pageArgs.total">
</el-pagination>
<!-- <Tinymce
v-model="createOrUpdateForm.richContent"
:width="450"
:height="500"
/>-->
</el-card>
<!-- 新增/修改 -->
<el-dialog :visible.sync="publishVersionUpgradeShow" v-if="publishVersionUpgradeShow" :close-on-click-modal="false"
:close-on-press-escape="false" :title="this.operation === 'create' ? '发布新版本' : '修改'">
<el-form :model="createOrUpdateForm" ref="createOrUpdateForm">
<el-form-item prop="versionNo" label="版本">
<el-input v-model="createOrUpdateForm.versionNo">
</el-input>
</el-form-item>
<el-form-item prop="richContent" label="内容">
<!-- <el-input v-model="createOrUpdateForm.richContent"> -->
<!-- <Tinymce v-model="createOrUpdateForm.richContent" :height="300" placeholder="在这里输入文字" /> -->
<!-- :customerId="customerId" -->
<div id="J_quillEditor"></div>
<!-- 自定义上传图片功能 (使用element upload组件) -->
<el-upload :headers="$getElUploadHeaders()" :action="uploadUrl" :show-file-list="false"
:before-upload="uploadBeforeUploadHandle" :on-success="uploadSuccessHandle" style="display: none">
<el-button ref="uploadBtn" type="primary" size="small">{{
$t('upload.button')
}}</el-button>
</el-upload>
<!-- </el-input> -->
</el-form-item>
<el-button @click="onSubmitBtnClick" type="primary">提交</el-button>
<el-button @click="onCancelBtnClick" type="primary">取消</el-button>
</el-form>
</el-dialog>
</div>
</template>
<script>
import Cookies from 'js-cookie'
import 'quill/dist/quill.snow.css'
import Quill from 'quill'
export default {
components: {},
activated () {
this.loadVersionUpgradeHistories();
},
mounted () {
},
data () {
return {
quillEditor: null,
quillEditorToolbarOptions: [
['bold', 'italic', 'underline', 'strike'],
['blockquote', 'code-block', 'image'],
[{ header: 1 }, { header: 2 }],
[{ list: 'ordered' }, { list: 'bullet' }],
[{ script: 'sub' }, { script: 'super' }],
[{ indent: '-1' }, { indent: '+1' }],
[{ direction: 'rtl' }],
[{ size: ['small', false, 'large', 'huge'] }],
[{ header: [1, 2, 3, 4, 5, 6, false] }],
[{ color: [] }, { background: [] }],
[{ font: [] }],
[{ align: [] }],
['clean']
],
uploadUrl: '',
histories: [],
queryForm: {},
createOrUpdateForm: {
id: null,
versionNo: null,
richContent: null,
},
publishVersionUpgradeShow: false,
operation: 'create', // create edit
pageArgs: {
pageNo: 1,
pageSize: 20,
total: 0,
}
};
},
methods: {
//
uploadBeforeUploadHandle (file) {
if (
file.type !== 'image/jpg' &&
file.type !== 'image/jpeg' &&
file.type !== 'image/png' &&
file.type !== 'image/gif'
) {
this.$message.error(this.$t('upload.tip', { format: 'jpg、png、gif' }))
return false
}
},
//
uploadSuccessHandle (res, file, fileList) {
if (res.code !== 0) {
return this.$message.error(res.msg)
}
this.quillEditor.insertEmbed(
this.quillEditor.getSelection().index,
'image',
res.data.url
)
},
//
initQuill () {
console.log(document.getElementById('J_quillEditor'));
this.quillEditor = new Quill('#J_quillEditor', {
modules: {
toolbar: this.quillEditorToolbarOptions
},
theme: 'snow'
})
// (使element upload)
this.uploadUrl = `${window.SITE_CONFIG['apiURL']
}/oss/file/upload?token=${Cookies.get('token')}`
this.quillEditor.getModule('toolbar').addHandler('image', () => {
this.$refs.uploadBtn.$el.click()
})
//
this.quillEditor.on('text-change', () => {
this.createOrUpdateForm.richContent = this.quillEditor.root.innerHTML
})
},
/**
* 加载版本更新历史
*/
loadVersionUpgradeHistories () {
this.$http.get(`/sys/sysVersionUpgrade/page?pageNo=${this.pageArgs.pageNo}&pageSize=${this.pageArgs.pageSize}`)
.then(({ data: result, status: httpStatus }) => {
if (result.code === 0) {
this.histories = result.data.list
this.pageArgs.total = result.data.total
} else {
this.$message({
type: 'error',
message: result.msg
})
}
})
},
//
onAddBtnClick () {
this.publishVersionUpgradeShow = true;
this.operation = 'create';
this.$nextTick(() => {
this.initQuill()
})
},
//
async onEditBtnClick (id) {
this.publishVersionUpgradeShow = true;
this.operation = 'edit';
await this.getDetail(id);
await this.initQuill();
},
onCancelBtnClick () {
this.$refs['createOrUpdateForm'].resetFields();
this.publishVersionUpgradeShow = false;
this.operation = null;
this.quillEditor = null;
},
/**
* 翻页
*/
onCurrentPageChanged (pageNo) {
this.pageArgs.pageNo = pageNo
this.loadVersionUpgradeHistories()
},
/**
* 提交
*/
onSubmitBtnClick () {
let url = this.operation === 'create' ? `/sys/sysVersionUpgrade/publish` : '/sys/sysVersionUpgrade/update';
this.$http.post(url, this.$data.createOrUpdateForm)
.then(({ data: rst, status: httpStatus }) => {
if (httpStatus !== 200) {
this.$message({
type: 'error',
message: '请求失败'
})
} else if (rst.code !== 0) {
this.$message({
type: 'error',
message: rst.msg
});
} else {
this.$message({
type: 'success',
message: '提交成功'
});
this.$refs['createOrUpdateForm'].resetFields();
this.publishVersionUpgradeShow = false;
this.loadVersionUpgradeHistories();
}
})
},
/**
* 加载详情
* @param id
*/
getDetail (id) {
this.$http.get(`/sys/sysVersionUpgrade/detail/${id}`)
.then(({ status: httpStatus, data: epmetRst }) => {
if (httpStatus !== 200) {
this.$message({
type: 'error',
message: '请求失败'
})
} else if (epmetRst.code != 0) {
this.$message({
type: 'error',
message: epmetRst.msg
})
} else {
this.createOrUpdateForm = epmetRst.data;
this.quillEditor.root.innerHTML = this.createOrUpdateForm.richContent
}
})
}
}
}
</script>
<style scoped lang="css">
::v-deep .ql-toolbar {
margin-top: 36px;
}
</style>
Loading…
Cancel
Save