13176889840 5 years ago
parent
commit
90d0da69fe
  1. 124
      epmet-oper-web/public/index.html
  2. 9
      epmet-oper-web/src/js/ajax.js
  3. 70
      epmet-oper-web/src/js/columns/miniPro/partnerApp.js
  4. 10
      epmet-oper-web/src/views/modules/customer/init/RegisterList.vue
  5. 120
      epmet-oper-web/src/views/modules/partner/app/edit.vue

124
epmet-oper-web/public/index.html

@ -1,69 +1,71 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
<link rel="shortcut icon" href="<%= BASE_URL %>favicon.ico" />
<!-- 站点配置 -->
<script>
window.SITE_CONFIG = {}
window.SITE_CONFIG['version'] = 'v2.0.0'
window.SITE_CONFIG['nodeEnv'] = '<%= process.env.VUE_APP_NODE_ENV %>'
window.SITE_CONFIG['apiURL'] = '' // api请求地址
window.SITE_CONFIG['storeState'] = {} // vuex本地储存初始化状态(用于不刷新页面的情况下,也能重置初始化项目中所有状态)
window.SITE_CONFIG['contentTabDefault'] = {
// 内容标签页默认属性对象
name: '', // 名称, 由 this.$route.name 自动赋值(默认,名称 === 路由名称 === 路由路径)
params: {}, // 参数, 由 this.$route.params 自动赋值
query: {}, // 查询参数, 由 this.$route.query 自动赋值
menuId: '', // 菜单id(用于选中侧边栏菜单,与this.$store.state.sidebarMenuActiveName进行匹配)
title: '', // 标题
isTab: true, // 是否通过tab展示内容?
iframeURL: '' // 是否通过iframe嵌套展示内容? (以http[s]://开头, 自动匹配)
}
window.SITE_CONFIG['menuList'] = [] // 左侧菜单列表(后台返回,未做处理)
window.SITE_CONFIG['dynamicRoutes'] = [] // 动态路由列表
window.SITE_CONFIG['dynamicMenuRoutes'] = [] // 动态(菜单)路由列表
window.SITE_CONFIG['dynamicMenuRoutesHasAdded'] = false // 动态(菜单)路由是否已经添加的状态标示(用于判断是否需要重新拉取数据并进行动态添加操作)
</script>
<!-- 打包命令示例 -->
<!-- npm run build:sit -->
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
<link rel="shortcut icon" href="<%= BASE_URL %>favicon.ico" />
<!-- 站点配置 -->
<script>
window.SITE_CONFIG = {}
window.SITE_CONFIG['version'] = 'v2.0.0'
window.SITE_CONFIG['nodeEnv'] = '<%= process.env.VUE_APP_NODE_ENV %>'
window.SITE_CONFIG['apiURL'] = '' // api请求地址
window.SITE_CONFIG['storeState'] = {} // vuex本地储存初始化状态(用于不刷新页面的情况下,也能重置初始化项目中所有状态)
window.SITE_CONFIG['contentTabDefault'] = {
// 内容标签页默认属性对象
name: '', // 名称, 由 this.$route.name 自动赋值(默认,名称 === 路由名称 === 路由路径)
params: {}, // 参数, 由 this.$route.params 自动赋值
query: {}, // 查询参数, 由 this.$route.query 自动赋值
menuId: '', // 菜单id(用于选中侧边栏菜单,与this.$store.state.sidebarMenuActiveName进行匹配)
title: '', // 标题
isTab: true, // 是否通过tab展示内容?
iframeURL: '' // 是否通过iframe嵌套展示内容? (以http[s]://开头, 自动匹配)
}
window.SITE_CONFIG['menuList'] = [] // 左侧菜单列表(后台返回,未做处理)
window.SITE_CONFIG['dynamicRoutes'] = [] // 动态路由列表
window.SITE_CONFIG['dynamicMenuRoutes'] = [] // 动态(菜单)路由列表
window.SITE_CONFIG['dynamicMenuRoutesHasAdded'] = false // 动态(菜单)路由是否已经添加的状态标示(用于判断是否需要重新拉取数据并进行动态添加操作)
</script>
<!-- 开发环境 -->
<% if (process.env.VUE_APP_NODE_ENV === 'dev') { %>
<!-- <script>window.SITE_CONFIG['apiURL'] = 'http://10.10.10.98:8080/api';</script> -->
<!-- <script>
<!-- 打包命令示例 -->
<!-- npm run build:sit -->
<!-- 开发环境 -->
<% if (process.env.VUE_APP_NODE_ENV === 'dev') { %>
<!-- <script>window.SITE_CONFIG['apiURL'] = 'http://10.10.10.98:8080/api';</script> -->
<!-- <script>
window.SITE_CONFIG['apiURL'] = 'http://192.168.1.130:8080/api'
</script> -->
<!-- <script>window.SITE_CONFIG['apiURL'] = 'http://localhost:8080/api';</script> -->
<script>
window.SITE_CONFIG['apiURL'] = 'http://192.168.1.130:8080/api'
<!-- <script>window.SITE_CONFIG['apiURL'] = 'http://localhost:8080/api';</script> -->
<script>
window.SITE_CONFIG['apiURL'] = 'http://192.168.1.130:8080/api'
// window.SITE_CONFIG['apiURL'] = 'https://epmet-dev.elinkservice.cn/api'
</script>
<% } %>
<!-- 集成测试环境 dev -->
<% if (process.env.VUE_APP_NODE_ENV === 'prod:sit') { %>
<script>
window.SITE_CONFIG['apiURL'] =
'http://epmet-dev.elinkservice.cn:48080/api'
</script>
<% } %>
<!-- 验收测试环境 aliyun -->
<% if (process.env.VUE_APP_NODE_ENV === 'prod:uat') { %>
<script>
window.SITE_CONFIG['apiURL'] = 'https://epmet-dev.elinkservice.cn/api'
</script>
<% } %>
<!-- 生产环境 -->
<% if (process.env.VUE_APP_NODE_ENV === 'prod') { %>
<script>
window.SITE_CONFIG['apiURL'] = 'https://epmet-cloud.elinkservice.cn/api'
</script>
<% } %>
</head>
</script>
<% } %>
<!-- 集成测试环境 dev -->
<% if (process.env.VUE_APP_NODE_ENV === 'prod:sit') { %>
<script>
window.SITE_CONFIG['apiURL'] =
'http://epmet-dev.elinkservice.cn:48080/api'
</script>
<% } %>
<!-- 验收测试环境 aliyun -->
<% if (process.env.VUE_APP_NODE_ENV === 'prod:uat') { %>
<script>
window.SITE_CONFIG['apiURL'] = 'https://epmet-dev.elinkservice.cn/api'
</script>
<% } %>
<!-- 生产环境 -->
<% if (process.env.VUE_APP_NODE_ENV === 'prod') { %>
<script>
window.SITE_CONFIG['apiURL'] = 'https://epmet-cloud.elinkservice.cn/api'
</script>
<% } %>
</head>
<body>
<div id="app"></div>
</body>
<body>
<div id="app"></div>
</body>
</html>
</html>

9
epmet-oper-web/src/js/ajax.js

@ -179,15 +179,16 @@ export default {
.then((res) => {
if (res) {
if (res.status === 200) {
var data = res.data
if (data.sysresultcode === 'success') {
if (data.code == 0) {
//业务成功
if (typeof cb_su === 'function') {
cb_su(data.data, data.rspMsg)
cb_su(data.data, data.msg + ":" + data.internalMsg)
}
} else if (data.sysresultcode === 'fail') {
} else {
//业务失败
if (typeof cb_err === 'function') cb_err(data.rspMsg, data.data)
if (typeof cb_err === 'function') cb_err(data.msg + ":" + data.internalMsg, data.data)
}
} else {
if (typeof cb_err === 'function') cb_err(res)

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

@ -1,33 +1,41 @@
export default [{
key: 'appId',
title: '应用id',
display: ['formA', 'formU', 'table', 'model'],
fixed: false,
block: true,
width: 100
},
{
key: 'appName',
title: '应用名称',
display: ['formA', 'formU', 'table', 'model'],
fixed: false,
block: true,
width: 100
},
{
key: 'customerName',
title: '所属客户',
display: ['formA', 'formU', 'table', 'model'],
fixed: false,
block: true,
width: 100
},
{
key: 'secret',
title: '秘钥',
display: ['formA', 'formU', 'table', 'model'],
fixed: false,
block: true,
width: 200
},
key: 'appId',
title: '应用id',
display: ['formA', 'formU', 'table', 'model'],
fixed: false,
block: true,
width: 100
},
{
key: 'appName',
title: '应用名称',
display: ['formA', 'formU', 'table', 'model'],
fixed: false,
block: true,
width: 100
},
{
key: 'customerName',
title: '所属客户',
display: ['formA', 'formU', 'table', 'model'],
fixed: false,
block: true,
width: 100
},
{
key: 'customerTypeName',
title: '客户类型',
display: ['formA', 'formU', 'table', 'model'],
fixed: false,
block: true,
width: 100
},
{
key: 'secret',
title: '秘钥',
display: ['formA', 'formU', 'table', 'model'],
fixed: false,
block: true,
width: 200
},
]

10
epmet-oper-web/src/views/modules/customer/init/RegisterList.vue

@ -139,11 +139,11 @@ export default {
plain: false,
methodName: 'showToken', //
isShow: (row) => {
if (this.env !== 'prod') {
return true
} else {
return false
}
// if (this.env !== 'prod') {
return true
// } else {
// return false
// }
}
}
],

120
epmet-oper-web/src/views/modules/partner/app/edit.vue

@ -1,46 +1,46 @@
<template>
<el-dialog
:visible.sync="visible"
:title="'编辑外部应用'"
:close-on-click-modal="false"
:before-close="handleClose"
:close-on-press-escape="false"
>
<el-form
:inline="true"
:model="dataForm"
:rules="dataRule"
ref="dataForm"
:label-width="'120px'"
>
<el-form-item label="应用名称" prop="appName">
<el-input
class="item_width_1"
v-model="dataForm.appName"
placeholder="应用名称"
></el-input>
<el-dialog :visible.sync="visible"
:title="'编辑外部应用'"
:close-on-click-modal="false"
:before-close="handleClose"
:close-on-press-escape="false">
<el-form :inline="true"
:model="dataForm"
:rules="dataRule"
ref="dataForm"
:label-width="'120px'">
<el-form-item label="应用名称"
prop="appName">
<el-input class="item_width_1"
v-model="dataForm.appName"
placeholder="应用名称"></el-input>
</el-form-item>
<el-form-item label="所属客户" prop="customerId">
<el-select
class="item_width_1"
v-model="dataForm.customerId"
placeholder="请选择"
clearable
>
<el-option
v-for="item in customerList"
:key="item.customerId"
:label="item.customerName"
:value="item.customerId"
>
<el-form-item label="所属客户"
prop="customerId">
<div>
<el-radio-group v-model="dataForm.customerType"
@change="onSelectedCustomerTypeChange">
<el-radio label="external">外部客户</el-radio>
<el-radio label="internal">内部客户</el-radio>
</el-radio-group>
</div>
<el-select class="item_width_1"
v-model="dataForm.customerId"
placeholder="请选择"
clearable>
<el-option v-for="item in customerList"
:key="item.customerId"
:label="item.customerName"
:value="item.customerId">
</el-option>
</el-select>
</el-form-item>
</el-form>
<template slot="footer">
<el-button @click="visible = false">{{ $t("cancel") }}</el-button>
<el-button type="primary" @click="saveForm()">{{
<el-button type="primary"
@click="saveForm()">{{
$t("confirm")
}}</el-button>
</template>
@ -58,7 +58,7 @@ const requestUrlPrefix = isMockEnv ? mockUrlPrefix : "";
let loading; //
export default {
data() {
data () {
return {
visible: false,
type: "", // A/U
@ -67,6 +67,7 @@ export default {
appName: "",
customerId: "",
customerName: "",
customerType: "internal",
},
customerList: [
// {
@ -76,11 +77,11 @@ export default {
],
};
},
created() {
mounted () {
this.queryCustomerList();
},
computed: {
dataRule() {
dataRule () {
return {
customerId: [
{
@ -100,7 +101,16 @@ export default {
},
},
methods: {
async queryCustomerList() {
async queryCustomerList () {
if (this.dataForm.customerType === 'external') {
this.queryExternalCustomerList();
} else {
this.queryInternalCustomerList();
}
},
//
async queryExternalCustomerList () {
debugger
const { data, code, msg } = await requestPost(
requestUrlPrefix + "/commonservice/externalcustomer/list",
{
@ -108,27 +118,47 @@ export default {
pageSize: 1000,
}
);
if (code === 0) {
this.customerList = data.list;
}
},
init(dataForm, type) {
//
queryInternalCustomerList () {
window.app.ajax.get(
"/oper/crm/customer/getvalidcustomerlist",
{},
(data, rspMsg) => {
this.customerList = data;
},
(rspMsg, data) => {
this.$message.error(rspMsg)
}
)
},
//
onSelectedCustomerTypeChange (value) {
this.dataForm.customerType = value;
this.queryCustomerList();
},
init (dataForm, type) {
this.type = type;
this.visible = true;
// this.dataForm=dataForm
this.$nextTick(() => {
Object.assign(this.dataForm, dataForm);
this.queryCustomerList();
});
},
addRequest() {
addRequest () {
this.dataForm.domainNameList.push("");
},
delRequest(index) {
delRequest (index) {
this.dataForm.domainNameList.splice(index, 1);
},
saveForm() {
saveForm () {
this.$refs["dataForm"].validate((valid) => {
if (!valid) {
this.$message.error("表单验证失败!");
@ -159,12 +189,12 @@ export default {
}
});
},
handleClose() {
handleClose () {
this.visible = false;
},
//
startLoading() {
startLoading () {
loading = Loading.service({
lock: true, //
text: "正在加载……", //
@ -172,7 +202,7 @@ export default {
});
},
//
endLoading() {
endLoading () {
// clearTimeout(timer);
if (loading) {
loading.close();

Loading…
Cancel
Save