提交 41717033 编写于 作者: ibizdev's avatar ibizdev

zhouweidong@lab.ibiz5.com 发布系统代码

上级 bf3ef54f
......@@ -39,6 +39,14 @@
"viewname": "MsgOpenAccessGridView",
"viewtag": "8563f7be052a93dffe667fdaa0dbc387"
},
"msguseraccounteditview": {
"title": "绑定消息账号编辑视图",
"caption": "绑定消息账号",
"viewtype": "DEEDITVIEW",
"viewmodule": "notify",
"viewname": "MsgUserAccountEditView",
"viewtag": "8fe61032f4a886c82b93251368df0533"
},
"notifyindexview": {
"title": "notify",
"caption": "ibizlab",
......@@ -54,5 +62,13 @@
"viewmodule": "notify",
"viewname": "MsgTemplateEditView",
"viewtag": "d40d28e6e7b714c11cc3e965236b212d"
},
"msguseraccountgridview": {
"title": "绑定消息账号表格视图",
"caption": "绑定消息账号",
"viewtype": "DEGRIDVIEW",
"viewmodule": "notify",
"viewname": "MsgUserAccountGridView",
"viewtag": "e6bf4bf11c92edd8e7bfdb621580d73b"
}
}
......@@ -82,6 +82,7 @@ import AppGroupSelect from './components/app-group-select/app-group-select.vue'
import UpdatePwd from './components/app-update-password/app-update-password.vue'
import AppMenuItem from './components/app-menu-item/app-menu-item.vue'
import AppFullScren from './components/app-full-scren/app-full-scren.vue'
import AppLockScren from './components/app-lock-scren/app-lock-scren.vue'
// 全局挂载UI实体服务注册中心
window['uiServiceRegister'] = uiServiceRegister;
// 全局挂载实体权限服务注册中心
......@@ -107,6 +108,7 @@ export const AppComponents = {
v.prototype.$viewTool = ViewTool;
v.prototype.$uiActionTool = UIActionTool;
v.component('app-full-scren',AppFullScren);
v.component('app-lock-scren',AppLockScren);
v.component('input-box', InputBox);
v.component('app-keep-alive',AppKeepAlive);
v.component('tab-page-exp',TabPageExp);
......
......@@ -41,6 +41,7 @@ export class AuthServiceRegister {
protected init(): void {
this.allAuthService.set('msgopenaccess', () => import('@/authservice/msg-open-access/msg-open-access-auth-service'));
this.allAuthService.set('msgtemplate', () => import('@/authservice/msg-template/msg-template-auth-service'));
this.allAuthService.set('msguseraccount', () => import('@/authservice/msg-user-account/msg-user-account-auth-service'));
}
/**
......
import AuthService from '../auth-service';
/**
* 绑定消息账号权限服务对象基类
*
* @export
* @class MsgUserAccountAuthServiceBase
* @extends {AuthService}
*/
export default class MsgUserAccountAuthServiceBase extends AuthService {
/**
* Creates an instance of MsgUserAccountAuthServiceBase.
*
* @param {*} [opts={}]
* @memberof MsgUserAccountAuthServiceBase
*/
constructor(opts: any = {}) {
super(opts);
}
/**
* 根据当前数据获取实体操作标识
*
* @param {*} mainSateOPPrivs 传入数据操作标识
* @returns {any}
* @memberof MsgUserAccountAuthServiceBase
*/
public getOPPrivs(mainSateOPPrivs:any):any{
let curDefaultOPPrivs:any = this.getSysOPPrivs();
if(mainSateOPPrivs){
Object.assign(curDefaultOPPrivs,mainSateOPPrivs);
}
return curDefaultOPPrivs;
}
}
\ No newline at end of file
import MsgUserAccountAuthServiceBase from './msg-user-account-auth-service-base';
/**
* 绑定消息账号权限服务对象
*
* @export
* @class MsgUserAccountAuthService
* @extends {MsgUserAccountAuthServiceBase}
*/
export default class MsgUserAccountAuthService extends MsgUserAccountAuthServiceBase {
/**
* Creates an instance of MsgUserAccountAuthService.
*
* @param {*} [opts={}]
* @memberof MsgUserAccountAuthService
*/
constructor(opts: any = {}) {
super(opts);
}
}
\ No newline at end of file
<template>
<div class="lockscren">
<span>
<Icon type="md-lock" size="22" color="#aaa" @click="handleLock"/>
<el-dialog :title="this.$t('components.lockScren.title')"
:visible.sync="box"
width="30%"
append-to-body>
<el-form :model="form"
ref="form"
label-width="82px">
<el-form-item :label="this.$t('components.lockScren.label')"
prop="passwd"
:rules="[{ required: true, message: this.$t('components.lockScren.message')}]">
<el-input v-model="form.passwd"
:placeholder="this.$t('components.lockScren.placeholder')"></el-input>
</el-form-item>
</el-form>
<span slot="footer"
class="dialog-footer">
<el-button type="primary" @click="handleSetLock">{{this.$t('components.lockScren.confirmButtonText')}}</el-button>
</span>
</el-dialog>
</span>
</div>
</template>
<script lang = 'ts'>
import { Vue, Component, Prop, Model, Watch } from 'vue-property-decorator';
import router from '@/pages/common/app-index-view/router';
@Component({})
export default class AppLockScren extends Vue{
/**
* 对话框状态
*/
public box: boolean = false;
/**
* 锁屏密码
*/
public form: any = {passwd: ''};
/**
* 用户名
*/
public user: any = {name: ''};
/**
* 点击锁屏图表展示对话框
*/
public handleLock(){
this.box = true;
}
/**
* 锁屏确认
*/
public handleSetLock(){
(this.$refs["form"] as any).validate((valid: any )=> {
if (valid) {
const username = this.user.name == '' ? 'visitor' : this.user.name;
const password = window.btoa(this.form.passwd);
const routerPath = window.btoa(this.$route.path);
sessionStorage.setItem('lockPassword',password);
sessionStorage.setItem('lockState','true');
sessionStorage.setItem('userName',username);
sessionStorage.setItem('routerPath',routerPath);
this.$router.push({ path: "/lock" });
}
});
}
/**
* 获取当前用户名
*
* @memberof AppUser
*/
public mounted() {
let _user:any = {};
if(this.$store.getters.getAppData() && this.$store.getters.getAppData().context && this.$store.getters.getAppData().context.srfusername){
_user.name = this.$store.getters.getAppData().context.srfusername;
}
if(localStorage.getItem("user")){
let user:any = JSON.parse(localStorage.getItem("user") as string);
if(user && user.personname){
_user.name = user.personname;
}
}
Object.assign(this.user,_user);
}
}
</script>
<style lang='less'>
.lockscren{
cursor:pointer;
padding: 0 5px;
}
</style>
\ No newline at end of file
.lock-container {
height: 100vh;
display: flex;
align-items: center;
justify-content: center;
position: relative;
.title {
margin-bottom: 8px;
color: #333;
}
.el-icon-unlock{
font-size: 20px;
}
.el-icon-switch-button{
font-size: 20px;
}
}
.lock-container::before {
z-index: -999;
content: "";
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
background-image: url("/assets/img/lock_login.png");
background-size: cover;
}
.lock-form {
width: 300px;
}
\ No newline at end of file
<template>
<div class="lock-container">
<div class="lock-form animated bounceInDown">
<div class="animated">
<h3 class="title">{{username}}</h3>
<el-input :placeholder="this.$t('components.lockScren.placeholder1')"
type="password"
class="input-with-select animated"
v-model="passwd">
<el-button slot="append"
icon="el-icon-unlock"
size="25px"
@click="handleLogin"></el-button>
<el-button slot="append"
icon="el-icon-switch-button"
size="25px"
@click="handleLogout"></el-button>
</el-input>
</div>
</div>
</div>
</template>
<script lang = 'ts'>
import { Vue, Component, Prop, Model, Watch } from 'vue-property-decorator';
@Component({})
export default class AppLockIndex extends Vue{
/**
* 输入密码
*/
public passwd: string = '';
/**
* 保存的密码
*/
public lockpasswd: string = '';
/**
* 用户名
*/
public username: string = '';
/**
* 锁屏前的页面路由
*/
public path: string = '';
/**
* 获取锁屏相关信息
*
* @memberof AppLockIndex
*/
public mounted() {
this.username = (sessionStorage.getItem('userName') as string);
this.lockpasswd = window.atob(sessionStorage.getItem('lockPassword') as string);
this.path = window.atob(sessionStorage.getItem('routerPath') as string);
}
/**
* 解除锁屏
*
* @memberof AppLockIndex
*/
public handleLogin(){
if(this.lockpasswd != this.passwd){
this.passwd = '';
this.$message({
message: (this.$t('components.lockScren.message1') as string),
type: "error"
});
return;
}
this.clearSession();
this.$router.push({ path: this.path});
}
/**
* 登出
*
* @memberof AppLockIndex
*/
public handleLogout(){
this.$confirm((this.$t('components.lockScren.promptInformation') as string), (this.$t('components.lockScren.prompt') as string), {
confirmButtonText: (this.$t('components.lockScren.confirmButtonText') as string),
cancelButtonText: (this.$t('components.lockScren.cancelButtonText') as string),
type: "warning"
}).then(() => {
this.clearSession();
const get: Promise<any> = this.$http.get('/v7/logout');
get.then((response:any) =>{
if (response && response.status === 200) {
localStorage.removeItem('user');
localStorage.removeItem('token');
let leftTime = new Date();
leftTime.setTime(leftTime.getSeconds() - 1);
document.cookie = "ibzuaa-token=;expires=" + leftTime.toUTCString();
this.$router.push({ name: 'login' });
}
}).catch((error: any) =>{
console.error(error);
})
});
}
/**
* 清除锁屏时生成的session
*/
public clearSession(){
sessionStorage.removeItem('lockPassword');
sessionStorage.removeItem('lockState');
sessionStorage.removeItem('userName');
sessionStorage.removeItem('routerPath');
}
}
</script>
<style lang='less'>
@import './app-lock.less';
</style>
\ No newline at end of file
import msgopenaccess_en_US from '@locale/lanres/entities/msg-open-access/msg-open-access_en_US';
import msgtemplate_en_US from '@locale/lanres/entities/msg-template/msg-template_en_US';
import msguseraccount_en_US from '@locale/lanres/entities/msg-user-account/msg-user-account_en_US';
import components_en_US from '@locale/lanres/components/components_en_US';
import codelist_en_US from '@locale/lanres/codelist/codelist_en_US';
import userCustom_en_US from '@locale/lanres/userCustom/userCustom_en_US';
......@@ -123,6 +124,7 @@ export default {
notifyindexview: {
menuitem1: "接入第三方平台",
menuitem2: "消息模板",
menuitem3: "消息账户",
},
},
formpage:{
......@@ -218,6 +220,7 @@ export default {
entities: {
msgopenaccess: msgopenaccess_en_US,
msgtemplate: msgtemplate_en_US,
msguseraccount: msguseraccount_en_US,
},
components: components_en_US,
codelist: codelist_en_US,
......
import msgopenaccess_zh_CN from '@locale/lanres/entities/msg-open-access/msg-open-access_zh_CN';
import msgtemplate_zh_CN from '@locale/lanres/entities/msg-template/msg-template_zh_CN';
import msguseraccount_zh_CN from '@locale/lanres/entities/msg-user-account/msg-user-account_zh_CN';
import components_zh_CN from '@locale/lanres/components/components_zh_CN';
import codelist_zh_CN from '@locale/lanres/codelist/codelist_zh_CN';
import userCustom_zh_CN from '@locale/lanres/userCustom/userCustom_zh_CN';
......@@ -123,6 +124,7 @@ export default {
notifyindexview: {
menuitem1: "接入第三方平台",
menuitem2: "消息模板",
menuitem3: "消息账户",
},
},
formpage:{
......@@ -217,6 +219,7 @@ export default {
entities: {
msgopenaccess: msgopenaccess_zh_CN,
msgtemplate: msgtemplate_zh_CN,
msguseraccount: msguseraccount_zh_CN,
},
components: components_zh_CN,
codelist: codelist_zh_CN,
......
......@@ -246,6 +246,18 @@ export default {
localUpload:'Local upload',
or:'Or',
imgMsg1:'Select from stock'
},
lockScren:{
title:'Set the password lock screen',
label:'password',
message:'The lock screen password cannot be empty',
placeholder:'Please enter the lock screen password',
placeholder1:'Please enter your login password',
message1: 'The unlock password is wrong. Please reenter it',
promptInformation:'Do you want to quit the system? Do you want to continue?',
prompt:'prompt',
confirmButtonText:'determine',
cancelButtonText:'cancel',
}
};
\ No newline at end of file
......@@ -247,5 +247,17 @@ export default {
localUpload:'本地上传',
or:'或',
imgMsg1:'从素材库选择'
},
lockScren:{
title:'设置锁屏密码',
label:'锁屏密码',
message:'锁屏密码不能为空',
placeholder:'请输入锁屏密码',
placeholder1:'请输入登录密码',
message1: '解锁密码错误,请重新输入',
promptInformation:'是否退出系统, 是否继续?',
prompt:'提示',
confirmButtonText:'确定',
cancelButtonText:'取消',
}
};
\ No newline at end of file
export default {
fields: {
id: "标识",
userid: "用户标识",
identity_type: "认证类型",
identifier: "认证标识",
credential: "凭据",
},
views: {
editview: {
caption: "绑定消息账号",
title: "绑定消息账号编辑视图",
},
gridview: {
caption: "绑定消息账号",
title: "绑定消息账号表格视图",
},
},
main_form: {
details: {
formpage1: "基本信息",
srforikey: "",
srfkey: "标识",
srftempmode: "",
srfuf: "",
srfdeid: "",
srfsourcekey: "",
userid: "用户标识",
identity_type: "认证类型",
identifier: "认证标识",
credential: "凭据",
authid: "标识",
},
uiactions: {
},
},
main_grid: {
columns: {
},
uiactions: {
},
},
default_searchform: {
details: {
formpage1: "常规条件",
},
uiactions: {
},
},
editviewtoolbar_toolbar: {
tbitem3: {
caption: "Save",
tip: "Save",
},
tbitem4: {
caption: "Save And New",
tip: "Save And New",
},
tbitem5: {
caption: "Save And Close",
tip: "Save And Close Window",
},
tbitem6: {
caption: "-",
tip: "",
},
tbitem7: {
caption: "Remove And Close",
tip: "Remove And Close Window",
},
tbitem8: {
caption: "-",
tip: "",
},
tbitem12: {
caption: "New",
tip: "New",
},
tbitem13: {
caption: "-",
tip: "",
},
tbitem14: {
caption: "Copy",
tip: "Copy {0}",
},
tbitem16: {
caption: "-",
tip: "",
},
tbitem23: {
caption: "第一个记录",
tip: "第一个记录",
},
tbitem24: {
caption: "上一个记录",
tip: "上一个记录",
},
tbitem25: {
caption: "下一个记录",
tip: "下一个记录",
},
tbitem26: {
caption: "最后一个记录",
tip: "最后一个记录",
},
tbitem21: {
caption: "-",
tip: "",
},
tbitem22: {
caption: "Help",
tip: "Help",
},
},
gridviewtoolbar_toolbar: {
tbitem3: {
caption: "New",
tip: "New",
},
tbitem4: {
caption: "Edit",
tip: "Edit {0}",
},
tbitem6: {
caption: "Copy",
tip: "Copy {0}",
},
tbitem7: {
caption: "-",
tip: "",
},
tbitem8: {
caption: "Remove",
tip: "Remove {0}",
},
tbitem9: {
caption: "-",
tip: "",
},
tbitem13: {
caption: "Export",
tip: "Export {0} Data To Excel",
},
tbitem10: {
caption: "-",
tip: "",
},
tbitem16: {
caption: "其它",
tip: "其它",
},
tbitem21: {
caption: "Export Data Model",
tip: "导出数据模型",
},
tbitem23: {
caption: "数据导入",
tip: "数据导入",
},
tbitem17: {
caption: "-",
tip: "",
},
tbitem19: {
caption: "Filter",
tip: "Filter",
},
tbitem18: {
caption: "Help",
tip: "Help",
},
},
};
\ No newline at end of file
export default {
fields: {
id: "标识",
userid: "用户标识",
identity_type: "认证类型",
identifier: "认证标识",
credential: "凭据",
},
views: {
editview: {
caption: "绑定消息账号",
title: "绑定消息账号编辑视图",
},
gridview: {
caption: "绑定消息账号",
title: "绑定消息账号表格视图",
},
},
main_form: {
details: {
formpage1: "基本信息",
srforikey: "",
srfkey: "标识",
srftempmode: "",
srfuf: "",
srfdeid: "",
srfsourcekey: "",
userid: "用户标识",
identity_type: "认证类型",
identifier: "认证标识",
credential: "凭据",
authid: "标识",
},
uiactions: {
},
},
main_grid: {
columns: {
},
uiactions: {
},
},
default_searchform: {
details: {
formpage1: "常规条件",
},
uiactions: {
},
},
editviewtoolbar_toolbar: {
tbitem3: {
caption: "保存",
tip: "保存",
},
tbitem4: {
caption: "保存并新建",
tip: "保存并新建",
},
tbitem5: {
caption: "保存并关闭",
tip: "保存并关闭",
},
tbitem6: {
caption: "-",
tip: "",
},
tbitem7: {
caption: "删除并关闭",
tip: "删除并关闭",
},
tbitem8: {
caption: "-",
tip: "",
},
tbitem12: {
caption: "新建",
tip: "新建",
},
tbitem13: {
caption: "-",
tip: "",
},
tbitem14: {
caption: "拷贝",
tip: "拷贝",
},
tbitem16: {
caption: "-",
tip: "",
},
tbitem23: {
caption: "第一个记录",
tip: "第一个记录",
},
tbitem24: {
caption: "上一个记录",
tip: "上一个记录",
},
tbitem25: {
caption: "下一个记录",
tip: "下一个记录",
},
tbitem26: {
caption: "最后一个记录",
tip: "最后一个记录",
},
tbitem21: {
caption: "-",
tip: "",
},
tbitem22: {
caption: "帮助",
tip: "帮助",
},
},
gridviewtoolbar_toolbar: {
tbitem3: {
caption: "新建",
tip: "新建",
},
tbitem4: {
caption: "编辑",
tip: "编辑",
},
tbitem6: {
caption: "拷贝",
tip: "拷贝",
},
tbitem7: {
caption: "-",
tip: "",
},
tbitem8: {
caption: "删除",
tip: "删除",
},
tbitem9: {
caption: "-",
tip: "",
},
tbitem13: {
caption: "导出",
tip: "导出",
},
tbitem10: {
caption: "-",
tip: "",
},
tbitem16: {
caption: "其它",
tip: "其它",
},
tbitem21: {
caption: "导出数据模型",
tip: "导出数据模型",
},
tbitem23: {
caption: "数据导入",
tip: "数据导入",
},
tbitem17: {
caption: "-",
tip: "",
},
tbitem19: {
caption: "过滤",
tip: "过滤",
},
tbitem18: {
caption: "帮助",
tip: "帮助",
},
},
};
\ No newline at end of file
......@@ -45,6 +45,24 @@ mock.onGet('v7/notify-index-viewappmenu').reply((config: any) => {
textcls: '',
appfunctag: 'Auto1',
resourcetag: '',
},
{
id: '565D9E14-3E01-43ED-AF79-22C27416DD15',
name: 'menuitem3',
text: '消息账户',
type: 'MENUITEM',
counterid: '',
tooltip: '消息账户',
expanded: false,
separator: false,
hidden: false,
hidesidebar: false,
opendefault: false,
iconcls: 'fa fa-user',
icon: '',
textcls: '',
appfunctag: 'Auto3',
resourcetag: '',
},
],
}];
......
import qs from 'qs';
import { MockAdapter } from '@/mock/mock-adapter';
const mock = MockAdapter.getInstance();
// 模拟数据
const mockDatas: Array<any> = [
];
//getwflink
mock.onGet(new RegExp(/^\/wfcore\/ibznotify-app-web\/msguseraccounts\/[a-zA-Z0-9\-\;]+\/usertasks\/[a-zA-Z0-9\-\;]+\/ways$/)).reply((config: any) => {
console.groupCollapsed("实体:msguseraccount 方法: getwflink");
console.table({url:config.url, method: config.method, data:config.data});
console.groupEnd();
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, {}];
}
return [status,[
{"sequenceFlowId":"dfdsfdsfdsfdsfds","sequenceFlowName":"同意",
"taskId":"aaaaddddccccddddd","processDefinitionKey":"support-workorders-approve-v1",
"processInstanceId":"ddlfldldfldsfds","refViewKey":""},
{"sequenceFlowId":"ddssdfdfdfdfsfdf","sequenceFlowName":"不同意",
"taskId":"aaaaddddccccddddd","processDefinitionKey":"support-workorders-approve-v1",
"processInstanceId":"ddfdsldlfdlldsf","refViewKey":"workorder_ltform_editview"}
]];
});
// getwfstep
mock.onGet(new RegExp(/^\/wfcore\/ibznotify-app-web\/msguseraccounts\/process-definitions-nodes$/)).reply((config: any) => {
console.groupCollapsed("实体:msguseraccount 方法: getwfstep");
console.table({url:config.url, method: config.method, data:config.data});
console.groupEnd();
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, {}];
}
return [status, [
{"userTaskId":"sddfddfd-dfdf-fdfd-fdf-dfdfd",
"userTaskName":"待审",
"cnt":0,
"processDefinitionKey":"support-workorders-approve-v1",
"processDefinitionName":"工单审批流程v1"
},
{"userTaskId":"sddfddfd-dfdf-fdfd-fdf-87927",
"userTaskName":"待分配",
"cnt":3,
"processDefinitionKey":"support-workorders-approve-v1",
"processDefinitionName":"工单审批流程v1"}
]];
});
// createBatch
mock.onPost(new RegExp(/^\/msguseraccounts\/batch$/)).reply((config: any) => {
console.groupCollapsed("实体:msguseraccount 方法: createBatch");
console.table({url:config.url, method: config.method, data:config.data});
console.groupEnd();
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, {}];
}
return [status, {}];
});
// updateBatch
mock.onPut(new RegExp(/^\/msguseraccounts\/batch$/)).reply((config: any) => {
console.groupCollapsed("实体:msguseraccount 方法: updateBatch");
console.table({url:config.url, method: config.method, data:config.data});
console.groupEnd();
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, {}];
}
return [status, {}];
});
// removeBatch
mock.onDelete(new RegExp(/^\/msguseraccounts\/batch$/)).reply((config: any) => {
console.groupCollapsed("实体:msguseraccount 方法: removeBatch");
console.table({url:config.url, method: config.method, data:config.data});
console.groupEnd();
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, {}];
}
return [status, {}];
});
// Select
mock.onGet(new RegExp(/^\/msguseraccounts\/([a-zA-Z0-9\-\;]{1,35})\/select$/)).reply((config: any) => {
console.groupCollapsed("实体:msguseraccount 方法: Select");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
const paramArray:Array<any> = ['id'];
const matchArray:any = new RegExp(/^\/msguseraccounts\/([a-zA-Z0-9\-\;]{1,35})\/select$/).exec(config.url);
let tempValue: any = {};
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => {
Object.defineProperty(tempValue, item, {
enumerable: true,
value: matchArray[index + 1]
});
});
}
let items = mockDatas ? mockDatas : [];
let _items = items.find((item: any) => Object.is(item.id, tempValue.id));
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(_items);
console.groupEnd();
console.groupEnd();
return [status, _items];
});
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// FetchDefault
mock.onGet(new RegExp(/^\/msguseraccounts\/select$/)).reply((config: any) => {
console.groupCollapsed("实体:msguseraccount 方法: FetchDefault");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(mockDatas);
console.groupEnd();
console.groupEnd();
return [status, mockDatas ? mockDatas : []];
});
// FetchDefault
mock.onGet(new RegExp(/^\/msguseraccounts\/select(\?[\w-./?%&=,]*)*$/)).reply((config: any) => {
console.groupCollapsed("实体:msguseraccount 方法: FetchDefault");
console.table({url:config.url, method: config.method, data:config.data});
if(config.url.includes('page')){
let url = config.url.split('?')[1];
let params = qs.parse(url);
Object.assign(config, params);
}
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
let total = mockDatas.length;
let records: Array<any> = [];
if(!config.page || !config.size){
records = mockDatas;
}else{
if((config.page-1)*config.size < total){
records = mockDatas.slice(config.page,config.size);
}
}
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(records ? records : []);
console.groupEnd();
console.groupEnd();
return [status, records ? records : []];
});
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
......@@ -9,3 +9,4 @@ import './upload/upload';
// 实体级接口对象
import './entity/msg-open-accesss/msg-open-accesss';
import './entity/msg-templates/msg-templates';
import './entity/msg-user-accounts/msg-user-accounts';
......@@ -47,6 +47,14 @@ mock.onGet('./assets/json/view-config.json').reply((config: any) => {
"viewname": "MsgOpenAccessGridView",
"viewtag": "8563f7be052a93dffe667fdaa0dbc387"
},
"msguseraccounteditview": {
"title": "绑定消息账号编辑视图",
"caption": "绑定消息账号",
"viewtype": "DEEDITVIEW",
"viewmodule": "notify",
"viewname": "MsgUserAccountEditView",
"viewtag": "8fe61032f4a886c82b93251368df0533"
},
"notifyindexview": {
"title": "notify",
"caption": "ibizlab",
......@@ -62,6 +70,14 @@ mock.onGet('./assets/json/view-config.json').reply((config: any) => {
"viewmodule": "notify",
"viewname": "MsgTemplateEditView",
"viewtag": "d40d28e6e7b714c11cc3e965236b212d"
},
"msguseraccountgridview": {
"title": "绑定消息账号表格视图",
"caption": "绑定消息账号",
"viewtype": "DEGRIDVIEW",
"viewmodule": "notify",
"viewname": "MsgUserAccountGridView",
"viewtag": "e6bf4bf11c92edd8e7bfdb621580d73b"
}
}];
});
\ No newline at end of file
.view-card {
>.ivu-card-extra {
top: 5px;
right: 0px;
}
}
.msg-user-account-edit-view{
position: relative;
}
.toolbar-container {
button {
margin: 6px 0px 4px 4px;
.caption {
margin-left: 4px;
}
}
.seperator {
color: #dcdee2;
margin: 0 0px 0 4px;
}
}
// this is less
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import MsgUserAccountEditViewBase from './msg-user-account-edit-view-base.vue';
import view_form from '@widgets/msg-user-account/main-form/main-form.vue';
@Component({
components: {
view_form,
},
beforeRouteEnter: (to: any, from: any, next: any) => {
next((vm: any) => {
if(!Object.is(vm.navModel,"route")){
vm.initNavDataWithTab(vm.viewCacheData);
}
vm.$store.commit('addCurPageViewtag', { fullPath: to.fullPath, viewtag: vm.viewtag });
});
},
})
export default class MsgUserAccountEditView extends MsgUserAccountEditViewBase {
}
</script>
\ No newline at end of file
.msg-user-account-grid-view{
position: relative;
}
.toolbar-container {
button {
margin: 6px 0px 4px 4px;
.caption {
margin-left: 4px;
}
}
.seperator {
color: #dcdee2;
margin: 0 0px 0 4px;
}
}
// this is less
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import MsgUserAccountGridViewBase from './msg-user-account-grid-view-base.vue';
import view_grid from '@widgets/msg-user-account/main-grid/main-grid.vue';
import view_searchform from '@widgets/msg-user-account/default-searchform/default-searchform.vue';
@Component({
components: {
view_grid,
view_searchform,
},
beforeRouteEnter: (to: any, from: any, next: any) => {
next((vm: any) => {
if(!Object.is(vm.navModel,"route")){
vm.initNavDataWithTab(vm.viewCacheData);
}
vm.$store.commit('addCurPageViewtag', { fullPath: to.fullPath, viewtag: vm.viewtag });
});
},
})
export default class MsgUserAccountGridView extends MsgUserAccountGridViewBase {
}
</script>
\ No newline at end of file
......@@ -44,6 +44,7 @@
<app-lang style='font-size: 15px;padding: 0 10px;'></app-lang>
<app-orgsector></app-orgsector>
<app-user></app-user>
<app-lock-scren />
<app-full-scren />
<app-theme style="width:45px;display: flex;justify-content: center;"></app-theme>
</div>
......
......@@ -5,6 +5,8 @@ export const PageComponents = {
Vue.component('msg-open-access-pickup-grid-view', () => import('@pages/notify/msg-open-access-pickup-grid-view/msg-open-access-pickup-grid-view.vue'));
Vue.component('msg-open-access-pickup-view', () => import('@pages/notify/msg-open-access-pickup-view/msg-open-access-pickup-view.vue'));
Vue.component('msg-template-edit-view', () => import('@pages/notify/msg-template-edit-view/msg-template-edit-view.vue'));
Vue.component('msg-user-account-edit-view', () => import('@pages/notify/msg-user-account-edit-view/msg-user-account-edit-view.vue'));
Vue.component('msg-user-account-grid-view', () => import('@pages/notify/msg-user-account-grid-view/msg-user-account-grid-view.vue'));
Vue.component('msg-open-access-grid-view', () => import('@pages/notify/msg-open-access-grid-view/msg-open-access-grid-view.vue'));
}
};
\ No newline at end of file
......@@ -105,6 +105,34 @@ const router = new Router({
},
component: () => import('@pages/notify/msg-template-edit-view/msg-template-edit-view.vue'),
},
{
path: 'msguseraccounts/:msguseraccount?/editview/:editview?',
meta: {
caption: 'entities.msguseraccount.views.editview.caption',
info:'',
parameters: [
{ pathName: 'notifyindexview', parameterName: 'notifyindexview' },
{ pathName: 'msguseraccounts', parameterName: 'msguseraccount' },
{ pathName: 'editview', parameterName: 'editview' },
],
requireAuth: true,
},
component: () => import('@pages/notify/msg-user-account-edit-view/msg-user-account-edit-view.vue'),
},
{
path: 'msguseraccounts/:msguseraccount?/gridview/:gridview?',
meta: {
caption: 'entities.msguseraccount.views.gridview.caption',
info:'',
parameters: [
{ pathName: 'notifyindexview', parameterName: 'notifyindexview' },
{ pathName: 'msguseraccounts', parameterName: 'msguseraccount' },
{ pathName: 'gridview', parameterName: 'gridview' },
],
requireAuth: true,
},
component: () => import('@pages/notify/msg-user-account-grid-view/msg-user-account-grid-view.vue'),
},
{
path: 'msgopenaccesses/:msgopenaccess?/gridview/:gridview?',
meta: {
......@@ -187,6 +215,19 @@ const router = new Router({
},
component: () => import('@pages/notify/msg-open-access-grid-view/msg-open-access-grid-view.vue'),
},
{
path: '/msguseraccounts/:msguseraccount?/editview/:editview?',
meta: {
caption: 'entities.msguseraccount.views.editview.caption',
info:'',
parameters: [
{ pathName: 'msguseraccounts', parameterName: 'msguseraccount' },
{ pathName: 'editview', parameterName: 'editview' },
],
requireAuth: true,
},
component: () => import('@pages/notify/msg-user-account-edit-view/msg-user-account-edit-view.vue'),
},
{
path: '/msgtemplates/:msgtemplate?/editview/:editview?',
meta: {
......@@ -199,6 +240,19 @@ const router = new Router({
requireAuth: true,
},
component: () => import('@pages/notify/msg-template-edit-view/msg-template-edit-view.vue'),
},
{
path: '/msguseraccounts/:msguseraccount?/gridview/:gridview?',
meta: {
caption: 'entities.msguseraccount.views.gridview.caption',
info:'',
parameters: [
{ pathName: 'msguseraccounts', parameterName: 'msguseraccount' },
{ pathName: 'gridview', parameterName: 'gridview' },
],
requireAuth: true,
},
component: () => import('@pages/notify/msg-user-account-grid-view/msg-user-account-grid-view.vue'),
},
...globalRoutes,
{
......@@ -216,6 +270,20 @@ const router = new Router({
},
component: () => import('@components/login/login.vue'),
},
{
path: '/lock',
name: 'lock',
meta: {
caption: '锁屏',
viewType: 'lock',
requireAuth: false,
ignoreAddPage: true,
},
beforeEnter: (to: any, from: any, next: any) => {
next();
},
component: () => import('@components/app-lock/app-lock.vue'),
},
{
path: '/404',
component: () => import('@components/404/404.vue')
......
......@@ -41,6 +41,7 @@ export class EntityServiceRegister {
protected init(): void {
this.allEntityService.set('msgopenaccess', () => import('@/service/msg-open-access/msg-open-access-service'));
this.allEntityService.set('msgtemplate', () => import('@/service/msg-template/msg-template-service'));
this.allEntityService.set('msguseraccount', () => import('@/service/msg-user-account/msg-user-account-service'));
}
/**
......
import { Http,Util } from '@/utils';
import EntityService from '../entity-service';
/**
* 绑定消息账号服务对象基类
*
* @export
* @class MsgUserAccountServiceBase
* @extends {EntityServie}
*/
export default class MsgUserAccountServiceBase extends EntityService {
/**
* Creates an instance of MsgUserAccountServiceBase.
*
* @param {*} [opts={}]
* @memberof MsgUserAccountServiceBase
*/
constructor(opts: any = {}) {
super(opts);
}
/**
* 初始化基础数据
*
* @memberof MsgUserAccountServiceBase
*/
public initBasicData(){
this.APPLYDEKEY ='msguseraccount';
this.APPDEKEY = 'id';
this.APPDENAME = 'msguseraccounts';
this.APPDETEXT = '';
this.APPNAME = 'web';
this.SYSTEMNAME = 'ibznotify';
}
// 实体接口
/**
* Select接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof MsgUserAccountServiceBase
*/
public async Select(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = Http.getInstance().get(`/msguseraccounts/${context.msguseraccount}/select`,isloading);
return res;
}
/**
* FetchDefault接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof MsgUserAccountServiceBase
*/
public async FetchDefault(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
}
}
\ No newline at end of file
import { Http,Util } from '@/utils';
import MsgUserAccountServiceBase from './msg-user-account-service-base';
/**
* 绑定消息账号服务对象
*
* @export
* @class MsgUserAccountService
* @extends {MsgUserAccountServiceBase}
*/
export default class MsgUserAccountService extends MsgUserAccountServiceBase {
/**
* Creates an instance of MsgUserAccountService.
*
* @param {*} [opts={}]
* @memberof MsgUserAccountService
*/
constructor(opts: any = {}) {
super(opts);
}
}
\ No newline at end of file
......@@ -51,6 +51,15 @@ export const viewstate: any = {
'21df20858e3e04237f987b6aabb7d53e',
],
},
{
viewtag: '8fe61032f4a886c82b93251368df0533',
viewmodule: 'notify',
viewname: 'MsgUserAccountEditView',
viewaction: '',
viewdatachange: false,
refviews: [
],
},
{
viewtag: 'AB032BD4-8B7A-4848-B3D5-880390C396DC',
viewmodule: 'notify',
......@@ -59,6 +68,7 @@ export const viewstate: any = {
viewdatachange: false,
refviews: [
'24012ef8f76c1733b2b2271b864aa293',
'e6bf4bf11c92edd8e7bfdb621580d73b',
'8563f7be052a93dffe667fdaa0dbc387',
],
},
......@@ -72,6 +82,16 @@ export const viewstate: any = {
'2b1e4ec8cc8d1b7d3df4c738dd32abbd',
],
},
{
viewtag: 'e6bf4bf11c92edd8e7bfdb621580d73b',
viewmodule: 'notify',
viewname: 'MsgUserAccountGridView',
viewaction: '',
viewdatachange: false,
refviews: [
'8fe61032f4a886c82b93251368df0533',
],
},
],
createdviews: [],
}
\ No newline at end of file
import { Environment } from '@/environments/environment';
import { UIActionTool,Util } from '@/utils';
import UIService from '../ui-service';
import { Subject } from 'rxjs';
import MsgUserAccountService from '@/service/msg-user-account/msg-user-account-service';
import MsgUserAccountAuthService from '@/authservice/msg-user-account/msg-user-account-auth-service';
/**
* 绑定消息账号UI服务对象基类
*
* @export
* @class MsgUserAccountUIServiceBase
*/
export default class MsgUserAccountUIServiceBase extends UIService {
/**
* 是否支持工作流
*
* @memberof MsgUserAccountUIServiceBase
*/
public isEnableWorkflow:boolean = false;
/**
* 当前UI服务对应的数据服务对象
*
* @memberof MsgUserAccountUIServiceBase
*/
public dataService:MsgUserAccountService = new MsgUserAccountService();
/**
* 所有关联视图
*
* @memberof MsgUserAccountUIServiceBase
*/
public allViewMap: Map<string, Object> = new Map();
/**
* 状态值
*
* @memberof MsgUserAccountUIServiceBase
*/
public stateValue: number = 0;
/**
* 状态属性
*
* @memberof MsgUserAccountUIServiceBase
*/
public stateField: string = "";
/**
* 主状态属性集合
*
* @memberof MsgUserAccountUIServiceBase
*/
public mainStateFields:Array<any> = [];
/**
* 主状态集合Map
*
* @memberof MsgUserAccountUIServiceBase
*/
public allDeMainStateMap:Map<string,string> = new Map();
/**
* 主状态操作标识Map
*
* @memberof MsgUserAccountUIServiceBase
*/
public allDeMainStateOPPrivsMap:Map<string,any> = new Map();
/**
* Creates an instance of MsgUserAccountUIServiceBase.
*
* @param {*} [opts={}]
* @memberof MsgUserAccountUIServiceBase
*/
constructor(opts: any = {}) {
super(opts);
this.authService = new MsgUserAccountAuthService(opts);
this.initViewMap();
this.initDeMainStateMap();
this.initDeMainStateOPPrivsMap();
}
/**
* 初始化视图Map
*
* @memberof MsgUserAccountUIServiceBase
*/
public initViewMap(){
this.allViewMap.set('EDITVIEW:',{viewname:'editview',srfappde:'msguseraccounts'});
this.allViewMap.set('MDATAVIEW:',{viewname:'gridview',srfappde:'msguseraccounts'});
}
/**
* 初始化主状态集合
*
* @memberof MsgUserAccountUIServiceBase
*/
public initDeMainStateMap(){
}
/**
* 初始化主状态操作标识
*
* @memberof MsgUserAccountUIServiceBase
*/
public initDeMainStateOPPrivsMap(){
}
/**
* 获取指定数据的重定向页面
*
* @param srfkey 数据主键
* @param isEnableWorkflow 重定向视图是否需要处理流程中的数据
* @memberof MsgUserAccountUIServiceBase
*/
public async getRDAppView(srfkey:string,isEnableWorkflow:boolean){
this.isEnableWorkflow = isEnableWorkflow;
// 进行数据查询
let result:any = await this.dataService.Get({msguseraccount:srfkey});
const curData:any = result.data;
//判断当前数据模式,默认为true,todo
const iRealDEModel:boolean = true;
let bDataInWF:boolean = false;
let bWFMode:any = false;
// 计算数据模式
if (this.isEnableWorkflow) {
bDataInWF = await this.dataService.testDataInWF({stateValue:this.stateValue,stateField:this.stateField},curData);
if (bDataInWF) {
bDataInWF = true;
bWFMode = await this.dataService.testUserExistWorklist(null,curData);
}
}
let strPDTViewParam:string = await this.getDESDDEViewPDTParam(curData, bDataInWF, bWFMode);
//若不是当前数据模式,处理strPDTViewParam,todo
//查找视图
//返回视图
return this.allViewMap.get(strPDTViewParam);
}
/**
* 获取实际的数据类型
*
* @memberof MsgUserAccountUIServiceBase
*/
public getRealDEType(entity:any){
}
/**
* 获取实体单数据实体视图预定义参数
*
* @param curData 当前数据
* @param bDataInWF 是否有数据在工作流中
* @param bWFMode 是否工作流模式
* @memberof MsgUserAccountUIServiceBase
*/
public async getDESDDEViewPDTParam(curData:any, bDataInWF:boolean, bWFMode:boolean){
let strPDTParam:string = '';
if (bDataInWF) {
// 判断数据是否在流程中
}
//多表单,todo
const isEnableMultiForm:boolean = false;
const multiFormDEField:string|null =null;
if (isEnableMultiForm && multiFormDEField) {
const objFormValue:string = curData[multiFormDEField];
if(!Environment.isAppMode){
return 'MOBEDITVIEW'+objFormValue;
}
return 'EDITVIEW'+objFormValue;
}
if(!Environment.isAppMode){
if(this.getDEMainStateTag(curData)){
return `MOBEDITVIEW:MSTAG:${ this.getDEMainStateTag(curData)}`;
}
return 'MOBEDITVIEW:';
}
if(this.getDEMainStateTag(curData)){
return `EDITVIEW:MSTAG:${ this.getDEMainStateTag(curData)}`;
}
return 'EDITVIEW:';
}
/**
* 获取数据对象的主状态标识
*
* @param curData 当前数据
* @memberof MsgUserAccountUIServiceBase
*/
public getDEMainStateTag(curData:any){
if(this.mainStateFields.length === 0) return null;
this.mainStateFields.forEach((singleMainField:any) =>{
if(!(singleMainField in curData)){
console.warn(`当前数据对象不包含属性${singleMainField},可能会发生错误`);
}
})
for (let i = 0; i <= 1; i++) {
let strTag:string = (curData[this.mainStateFields[0]])?(i == 0) ? curData[this.mainStateFields[0]] : "":"";
if (this.mainStateFields.length >= 2) {
for (let j = 0; j <= 1; j++) {
let strTag2:string = (curData[this.mainStateFields[1]])?`${strTag}__${(j == 0) ? curData[this.mainStateFields[1]] : ""}`:strTag;
if (this.mainStateFields.length >= 3) {
for (let k = 0; k <= 1; k++) {
let strTag3:string = (curData[this.mainStateFields[2]])?`${strTag2}__${(k == 0) ? curData[this.mainStateFields[2]] : ""}`:strTag2;
// 判断是否存在
return this.allDeMainStateMap.get(strTag3);
}
}else{
return this.allDeMainStateMap.get(strTag2);
}
}
}else{
return this.allDeMainStateMap.get(strTag);
}
}
return null;
}
/**
* 获取数据对象当前操作标识
*
* @param data 当前数据
* @memberof MsgUserAccountUIServiceBase
*/
public getDEMainStateOPPrivs(data:any){
if(this.getDEMainStateTag(data)){
return this.allDeMainStateOPPrivsMap.get((this.getDEMainStateTag(data) as string));
}else{
return null;
}
}
/**
* 获取数据对象所有的操作标识
*
* @param data 当前数据
* @memberof MsgUserAccountUIServiceBase
*/
public getAllOPPrivs(data:any){
return this.authService.getOPPrivs(this.getDEMainStateOPPrivs(data));
}
}
\ No newline at end of file
import MsgUserAccountUIServiceBase from './msg-user-account-ui-service-base';
/**
* 绑定消息账号UI服务对象
*
* @export
* @class MsgUserAccountUIService
*/
export default class MsgUserAccountUIService extends MsgUserAccountUIServiceBase {
/**
* Creates an instance of MsgUserAccountUIService.
*
* @param {*} [opts={}]
* @memberof MsgUserAccountUIService
*/
constructor(opts: any = {}) {
super(opts);
}
}
\ No newline at end of file
......@@ -41,6 +41,7 @@ export class UIServiceRegister {
protected init(): void {
this.allUIService.set('msgopenaccess', () => import('@/uiservice/msg-open-access/msg-open-access-ui-service'));
this.allUIService.set('msgtemplate', () => import('@/uiservice/msg-template/msg-template-ui-service'));
this.allUIService.set('msguseraccount', () => import('@/uiservice/msg-user-account/msg-user-account-ui-service'));
}
/**
......
......@@ -510,6 +510,9 @@ export default class NotifyIndexViewBase extends Vue implements ControlInterface
case 'Auto1':
this.clickAuto1(item);
return;
case 'Auto3':
this.clickAuto3(item);
return;
default:
console.warn('未指定应用功能');
}
......@@ -562,6 +565,29 @@ export default class NotifyIndexViewBase extends Vue implements ControlInterface
this.$router.push(path);
})
}
/**
* 消息账户
*
* @param {*} [item={}]
* @memberof NotifyIndexView
*/
public clickAuto3(item: any = {}) {
const viewparam: any = {};
Object.assign(viewparam, {});
const deResParameters: any[] = [];
const parameters: any[] = [
{ pathName: 'msguseraccounts', parameterName: 'msguseraccount' },
{ pathName: 'gridview', parameterName: 'gridview' },
];
const path: string = this.$viewTool.buildUpRoutePath(this.$route, {}, deResParameters, parameters, [], viewparam);
if(Object.is(this.$route.fullPath,path)){
return;
}
this.$nextTick(function(){
this.$router.push(path);
})
}
/**
* 数据加载
......
......@@ -51,6 +51,25 @@ export default class NotifyIndexViewModel {
appfunctag: 'Auto1',
resourcetag: '',
authtag:'web-NotifyIndexView-menuitem2',
},
{
id: '565D9E14-3E01-43ED-AF79-22C27416DD15',
name: 'menuitem3',
text: '消息账户',
type: 'MENUITEM',
counterid: '',
tooltip: '消息账户',
expanded: false,
separator: false,
hidden: false,
hidesidebar: false,
opendefault: false,
iconcls: 'fa fa-user',
icon: '',
textcls: '',
appfunctag: 'Auto3',
resourcetag: '',
authtag:'web-NotifyIndexView-menuitem3',
},
];
......
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import DefaultBase from './default-searchform-base.vue';
@Component({
components: {
}
})
export default class Default extends DefaultBase {
}
</script>
\ No newline at end of file
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册