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

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

上级 a0171330
# 系统概览 iBiz4j Spring R7 dev
此差异已折叠。
## 前言
### 1. 简介
该web应用是基于iBiz平台提供的一套PC端前端解决方案Vue_R7【**一套基于Vue全家桶(Vue + Vue-router + Vuex)的前端框架**】生产而成,Vue_R7不仅适用于管理后台或管理系统开发,且广泛适用于B/S架构的项目开发。本文档主要介绍项目如何快速上手,成果物代码结构做一阐述,旨在能够为开发人员提供一定开发指导支持。而今框架开源,希望能有更多志同道合的伙伴参与Vue_R7的迭代 ^_^
### 2. 开发环境要求
- Node.js
- Yarn
- Vue Cli
### 3. 开发技术要求
掌握`Vue``TypeScript``less``html`等技术。
### 4. 技术栈
- 前端MVVM框架:vue.js 2.6.10
- 路由:vue-router 3.1.3
- 状态管理:vue-router 3.1.3
- 国际化:vue-i18n 8.15.3
- 数据交互:axios 0.19.1
- UI框架:element-ui 2.13.0, view-design 4.1.0
- 工具库:qs, path-to-regexp, rxjs
- 图标库:font-awesome 4.7.0
- 引入组件: tinymce 4.8.5
- 代码风格检测:eslint
## 快速上手
### 1. 开发环境
> 在安装使用 `Yarn` 和 `Vue Cli (3.0)` 前,务必确认 [Node.js](https://nodejs.org) 已经升级到 v4.8.0 或以上,强烈建议升级至最新版本。
> 如果你想了解更多 `Yarn` 工具链的功能和命令,建议访问 [Yarn](https://yarnpkg.com) 了解更多。
> 如果你想了解更多 `Vue Cli (3.0)` 工具链的功能和命令,建议访问 [Vue Cli (3.0)](https://cli.vuejs.org/) 了解更多。
- 访问 [Node.js](https://nodejs.org) ,根据文档安装 `Node.js`
- 访问 [Yarn](https://yarnpkg.com) ,根据文档安装 `Yarn`
- 访问 [Vue Cli (3.0)](https://cli.vuejs.org/) ,根据文档安装 `Vue Cli (3.0)`
<blockquote style="border-color: red;"><p>在安装 Vue Cli (3.0) ,请使用 Yarn 模式全局安装。</p></blockquote>
```bash
$ yarn global add @vue/cli
```
以下为 Windows 环境开发正常配置
<br>
<br>
![开发环境信息](./imgs/getting-started/development.png)
### 2. 安装依赖
打开前端项目,进入工作空间下,执行安装依赖命令
```bash
$ yarn install
```
### 3. 启动
在工作空间下,执行启动命令
```bash
$ yarn dev-serve
```
启动后,通过 vue.config.js 开发服务 devServer 下配置的本地启动端口号访问开发项目。<br>
示例:
```bash
$ http://localhost:8111
```
这儿需要注意一点,此时启动的项目访问的数据是我们前端的mock数据,如需与后台直接交互,请看第4点。
### 4. 远程代理
在工作空间下,执行启动命令
```bash
$ yarn serve
```
修改远程代理文件 vue.config.js 代理地址
![远程代理地址](./imgs/getting-started/proxy.png)
### 5. 打包
在工作空间下,执行打包命令
```bash
$ yarn build
```
打包完成,生成最终交付产物。
## 成果物结构
```
|─ ─ app_web
​ |─ ─ public public文件夹
​ |─ ─ assets 静态文件夹
|─ ─ favicon.ico 图标
​ |─ ─ src 工程文件夹
|─ ─ assets 静态资源
|─ ─ codelist 动态代码表服务
|─ ─ components 基础组件,主要包含编辑器组件和其他全局使用的组件
|─ ─ counter 计数器服务
|─ ─ engine 引擎文件,主要封装了内置视图的内置逻辑
|─ ─ environments 环境文件
​ |─ ─ interface 接口文件
​ |─ ─ locale 多语言文件
|─ ─ mock 模拟数据
|─ ─ pages 视图文件夹
|─ ─ module 模块名称
​ |─ ─ XXX-view 视图文件夹
|─ ─ XXX-view-base.vue 视图基类
|─ ─ XXX-view.vue 自定义视图文件
|─ ─ XXX-view.less 自定义视图样式文件
​ |─ ─ main.ts 应用主函数入口
​ |─ ─ page-register.ts 全局视图注册
​ |─ ─ router.ts 路由配置文件
|─ ─ service 应用实体数据服务文件夹
|─ ─ XXX 应用实体名称
|─ ─ XXX-service-base.ts 应用实体数据服务文件
|─ ─ XXX-service.ts 自定义应用实体数据服务文件
|─ ─ YYY-logic-base.ts 应用实体数据处理逻辑文件
|─ ─ YYY-logic.ts 自定义应用实体数据处理逻辑文件
|─ ─ store 全局状态管理
|─ ─ styles 样式文件夹
|─ ─ default.less 默认样式
|─ ─ user.less 用户自定义样式
|─ ─ theme 主题文件夹
|─ ─ uiservice 界面服务文件
|─ ─ XXX 应用实体名称
|─ ─ XXX-ui-service-base.ts 应用实体界面服务文件
|─ ─ XXX-ui-service.ts 自定义应用实体界面服务文件
|─ ─ YYY-ui-logic-base.ts 应用实体界面处理逻辑文件
|─ ─ YYY-ui-logic.ts 自定义应用实体界面处理逻辑文件
|─ ─ utils 工具类文件
|─ ─ utilservice 应用功能服务
|─ ─ widgets 部件文件夹
|─ ─ appde 应用实体名称
​ |─ ─ XXX 部件名称
|─ ─ XXX-base.vue 视图基类
|─ ─ XXX.vue 自定义部件文件
|─ ─ XXX.less 部件样式文件
​ |─ ─ XXX.model.ts 部件model文件
​ |─ ─ XXX.service.ts 部件服务文件
|─ ─ app-register.ts 公共组件全局注册
​ |─ ─ App.vue 入口组件
​ |─ ─ user-register.ts 自定义组件全局注册
​|─ ─ package.json 依赖管理文件
​ |─ ─ vue.config.js vue cli 配置
```
## 如何贡献
如果你希望参与贡献,欢迎 [Pull Request](<http://demo.ibizlab.cn/ibiz_r7/vue_r7/issues/new>),或通过自助服务群给我们报告 Bug。
强烈推荐阅读 [《提问的智慧》](https://github.com/ryanhanwu/How-To-Ask-Questions-The-Smart-Way)(本指南不提供此项目的实际支持服务!)[《如何向开源社区提问题》](https://github.com/seajs/seajs/issues/545)[《如何有效地报告 Bug》](https://www.chiark.greenend.org.uk/~sgtatham/bugs-cn.html)[《如何向开源项目提交无法解答的问题》](https://zhuanlan.zhihu.com/p/25795393),更好的问题更容易获得帮助。
## 社区互助
1.[iBizLab论坛](https://bbs.ibizlab.cn/)
2.加入钉钉 Vue_R7自助服务群(中文)
<img src="./imgs/getting-started/vue-r7-group.png" height="400" width="400">
\ No newline at end of file
......@@ -8,6 +8,7 @@
"id": "aliyun",
"label": "阿里云",
"text": "阿里云",
"class":"",
"data":"",
"codename":"Aliyun",
"value": "aliyun",
......@@ -18,6 +19,7 @@
"id": "wechat",
"label": "微信开放平台",
"text": "微信开放平台",
"class":"",
"data":"",
"codename":"Wechat",
"value": "wechat",
......@@ -28,6 +30,7 @@
"id": "qq",
"label": "QQ互联",
"text": "QQ互联",
"class":"",
"data":"",
"codename":"Qq",
"value": "qq",
......@@ -38,6 +41,7 @@
"id": "dingtalk",
"label": "钉钉开放平台",
"text": "钉钉开放平台",
"class":"",
"data":"",
"codename":"Dingtalk",
"value": "dingtalk",
......@@ -55,6 +59,7 @@
"id": "aliyun-sms",
"label": "阿里云短信",
"text": "阿里云短信",
"class":"",
"data":"",
"codename":"Aliyun_SUB_sms",
"value": "aliyun-sms",
......@@ -65,6 +70,7 @@
"id": "aliyun-email",
"label": "阿里云邮件",
"text": "阿里云邮件",
"class":"",
"data":"",
"codename":"Aliyun_SUB_email",
"value": "aliyun-email",
......@@ -75,6 +81,7 @@
"id": "wechat-msg",
"label": "微信消息",
"text": "微信消息",
"class":"",
"data":"",
"codename":"Wechat_SUB_msg",
"value": "wechat-msg",
......@@ -85,6 +92,7 @@
"id": "dingtalk-msg",
"label": "钉钉通知",
"text": "钉钉通知",
"class":"",
"data":"",
"codename":"Dingtalk_SUB_msg",
"value": "dingtalk-msg",
......
window.Environment = {
// 应用基础路径
BaseUrl: '',
// 是否为开发模式
devMode: true,
// 是否为pc端应用
isAppMode:true,
// 是否开启权限认证
enablePermissionValid:false,
// 打开目标工具,可选参数:sln、mos
debugOpenMode:'mos',
// 配置平台地址
StudioUrl: "http://172.16.170.145/mos/",
// 中心标识
SlnId: "B4BF5C84-D020-4D9A-A986-8FA4FD72816C",
// 系统标识
SysId: "B428B5BE-EA90-4101-A493-BA7085D89F0A",
// 前端应用标识
AppId: "6e0b7357169ef4eba84e1347ed94bd84",
}
\ No newline at end of file
......@@ -86,6 +86,9 @@ import AppLockScren from './components/app-lock-scren/app-lock-scren.vue'
import ActionTimeline from './components/action-timeline/action-timeline.vue'
import CronEditor from './components/cron-editor/cron-editor.vue'
import AppMessagePopover from './components/app-message-popover/app-message-popover.vue'
import AppPanelField from './components/app-panel-field/app-panel-field.vue'
import AppPanelItem from './components/app-panel-item/app-panel-item.vue'
// 全局挂载UI实体服务注册中心
window['uiServiceRegister'] = uiServiceRegister;
......@@ -111,6 +114,8 @@ export const AppComponents = {
v.prototype.$verify = Verify;
v.prototype.$viewTool = ViewTool;
v.prototype.$uiActionTool = UIActionTool;
v.component('app-panel-item',AppPanelItem);
v.component('app-panel-field',AppPanelField);
v.component('app-full-scren',AppFullScren);
v.component('app-lock-scren',AppLockScren);
v.component('input-box', InputBox);
......
......@@ -112,6 +112,9 @@ export default class AuthService {
* @memberof AuthService
*/
public getMenusPermission(item: any): boolean {
if(!this.$store.getters['authresource/getEnablePermissionValid']) {
return true;
}
return this.$store.getters['authresource/getAuthMenu'](item);
}
......@@ -123,6 +126,9 @@ export default class AuthService {
* @memberof AuthService
*/
public getResourcePermission(tag: any): boolean {
if(!this.$store.getters['authresource/getEnablePermissionValid']) {
return true;
}
return this.$store.getters['authresource/getResourceData'](tag);
}
......
......@@ -12,6 +12,7 @@
<script lang="ts">
import { Vue, Component, Prop, Model, Emit,Inject, Watch } from "vue-property-decorator";
import { Subject,Subscription } from "rxjs";
import { Environment } from '@/environments/environment';
@Component({})
export default class AppActionBar extends Vue {
......
......@@ -18,4 +18,7 @@
font-family: '微软雅黑','黑体','宋体';
font-size: 16px;
}
.progress {
margin-top: -15px;
}
}
\ No newline at end of file
<template>
<div class="app-data-upload-view">
<div class="app-data-upload-view" v-loading.fullscreen="isUploading" element-loading-background="rgba(57, 57, 57, 0.2)">
<el-row style="margin-top:24px" :gutter="20">
<el-col :span="4">
<el-button type="primary" @click="handleUpLoad">{{$t('components.appDataUploadView.selectfile')}}</el-button>
......@@ -13,6 +13,7 @@
</el-col>
</el-row>
<el-divider></el-divider>
<el-progress class="progress" v-show="isUploading" :text-inside="true" :stroke-width="14" :percentage="uploadProgress"></el-progress>
<el-row style="height:480px;padding: 0px 12px;">
<div class="data-info-content" >
<template v-if="importDataArray.length >0 && isUploading === false">
......@@ -50,6 +51,7 @@ import XLSX from 'xlsx';
import CodeListService from "@service/app/codelist-service";
import EntityService from '@/service/entity-service';
import { Vue, Component, Prop, Provide, Emit, Watch } from 'vue-property-decorator';
import { Environment } from '@/environments/environment';
@Component({
})
......@@ -191,6 +193,22 @@ export default class AppDataUploadView extends Vue {
* @memberof AppDataUploadView
*/
public allFieldMap:Map<string,any> = new Map();
/**
* 上传服务器数据切片数
*
* @type {number}
* @memberof AppDataUploadView
*/
public sliceUploadCnt: number = Environment.sliceUploadCnt;
/**
* 上传服务器进度条百分比
*
* @type {number}
* @memberof AppDataUploadView
*/
public uploadProgress: number = 0;
/**
* 视图参数变化
......@@ -282,10 +300,29 @@ export default class AppDataUploadView extends Vue {
this.transformData(this.importDataArray,tempDataArray);
this.hasImported = true;
this.isUploading = true;
this.uploadProgress = 0;
this.importDataArray = [];
this.sliceUploadService(tempDataArray, 0);
}
/**
* 数据切片上传
*
* @memberof AppDataUploadView
*/
public sliceUploadService(dataArray: Array<any>, cnt: number) {
if(cnt > dataArray.length) {
this.isUploading = false;
this.uploadProgress = 100;
return;
}
let sliceArray: Array<any> = [];
if(dataArray) {
sliceArray = dataArray.slice(cnt, cnt+this.sliceUploadCnt);
}
try{
this.entityService.getService(this.viewparams.serviceName).then((service:any) =>{
service.ImportData(this.viewdata,{name:this.importId,importData:tempDataArray}).then((res:any) =>{
service.ImportData(this.viewdata,{name:this.importId,importData:sliceArray}).then((res:any) =>{
const result:any = res.data;
if(result && result.rst !== 0){
this.promptInfo = (this.$t('components.appDataUploadView.importfailed') as string);
......@@ -294,7 +331,8 @@ export default class AppDataUploadView extends Vue {
}
this.importSuccessData = result.data;
this.promptInfo = (this.$t('components.appDataUploadView.completed') as string);
this.isUploading = false;
this.uploadProgress = Number((cnt / dataArray.length * 100).toFixed(2));
this.sliceUploadService(dataArray, cnt + this.sliceUploadCnt);
}).catch((error:any) =>{
this.isUploading = false;
this.promptInfo = (this.$t('components.appDataUploadView.importfailed') as string);
......@@ -311,7 +349,6 @@ export default class AppDataUploadView extends Vue {
console.error(error);
};
}
/**
* 导出excel
*
......
......@@ -222,7 +222,12 @@ export default class AppEmbedPicker extends Vue {
if(Object.is(newFormData[this.refreshitems], oldDormData[this.refreshitems])) {
return;
}
this.setValue([{srfmajortext: null, srfkey: null}]);
if (this.valueItem) {
this.$emit('formitemvaluechange', { name: this.valueItem, value: null });
}
if (this.name) {
this.$emit('formitemvaluechange', { name: this.name, value: null });
}
}
/**
......@@ -231,6 +236,7 @@ export default class AppEmbedPicker extends Vue {
* @memberof AppEmbedPicker
*/
public created() {
this.setViewParam();
if(this.formState) {
this.formStateEvent = this.formState.subscribe(({ tag, action, data }) => {
if (Object.is('load', action)) {
......
......@@ -108,6 +108,7 @@
<script lang="ts">
import { Vue, Component, Prop, Watch } from 'vue-property-decorator';
import { Environment } from '@/environments/environment';
@Component({})
export default class AppFormGroup extends Vue {
......
......@@ -41,7 +41,7 @@ export default class AppHeaderMenus extends Vue {
{
name: "ibizstudio",
title: "components.appHeaderMenus.ibizstudio.title",
url: `${Environment.StudioUrl}?#/common_slnindex/srfkeys=${Environment.SlnId}/sysdesign_psdevslnsysmodeltreeexpview`,
url: `${Environment.StudioUrl}?#/common_mosindex/srfkeys=${Environment.SysId}`,
iconcls: 'fa fa-wrench',
},
{
......
......@@ -19,10 +19,12 @@
padding-top: 2px;
padding-right: 2px;
color: #aaa;
cursor: pointer;
}
.Row {
height: 70px;
min-height: 70px;
height: auto;
border-bottom: 1px solid lightgray;
display: flex;
align-items: center;
......@@ -34,20 +36,24 @@
.column2 {
border: 0px red solid;
.process-definition-name {
font-size: 14px;
padding-top: 5px;
}
.description {
margin-top: 6px;
margin-bottom: 6px;
max-width: 95%;
}
.createtime {
padding-bottom: 5px;
}
.el-row {
display: flex;
.el-col {
flex-grow: 1;
div {
margin-bottom: 5px;
}
div:first-child {
font-weight: 500;
overflow: hidden;
......
......@@ -20,8 +20,8 @@
<el-row :draggable="false">
<el-col :span="16" :draggable="false">
<div class="process-definition-name" :draggable="false"><strong>{{myTask.processDefinitionName}}</strong></div>
<div :draggable="false">{{myTask.description}}</div>
<div :draggable="false">{{ formatDate(myTask.createTime, 'MM-DD hh:mm') }}</div>
<div class="description" :draggable="false">{{myTask.description}}</div>
<div class="createtime" :draggable="false">{{ formatDate(myTask.createTime, 'MM-DD hh:mm') }}</div>
</el-col>
<el-col :span="5" :draggable="false" style='display: flex; align-items: center'>
<el-tag :type="myTask.name.indexOf('驳回')!=-1?'danger':(myTask.name.indexOf('成功')!=-1?'success':(myTask.name.indexOf('取消')!=-1?'info':'-'))"
......@@ -54,8 +54,8 @@
<el-row :draggable="false">
<el-col :span="16" :draggable="false">
<div class="process-definition-name" :draggable="false"><strong>{{myMsg.processDefinitionName}}</strong></div>
<div :draggable="false">{{myMsg.description}}</div>
<div :draggable="false">{{ formatDate(myMsg.createTime, 'MM-DD hh:mm') }}</div>
<div class="description" :draggable="false">{{myMsg.description}}</div>
<div class="createtime" :draggable="false">{{ formatDate(myMsg.createTime, 'MM-DD hh:mm') }}</div>
</el-col>
<el-col :span="5" :draggable="false" style='display: flex; align-items: center'>
<el-tag :type="myMsg.name.indexOf('驳回')!=-1?'danger':(myMsg.name.indexOf('成功')!=-1?'success':(myMsg.name.indexOf('取消')!=-1?'info':'-'))"
......@@ -149,7 +149,7 @@
this.getMyMsgs();
}
}).catch((error: any) => {
this.$Notice.error({title: '错误', desc: error});
console.warn("加载数据错误");
})
}
......
.app-panel-field {
height: 100%;
width: 100%;
display: flex;
padding: 0 6px;
.editor{
flex-grow: 1;
.editorstyle{
.ivu-input.ivu-input-default{
border-color: red;
}
}
.errorstyle{
color:red !important;
}
}
.app-panel-field-label {
height: 34px !important;
line-height: 25px;
flex-shrink: 0;
padding: 6px 10px 6px 0px;
}
}
.app-panel-field.label-top {
flex-flow: column;
}
.app-panel-field.label-bottom{
flex-flow: column-reverse;
}
.app-panel-field.label-left {
.app-panel-field-label {
text-align: right;
}
}
.app-panel-field.label-right {
flex-flow: row-reverse;
.app-panel-field-label {
padding: 6px 0px 6px 10px;
}
}
.app-panel-field.label-none {
.app-panel-field-label {
display: none !important;
}
}
<template>
<div :class="classes">
<div v-if="Object.is(labelPos,'NONE') || !labelPos" class="editor">
<div :class="valueCheck == true ?'':'editorstyle'">
<slot ></slot>
<span :class="error ? 'errorstyle':''">{{error}}</span>
</div>
</div>
<div v-if="!Object.is(labelPos,'NONE')" class="app-panel-field-label">
<span v-if="required" style="color:red;">* </span>
{{isEmptyCaption ? '' : caption}}
</div>
<div v-if="Object.is(labelPos,'BOTTOM') || Object.is(labelPos,'TOP') || Object.is(labelPos,'LEFT') || Object.is(labelPos,'RIGHT')" class="editor">
<div :class="valueCheck == true ?'':'editorstyle'">
<slot ></slot>
<span :class="error ? 'errorstyle':''">{{error}}</span>
</div>
</div>
</div>
</template>
<script lang="ts">
import { Vue, Component, Prop, Watch } from "vue-property-decorator";
@Component({})
export default class AppPanelField extends Vue {
/**
* 名称
*
* @type {string}
* @memberof AppPanelField
*/
@Prop() public caption!: string;
/**
* 错误信息
*
* @type {string}
* @memberof AppPanelField
*/
@Prop() public error?: string;
/**
* 标签位置
*
* @type {(string | 'BOTTOM' | 'LEFT' | 'NONE' | 'RIGHT' | 'TOP')}
* @memberof AppPanelField
*/
@Prop() public labelPos?:
| string
| "BOTTOM"
| "LEFT"
| "NONE"
| "RIGHT"
| "TOP";
/**
* 标签是否空白
*
* @type {boolean}
* @memberof AppPanelField
*/
@Prop() public isEmptyCaption?: boolean;
/**
* 列表项名称
*
* @type {string}
* @memberof AppPanelField
*/
@Prop() public name!: string;
/**
* 面板数据
*
* @type {any}
* @memberof AppPanelField
*/
@Prop() public data!: any;
/**
* 编辑器值
*
* @type {any}
* @memberof AppPanelField
*/
@Prop() public value !: any;
/**
* 值规则
*
* @type {string}
* @memberof AppPanelField
*/
@Prop() public itemRules!: any;
/**
* 是否必填
*
* @type {boolean}
* @memberof AppPanelField
*/
public required: boolean = false;
/**
* 值规则数组
*
* @type {any[]}
* @memberof AppPanelField
*/
public rules: any[] = [];
/**
* 值规则监控
*
* @param {*} newVal
* @param {*} oldVal
* @memberof AppPanelField
*/
@Watch("itemRules", { deep: true })
onItemRulesChange(newVal: any, oldVal: any) {
if (newVal) {
try {
this.rules = [];
const _rules: any[] = newVal;
this.rules = [..._rules];
this.rules.some((rule: any) => {
if (rule.hasOwnProperty("required")) {
this.required = rule.required;
return true;
}
return false;
});
} catch (error) {}
}
}
/**
* 编辑器样式
*
* @type {boolean}
* @memberof AppPanelField
*/
public valueCheck: boolean = true;
/**
* 编辑器值监控
*
* @param {*} newVal
* @param {*} oldVal
* @memberof AppPanelField
*/
@Watch("value")
ItemValueRules(newVal: any, oldVal: any) {
if(this.required && !newVal) {
this.valueCheck = false;
}else{
this.valueCheck = true;
}
}
/**
* 计算样式
*
* @readonly
* @type {string []}
* @memberof AppPanelField
*/
get classes(): string[] {
let posClass = "";
switch (this.labelPos) {
case "TOP":
posClass = "label-top";
break;
case "LEFT":
posClass = "label-left";
break;
case "BOTTOM":
posClass = "label-bottom";
break;
case "RIGHT":
posClass = "label-right";
break;
case "NONE":
posClass = "label-none";
break;
}
return [ "app-panel-field", posClass ];
}
/**
* vue 生命周期
*
* @memberof AppPanelField
*/
public mounted() {
if (this.itemRules) {
try {
const _rules: any[] = this.itemRules;
this.rules = [..._rules];
this.rules.some((rule: any) => {
if (rule.hasOwnProperty("required")) {
this.required = rule.required;
return true;
}
return false;
});
} catch (error) {}
}
}
}
</script>
<style lang='less'>
@import "./app-panel-field.less";
</style>
\ No newline at end of file
.app-panel-item{
.app-panel-item-rawitem{
padding-right: 10px;
}
}
\ No newline at end of file
<template>
<div class="app-panel-item">
<div v-if="Object.is(itemType,'BUTTON')" >
<Button type="primary" long @click="onClick">
<i v-if="icon" :class="icon"></i>
<span v-if="showCaption" :class="lableStyle">{{caption ? caption : ''}}</span>
</Button>
</div>
<div v-if="Object.is(itemType,'RAWITEM')">
<i v-if="icon" :class="icon"></i>
<span v-if="caption" class="app-panel-item-rawitem">{{caption}}</span>
<div :class="contentStyle">
<slot></slot>
</div>
</div>
</div>
</template>
<script lang="ts">
import { Vue, Component, Prop, Watch } from "vue-property-decorator";
@Component({})
export default class AppPanelItem extends Vue {
/**
* 面板成员类型
*
* @type {string}
* @memberof AppPanelItem
*/
@Prop() public itemType!: string;
/**
* 图标
*
* @type {string}
* @memberof AppPanelItem
*/
@Prop() public icon?: string;
/**
* 标题
*
* @type {string}
* @memberof AppPanelItem
*/
@Prop() public caption?: string;
/**
* 显示标题
*
* @type {boolean}
* @memberof AppPanelItem
*/
@Prop() public showCaption?: boolean;
/**
* 标题样式
*
* @type {boolean}
* @memberof AppPanelItem
*/
@Prop() public lableStyle?: string;
/**
* 内容样式
*
* @type {boolean}
* @memberof AppPanelItem
*/
@Prop() public contentStyle?: string;
/**
* 部件样式
*
* @type {boolean}
* @memberof AppPanelItem
*/
@Prop() public partsStyle?: string;
/**
* 点击按钮
*
* @param {*} $event
* @memberof AppPanelItem
*/
public onClick($event: any){
this.$emit('onClick',$event);
}
}
</script>
<style lang='less'>
@import "./app-panel-item.less";
</style>
\ No newline at end of file
......@@ -214,7 +214,8 @@ export default class AppSpan extends Vue {
this.text = Number(number.toFixed(this.precision)).toLocaleString('en-US')+ ' '+ this.unitName;
}else if(Object.is(this.dataType,"FLOAT") || Object.is(this.dataType,"DECIMAL")){
let number:any = Number(this.value);
this.text = number.toFixed(this.precision);
const decimalCnt:number = this.value.toString().split('.').length > 1 ? this.value.toString().split('.')[1].length : 0;
this.text = (Number(this.precision) === 0 && decimalCnt !== 0) ? number.toFixed(decimalCnt) : number.toFixed(this.precision);
}else {
this.text = this.value;
}
......
......@@ -5,11 +5,21 @@
display: none;
}
.el-transfer{
max-height: 200px;
min-width: 100% !important;
display: flex;
justify-content: space-between;
.el-transfer-panel{
min-width: 25%;
.el-transfer-panel__body{
max-height: 160px;
.el-checkbox-group{
max-height: 160px;
.el-checkbox+.el-checkbox {
margin-left: 0px;
}
}
}
}
.el-transfer__buttons{
align-self: center;
......
......@@ -5,30 +5,35 @@
<span>{{data.startUserName}}{{$t('components.appWFApproval.commit')}}</span>
</div>
<div class="app-wf-approval-content" v-if="data.usertasks && data.usertasks.length >0">
<div class="approval-content-item" v-for="(usertask,index) in data.usertasks" :key="index">
<div class="approval-content-item-left">
{{usertask.userTaskName}}
</div>
<div class="approval-content-item-right">
<div class="approval-content-item-wait" v-if="usertask.identitylinks.length >0">
{{$t('components.appWFApproval.wait')}}<span v-for="(identitylink,inx) in usertask.identitylinks" :key="inx">{{identitylink.displayname}}<span v-if="inx >0"></span></span>{{$t('components.appWFApproval.handle')}}
</div>
<div class="approval-content-item-info" v-if="usertask.comments.length >0">
<div v-for="(comment,commentInx) in usertask.comments" :key="commentInx">
<div class="approval-content-item-info-item approval-content-item-info-top">
{{`【${comment.type}】${comment.fullMessage}`}}
<template v-for="(usertask,index) in data.usertasks" >
<template v-if="usertask.identitylinks.length >0">
<div class="approval-content-item" :key="index">
<div class="approval-content-item-left">
{{usertask.userTaskName}}
</div>
<div class="approval-content-item-right">
<div class="approval-content-item-wait" v-if="usertask.identitylinks.length >0">
{{$t('components.appWFApproval.wait')}}<span v-for="(identitylink,inx) in usertask.identitylinks" :key="inx">{{identitylink.displayname}}<span v-if="inx >0"></span></span>{{$t('components.appWFApproval.handle')}}
</div>
<div class="approval-content-item-info-item approval-content-item-info-bottom">
<span class="info-bottom-name">{{comment.authorName}}</span>
<span>{{comment.time}}</span>
<div class="approval-content-item-info" v-if="usertask.comments.length >0">
<div v-for="(comment,commentInx) in usertask.comments" :key="commentInx">
<div class="approval-content-item-info-item approval-content-item-info-top">
{{`【${comment.type}】${comment.fullMessage}`}}
</div>
<div class="approval-content-item-info-item approval-content-item-info-bottom">
<span class="info-bottom-name">{{comment.authorName}}</span>
<span>{{comment.time}}</span>
</div>
</div>
</div>
<div class="approval-content-item-memo" v-if="usertask.userTaskId === viewparams.userTaskId">
<el-input type="textarea" v-model="initmemo" :rows="2" @blur="handleBlur" :placeholder="$t('components.appWFApproval.placeholder')"></el-input>
</div>
</div>
</div>
<div class="approval-content-item-memo" v-if="usertask.userTaskId === viewparams.userTaskId">
<el-input type="textarea" v-model="initmemo" :rows="2" @blur="handleBlur" :placeholder="$t('components.appWFApproval.placeholder')"></el-input>
</div>
</div>
</div>
</template>
</template>
</div>
<div class="app-wf-approval-bottom">
<span v-if="data.endTime">{{data.endTime}}{{$t('components.appWFApproval.end')}}</span>
......
......@@ -293,12 +293,13 @@ export default class ContextMenuDrag extends Vue {
mounted() {
let that: any = this;
const get: Promise<any> = this.entityService.getAllApp(null,{});
get
.then((response: any) => {
get.then((response: any) => {
if (response) {
that.list = response.data.model;
that.listFilter();
}
}).catch((error:any) =>{
console.warn("加载数据错误")
});
}
}
......
......@@ -92,6 +92,14 @@ export default class ContextMenu extends Vue {
*/
@Prop()
public menus?: any[]
/**
* 是否阻止默认绘制上下文菜单
*
* @type {any}
* @memberof ContextMenu
*/
@Prop({default:false})
public isBlocked?:any;
/**
* 显示右键菜单
......@@ -195,7 +203,10 @@ export default class ContextMenu extends Vue {
if (contextRef) {
contextRef.oncontextmenu = (event: MouseEvent) => {
event.preventDefault();
this.showContextMenu(event.clientX, event.clientY);
if(!this.isBlocked){
this.showContextMenu(event.clientX, event.clientY);
}
this.$emit("showContext",event);
};
}
}
......
......@@ -8,7 +8,7 @@
:filterable="filterable"
@on-open-change="onClick"
:placeholder="$t('components.dropDownListDynamic.placeholder')">
<i-option v-for="(item, index) in items" :key="index" :value="item.value">{{($t('userCustom.'+tag+'.'+item.value)!== ('userCustom.'+tag+'.'+item.value))?$t('userCustom.'+tag+'.'+item.value) : item.text}}</i-option>
<i-option v-for="(item, index) in items" :key="index" :class="item.class" :value="item.value">{{($t('userCustom.'+tag+'.'+item.value)!== ('userCustom.'+tag+'.'+item.value))?$t('userCustom.'+tag+'.'+item.value) : item.text}}</i-option>
</i-select>
</template>
......
......@@ -12,7 +12,7 @@
:filterable="filterable"
@on-open-change="onClick"
:placeholder="$t('components.dropDownListMpicker.placeholder')">
<i-option v-for="(item, index) in items" :key="index" :value="item.value.toString()" :label="item.text">
<i-option v-for="(item, index) in items" :key="index" :class="item.class" :value="item.value.toString()" :label="item.text">
<Checkbox :value = "(currentVal.indexOf(item.value.toString()))==-1?false:true">
{{Object.is(codelistType,'STATIC') ? $t('codelist.'+tag+'.'+item.value) : item.text}}
</Checkbox>
......
......@@ -9,7 +9,7 @@
:filterable="filterable"
@on-open-change="onClick"
:placeholder="$t('components.dropDownList.placeholder')">
<i-option v-for="(item, index) in items" :key="index" :value="item.value">{{($t('codelist.'+tag+'.'+item.value)!== ('codelist.'+tag+'.'+item.value))?$t('codelist.'+tag+'.'+item.value) : item.text}}</i-option>
<i-option v-for="(item, index) in items" :key="index" :class="item.class" :value="item.value">{{($t('codelist.'+tag+'.'+item.value)!== ('codelist.'+tag+'.'+item.value))?$t('codelist.'+tag+'.'+item.value) : item.text}}</i-option>
</i-select>
<ibiz-select-tree v-if="hasChildren" class="tree-dropdown-list" :disabled="disabled" :NodesData="items" v-model="currentVal" :multiple="false"></ibiz-select-tree>
</div>
......
import { Store } from 'vuex';
import EntityService from '@/service/entity-service';
/**
* 计数器服务基类
......@@ -16,6 +18,51 @@ export default class CounterService {
* @memberof CounterService
*/
private $store: Store<any> | null = null;
/**
* 当前计数器数据
*
* @protected
* @type {*}
* @memberof CounterService
*/
protected counterData:any ={};
/**
* 应用实体数据服务
*
* @protected
* @type {EntityService}
* @memberof CounterService
*/
protected appEntityService:EntityService = new EntityService();
/**
* 当前计数器导航上下文
*
* @protected
* @type {*}
* @memberof CounterService
*/
protected context:any ={};
/**
* 当前计数器导航参数
*
* @protected
* @type {*}
* @memberof CounterService
*/
protected viewparams:any ={};
/**
* 当前计数器定时器对象
*
* @protected
* @type {*}
* @memberof CounterService
*/
protected timer:any;
/**
* Creates an instance of CounterService.
......@@ -25,6 +72,8 @@ export default class CounterService {
*/
constructor(opts: any = {}) {
this.$store = opts.$store;
this.context = opts.context?opts.context:{};
this.viewparams = opts.viewparams?opts.viewparams:{};
}
/**
......@@ -49,5 +98,13 @@ export default class CounterService {
return (window as any)['counterServiceRegister'].getService(name);
}
/**
* 销毁计数器
*
* @memberof ActionCounterCounterServiceBase
*/
public destroyCounter(){
if(this.timer) clearInterval(this.timer);
}
}
\ No newline at end of file
import { Environment } from '@/environments/environment';
/**
*
*
......
......@@ -15,6 +15,8 @@ export const Environment = {
ExportFile: '/ibizutil/download',
// 文件上传
UploadFile: '/ibizutil/upload',
// 数据导入单次上传最大数量
sliceUploadCnt: 100,
// 是否为pc端应用
isAppMode:true,
//统一地址
......@@ -25,8 +27,10 @@ export const Environment = {
enablePermissionValid:false,
// 项目模板地址
ProjectUrl: "http://demo.ibizlab.cn/ibizr7pfstdtempl/ibizvuer7",
// 打开目标工具,可选参数:sln、mos
debugOpenMode:'mos',
// 配置平台地址
StudioUrl: "http://172.16.170.145/slnstudio/",
StudioUrl: "http://172.16.170.145/mos/",
// 中心标识
SlnId: "B4BF5C84-D020-4D9A-A986-8FA4FD72816C",
// 系统标识
......@@ -39,4 +43,8 @@ export const Environment = {
ibizlabtUrl: 'https://www.ibizlab.cn',
// ibiz论坛地址
ibizbbstUrl: 'https://bbs.ibizlab.cn',
};
\ No newline at end of file
};
// 挂载外部配置文件
if ((window as any).Environment) {
Object.assign(Environment, (window as any).Environment);
}
\ No newline at end of file
......@@ -6,7 +6,7 @@ export default {
open_type: "开放平台类型",
access_key: "AccessKey(AppId)",
secret_key: "SecretKey(AppSecret)",
region_id: "RegionId",
region_id: "RegionId(CorpId)",
access_token: "管理账号token",
expires_time: "管理账号token过期时间",
disabled: "是否禁用",
......@@ -45,7 +45,7 @@ export default {
open_type: "开放平台类型",
access_key: "AccessKey(AppId)",
secret_key: "SecretKey(AppSecret)",
region_id: "RegionId",
region_id: "RegionId(CorpId)",
access_token: "管理账号token",
expires_time: "管理账号token过期时间",
accessid: "开放平台接入标识",
......@@ -58,7 +58,7 @@ export default {
accessname: "开放平台",
open_type: "开放平台类型",
access_key: "AccessKey(AppId)",
region_id: "RegionId",
region_id: "RegionId(CorpId)",
},
uiactions: {
},
......
......@@ -5,7 +5,7 @@ export default {
open_type: "开放平台类型",
access_key: "AccessKey(AppId)",
secret_key: "SecretKey(AppSecret)",
region_id: "RegionId",
region_id: "RegionId(CorpId)",
access_token: "管理账号token",
expires_time: "管理账号token过期时间",
disabled: "是否禁用",
......@@ -44,7 +44,7 @@ export default {
open_type: "开放平台类型",
access_key: "AccessKey(AppId)",
secret_key: "SecretKey(AppSecret)",
region_id: "RegionId",
region_id: "RegionId(CorpId)",
access_token: "管理账号token",
expires_time: "管理账号token过期时间",
accessid: "开放平台接入标识",
......@@ -57,7 +57,7 @@ export default {
accessname: "开放平台",
open_type: "开放平台类型",
access_key: "AccessKey(AppId)",
region_id: "RegionId",
region_id: "RegionId(CorpId)",
},
uiactions: {
},
......
......@@ -33,6 +33,7 @@ mock.onGet('/appdata').reply((config: any) => {
// 当前用户条线代码
srfsectorbc:""
},
enablepermissionvalid:false,
unires:["RESOURCE1","RESOURCE2"],
//当前用户所有组织部门标识
srforgsections:[{"srforgsectorid":"5bd1ecf4d3c31e31cb66373df56b852f","srforgsectorname":"项目一部"},{"srforgsectorid":"2ad1ecf4d3c31e31cb66373df56b852f","srforgsectorname":"项目二部"}]
......
......@@ -16,6 +16,7 @@ mock.onGet('./assets/json/data-dictionary.json').reply((config: any) => {
id: "aliyun",
label: "阿里云",
text: "阿里云",
"class":"",
"data":"",
"codename":"Aliyun",
value: "aliyun",
......@@ -26,6 +27,7 @@ mock.onGet('./assets/json/data-dictionary.json').reply((config: any) => {
id: "wechat",
label: "微信开放平台",
text: "微信开放平台",
"class":"",
"data":"",
"codename":"Wechat",
value: "wechat",
......@@ -36,6 +38,7 @@ mock.onGet('./assets/json/data-dictionary.json').reply((config: any) => {
id: "qq",
label: "QQ互联",
text: "QQ互联",
"class":"",
"data":"",
"codename":"Qq",
value: "qq",
......@@ -46,6 +49,7 @@ mock.onGet('./assets/json/data-dictionary.json').reply((config: any) => {
id: "dingtalk",
label: "钉钉开放平台",
text: "钉钉开放平台",
"class":"",
"data":"",
"codename":"Dingtalk",
value: "dingtalk",
......@@ -63,6 +67,7 @@ mock.onGet('./assets/json/data-dictionary.json').reply((config: any) => {
id: "aliyun-sms",
label: "阿里云短信",
text: "阿里云短信",
"class":"",
"data":"",
"codename":"Aliyun_SUB_sms",
value: "aliyun-sms",
......@@ -73,6 +78,7 @@ mock.onGet('./assets/json/data-dictionary.json').reply((config: any) => {
id: "aliyun-email",
label: "阿里云邮件",
text: "阿里云邮件",
"class":"",
"data":"",
"codename":"Aliyun_SUB_email",
value: "aliyun-email",
......@@ -83,6 +89,7 @@ mock.onGet('./assets/json/data-dictionary.json').reply((config: any) => {
id: "wechat-msg",
label: "微信消息",
text: "微信消息",
"class":"",
"data":"",
"codename":"Wechat_SUB_msg",
value: "wechat-msg",
......@@ -93,6 +100,7 @@ mock.onGet('./assets/json/data-dictionary.json').reply((config: any) => {
id: "dingtalk-msg",
label: "钉钉通知",
text: "钉钉通知",
"class":"",
"data":"",
"codename":"Dingtalk_SUB_msg",
value: "dingtalk-msg",
......
......@@ -11,7 +11,7 @@ export class FormButtonModel extends FormDetailModel {
constructor(opts: any = {}) {
super(opts);
this.disabled = opts.disabled;
this.$disabled = opts.disabled;
this.uiaction = opts.uiaction;
}
......@@ -21,7 +21,7 @@ export class FormButtonModel extends FormDetailModel {
* @type {boolean}
* @memberof FormButtonModel
*/
public disabled:boolean = false;
private $disabled:boolean = false;
/**
* 按钮对应的界面行为
......@@ -31,4 +31,26 @@ export class FormButtonModel extends FormDetailModel {
*/
public uiaction:any;
/**
* 是否启用
*
* @type {boolean}
* @memberof FormButtonModel
*/
public get disabled(): boolean {
return this.$disabled;
}
/**
* 设置是否启用
*
* @memberof FormButtonModel
*/
public set disabled(val: boolean) {
if(this.isPower) {
this.$disabled = val;
}
}
}
\ No newline at end of file
......@@ -6,6 +6,14 @@
*/
export class FormDetailModel {
/**
* 是否有权限
*
* @type {boolean}
* @memberof FormDetailModel
*/
public isPower: boolean = true;
/**
* 成员标题
*
......@@ -44,7 +52,7 @@ export class FormDetailModel {
* @type {boolean}
* @memberof FormDetailModel
*/
public visible: boolean = true;
public $visible: boolean = true;
/**
* 成员是否显示(旧)
......@@ -83,12 +91,33 @@ export class FormDetailModel {
this.detailType = !Object.is(opts.detailType, '') ? opts.detailType : '';
this.form = opts.form ? opts.form : {};
this.name = !Object.is(opts.name, '') ? opts.name : '';
this.visible = opts.visible ? true : false;
this.$visible = opts.visible ? true : false;
this.oldVisible = opts.visible ? true : false;
this.isShowCaption = opts.isShowCaption ? true : false;
this.isControlledContent = opts.isControlledContent ? true : false;
}
/**
* 设置成员是否隐藏
*
* @memberof FormDetailModel
*/
public set visible(val: boolean) {
if(this.isPower) {
this.$visible = val;
}
}
/**
* 获取成员是否隐藏
*
* @memberof FormDetailModel
*/
public get visible() {
return this.$visible;
}
/**
* 设置显示与隐藏
*
......@@ -96,7 +125,9 @@ export class FormDetailModel {
* @memberof FormDetailModel
*/
public setVisible(state: boolean): void {
this.visible = state;
if(this.isPower) {
this.visible = state;
}
}
/**
......
export { PanelDetailModel } from './panel-detail';
export { PanelRawitemModel } from './panel-row-item';
export { PanelTabPanelModel } from './panel-tab-panel';
export { PanelTabPageModel } from './panel-tab-page';
export { PanelFieldModel } from './panel-field';
export { PanelContainerModel } from './panel-container';
export { PanelControlModel } from './panel-control';
export { PanelUserControlModel } from './panel-user-control';
export { PanelButtonModel } from './panel-button';
\ No newline at end of file
import { PanelDetailModel } from './panel-detail';
/**
* 按钮模型
*
* @export
* @class PanelButtonModel
* @extends {PanelDetailModel}
*/
export class PanelButtonModel extends PanelDetailModel {
constructor(opts: any = {}) {
super(opts);
this.$disabled = opts.disabled;
this.uiaction = opts.uiaction;
}
/**
* 是否禁用
*
* @type {boolean}
* @memberof PanelButtonModel
*/
private $disabled:boolean = false;
/**
* 按钮对应的界面行为
*
* @type {*}
* @memberof PanelButtonModel
*/
public uiaction:any;
/**
* 是否启用
*
* @type {boolean}
* @memberof PanelButtonModel
*/
public get disabled(): boolean {
return this.$disabled;
}
/**
* 设置是否启用
*
* @memberof PanelButtonModel
*/
public set disabled(val: boolean) {
if(this.isPower) {
this.$disabled = val;
}
}
}
\ No newline at end of file
import { PanelDetailModel } from './panel-detail';
/**
* 面板容器模型
*
* @export
* @class PanelContainerModel
* @extends {PanelDetailModel}
*/
export class PanelContainerModel extends PanelDetailModel {
constructor(opts: any = {}) {
super(opts);
}
}
\ No newline at end of file
import { PanelDetailModel } from './panel-detail';
/**
* 用户控件模型
*
* @export
* @class PanelControlModel
* @extends {PanelDetailModel}
*/
export class PanelControlModel extends PanelDetailModel {
constructor(otps:any = {}) {
super(otps);
}
}
\ No newline at end of file
/**
* 表单成员模型
*
* @export
* @class PanelDetailModel
*/
export class PanelDetailModel {
/**
* 是否有权限
*
* @type {boolean}
* @memberof PanelDetailModel
*/
public isPower: boolean = true;
/**
* 成员标题
*
* @type {string}
* @memberof PanelDetailModel
*/
public caption: string = '';
/**
* 成员类型
*
* @type {string}
* @memberof PanelDetailModel
*/
public itemType: string = '';
/**
* 面板对象
*
* @type {*}
* @memberof PanelDetailModel
*/
public panel: any = null;
/**
* 成员名称
*
* @type {string}
* @memberof PanelDetailModel
*/
public name: string = '';
/**
* 成员是否显示
*
* @type {boolean}
* @memberof PanelDetailModel
*/
public $visible: boolean = true;
/**
* 成员是否显示(旧)
*
* @type {boolean}
* @memberof PanelDetailModel
*/
public oldVisible: boolean = true;
/**
* 成员是否显示标题
*
* @type {boolean}
* @memberof PanelDetailModel
*/
public isShowCaption: boolean = true;
/**
* Creates an instance of PanelDetailModel.
* PanelDetailModel 实例
*
* @param {*} [opts={}]
* @memberof PanelDetailModel
*/
constructor(opts: any = {}) {
this.caption = !Object.is(opts.caption, '') ? opts.caption : '';
this.itemType = !Object.is(opts.itemType, '') ? opts.itemType : '';
this.panel = opts.panel ? opts.panel : {};
this.name = !Object.is(opts.name, '') ? opts.name : '';
this.$visible = opts.visible ? true : false;
this.oldVisible = opts.visible ? true : false;
this.isShowCaption = opts.isShowCaption ? true : false;
}
/**
* 设置成员是否隐藏
*
* @memberof PanelDetailModel
*/
public set visible(val: boolean) {
if(this.isPower) {
this.$visible = val;
}
}
/**
* 获取成员是否隐藏
*
* @memberof PanelDetailModel
*/
public get visible() {
return this.$visible;
}
/**
* 设置显示与隐藏
*
* @param {boolean} state
* @memberof PanelDetailModel
*/
public setVisible(state: boolean): void {
if(this.isPower) {
this.visible = state;
}
}
/**
* 设置显示标题栏
*
* @param {boolean} state
* @memberof PanelDetailModel
*/
public setShowCaption(state: boolean): void {
this.isShowCaption = state;
}
}
\ No newline at end of file
import { PanelDetailModel } from './panel-detail';
/**
* 面板属性项模型
*
* @export
* @class PanelFieldModel
* @extends {PanelDetailModel}
*/
export class PanelFieldModel extends PanelDetailModel {
/**
* 是否启用
*
* @type {boolean}
* @memberof PanelFieldModel
*/
public disabled: boolean = false;
/**
* 错误信息
*
* @type {string}
* @memberof PanelFieldModel
*/
public error: string = '';
/**
* 表单项启用条件
*
* 0 不启用
* 1 新建
* 2 更新
* 3 全部启用
*
* @type {(number | 0 | 1 | 2 | 3)}
* @memberof PanelFieldModel
*/
public enableCond: number | 0 | 1 | 2 | 3 = 3;
/**
* Creates an instance of PanelFieldModel.
* PanelFieldModel 实例
*
* @param {*} [opts={}]
* @memberof PanelFieldModel
*/
constructor(opts: any = {}) {
super(opts);
this.disabled = opts.disabled ? true : false;
this.enableCond = opts.enableCond;
}
/**
* 设置是否启用
*
* @param {boolean} state
* @memberof PanelFieldModel
*/
public setDisabled(state: boolean): void {
this.disabled = state;
}
/**
* 设置信息内容
*
* @param {string} error
* @memberof PanelFieldModel
*/
public setError(error: string): void {
this.error = error;
}
/**
* 设置是否启用
*
* @param {string} srfuf
* @memberof PanelFieldModel
*/
public setEnableCond(srfuf: string): void {
// 是否有权限
const isReadOk: boolean = true;
const _srfuf: number = parseInt(srfuf, 10);
let state: boolean = true;
if (isReadOk) {
if (_srfuf === 1) {
if ((this.enableCond & 2) === 2) {
state = false;
}
} else {
if ((this.enableCond & 1) === 1) {
state = false;
}
}
}
this.setDisabled(state);
}
}
\ No newline at end of file
import { PanelDetailModel } from './panel-detail';
/**
* 直接内容模型
*
* @export
* @class PanelRawitemModel
* @extends {PanelDetailModel}
*/
export class PanelRawitemModel extends PanelDetailModel {
constructor(opts: any = {}) {
super(opts);
}
}
\ No newline at end of file
import { PanelDetailModel } from './panel-detail';
import { PanelTabPanelModel } from './panel-tab-panel';
/**
* 分页面板模型
*
* @export
* @class PanelTabPageModel
* @extends {PanelDetailModel}
*/
export class PanelTabPageModel extends PanelDetailModel {
/**
* Creates an instance of PanelTabPageModel.
* PanelTabPageModel 实例
*
* @param {*} [opts={}]
* @memberof PanelTabPageModel
*/
constructor(opts: any = {}) {
super(opts);
}
/**
* 设置分页是否启用
*
* @param {boolean} state
* @memberof PanelTabPageModel
*/
public setVisible(state: boolean): void {
this.visible = state;
const tabPanel = this.getTabPanelModel();
if (tabPanel) {
tabPanel.setActiviePage();
}
}
/**
* 获取分页面板
*
* @returns {(PanelTabPanelModel | null)}
* @memberof PanelTabPageModel
*/
public getTabPanelModel(): PanelTabPanelModel | null {
if (!this.panel) {
return null;
}
const tabPanels: any[] = Object.values(this.panel.detailsModel).filter((model: any) => Object.is(model.itemType, 'TABPANEL'));
let index = tabPanels.findIndex((tabPanel: any) => {
return tabPanel.tabPages.some((tabPag: any) => Object.is(tabPag.name, this.name));
});
if (index === -1) {
return null;
}
const tabPanel: PanelTabPanelModel = tabPanels[index];
return tabPanel;
}
}
\ No newline at end of file
import { PanelDetailModel } from './panel-detail';
/**
* 分页部件模型
*
* @export
* @class PanelTabPanelModel
* @extends {PanelDetailModel}
*/
export class PanelTabPanelModel extends PanelDetailModel {
/**
* 被激活分页
*
* @type {string}
* @memberof PanelTabPanelModel
*/
public activiedPage: string = '';
/**
* 选中激活状态
*
* @type {string}
* @memberof PanelTabPanelModel
*/
public clickActiviePage: string = '';
/**
* 分页子成员
*
* @type {any[]}
* @memberof PanelTabPanelModel
*/
public tabPages: any[] = [];
/**
* Creates an instance of PanelTabPanelModel.
* PanelTabPanelModel 实例
*
* @param {*} [opts={}]
* @memberof PanelTabPanelModel
*/
constructor(opts: any = {}) {
super(opts);
this.tabPages = [...opts.tabPages];
if (this.tabPages.length > 0) {
this.activiedPage = this.tabPages[0].name;
}
}
/**
* 设置激活分页
*
* @memberof PanelTabPanelModel
*/
public setActiviePage(): void {
if (!this.panel) {
return;
}
const detailsModel: any = this.panel.detailsModel;
const index = this.tabPages.findIndex((tabpage: any) => Object.is(tabpage.name, this.clickActiviePage) && Object.is(tabpage.name, this.activiedPage) && detailsModel[tabpage.name].visible);
if (index !== - 1) {
return;
}
this.tabPages.some((tabpage: any) => {
if (detailsModel[tabpage.name].visible) {
this.activiedPage = tabpage.name;
return true;
}
return false;
});
}
/**
* 选中页面
*
* @param {*} $event
* @returns {void}
* @memberof PanelTabPanelModel
*/
public clickPage($event: any): void {
if (!$event) {
return;
}
this.clickActiviePage = $event;
this.activiedPage = $event;
}
}
\ No newline at end of file
import { PanelDetailModel } from './panel-detail';
/**
* 用户控件模型
*
* @export
* @class PanelUserControlModel
* @extends {PanelDetailModel}
*/
export class PanelUserControlModel extends PanelDetailModel {
constructor(otps:any = {}) {
super(otps);
}
}
\ No newline at end of file
......@@ -152,15 +152,6 @@ export default class MsgOpenAccessEditViewBase extends Vue {
* @memberof MsgOpenAccessEditViewBase
*/
public appUIService: MsgOpenAccessUIService = new MsgOpenAccessUIService(this.$store);
/**
* 计数器服务对象集合
*
* @type {Array<*>}
* @memberof MsgOpenAccessEditViewBase
*/
public counterServiceArray:Array<any> = [];
/**
* 数据变化
......@@ -424,6 +415,15 @@ export default class MsgOpenAccessEditViewBase extends Vue {
*/
public viewCacheData:any;
/**
* 计数器服务对象集合
*
* @type {Array<*>}
* @memberof MsgOpenAccessEditViewBase
*/
public counterServiceArray:Array<any> = [];
/**
* 解析视图参数
*
......
......@@ -182,15 +182,6 @@ export default class MsgOpenAccessGridViewBase extends Vue {
* @memberof MsgOpenAccessGridViewBase
*/
public appUIService: MsgOpenAccessUIService = new MsgOpenAccessUIService(this.$store);
/**
* 计数器服务对象集合
*
* @type {Array<*>}
* @memberof MsgOpenAccessGridViewBase
*/
public counterServiceArray:Array<any> = [];
/**
* 数据变化
......@@ -459,6 +450,15 @@ export default class MsgOpenAccessGridViewBase extends Vue {
*/
public viewCacheData:any;
/**
* 计数器服务对象集合
*
* @type {Array<*>}
* @memberof MsgOpenAccessGridViewBase
*/
public counterServiceArray:Array<any> = [];
/**
* 解析视图参数
*
......
......@@ -79,15 +79,6 @@ export default class MsgOpenAccessPickupGridViewBase extends Vue {
* @memberof MsgOpenAccessPickupGridViewBase
*/
public appUIService: MsgOpenAccessUIService = new MsgOpenAccessUIService(this.$store);
/**
* 计数器服务对象集合
*
* @type {Array<*>}
* @memberof MsgOpenAccessPickupGridViewBase
*/
public counterServiceArray:Array<any> = [];
/**
* 数据变化
......@@ -314,6 +305,15 @@ export default class MsgOpenAccessPickupGridViewBase extends Vue {
*/
public viewCacheData:any;
/**
* 计数器服务对象集合
*
* @type {Array<*>}
* @memberof MsgOpenAccessPickupGridViewBase
*/
public counterServiceArray:Array<any> = [];
/**
* 解析视图参数
*
......
......@@ -64,15 +64,6 @@ export default class MsgOpenAccessPickupViewBase extends Vue {
* @memberof MsgOpenAccessPickupViewBase
*/
public appUIService: MsgOpenAccessUIService = new MsgOpenAccessUIService(this.$store);
/**
* 计数器服务对象集合
*
* @type {Array<*>}
* @memberof MsgOpenAccessPickupViewBase
*/
public counterServiceArray:Array<any> = [];
/**
* 数据变化
......@@ -307,6 +298,15 @@ export default class MsgOpenAccessPickupViewBase extends Vue {
*/
public viewCacheData:any;
/**
* 计数器服务对象集合
*
* @type {Array<*>}
* @memberof MsgOpenAccessPickupViewBase
*/
public counterServiceArray:Array<any> = [];
/**
* 解析视图参数
*
......
......@@ -152,15 +152,6 @@ export default class MsgTemplateEditViewBase extends Vue {
* @memberof MsgTemplateEditViewBase
*/
public appUIService: MsgTemplateUIService = new MsgTemplateUIService(this.$store);
/**
* 计数器服务对象集合
*
* @type {Array<*>}
* @memberof MsgTemplateEditViewBase
*/
public counterServiceArray:Array<any> = [];
/**
* 数据变化
......@@ -424,6 +415,15 @@ export default class MsgTemplateEditViewBase extends Vue {
*/
public viewCacheData:any;
/**
* 计数器服务对象集合
*
* @type {Array<*>}
* @memberof MsgTemplateEditViewBase
*/
public counterServiceArray:Array<any> = [];
/**
* 解析视图参数
*
......
......@@ -182,15 +182,6 @@ export default class MsgTemplateGridViewBase extends Vue {
* @memberof MsgTemplateGridViewBase
*/
public appUIService: MsgTemplateUIService = new MsgTemplateUIService(this.$store);
/**
* 计数器服务对象集合
*
* @type {Array<*>}
* @memberof MsgTemplateGridViewBase
*/
public counterServiceArray:Array<any> = [];
/**
* 数据变化
......@@ -459,6 +450,15 @@ export default class MsgTemplateGridViewBase extends Vue {
*/
public viewCacheData:any;
/**
* 计数器服务对象集合
*
* @type {Array<*>}
* @memberof MsgTemplateGridViewBase
*/
public counterServiceArray:Array<any> = [];
/**
* 解析视图参数
*
......
......@@ -152,15 +152,6 @@ export default class MsgUserAccountEditViewBase extends Vue {
* @memberof MsgUserAccountEditViewBase
*/
public appUIService: MsgUserAccountUIService = new MsgUserAccountUIService(this.$store);
/**
* 计数器服务对象集合
*
* @type {Array<*>}
* @memberof MsgUserAccountEditViewBase
*/
public counterServiceArray:Array<any> = [];
/**
* 数据变化
......@@ -424,6 +415,15 @@ export default class MsgUserAccountEditViewBase extends Vue {
*/
public viewCacheData:any;
/**
* 计数器服务对象集合
*
* @type {Array<*>}
* @memberof MsgUserAccountEditViewBase
*/
public counterServiceArray:Array<any> = [];
/**
* 解析视图参数
*
......
......@@ -182,15 +182,6 @@ export default class MsgUserAccountGridViewBase extends Vue {
* @memberof MsgUserAccountGridViewBase
*/
public appUIService: MsgUserAccountUIService = new MsgUserAccountUIService(this.$store);
/**
* 计数器服务对象集合
*
* @type {Array<*>}
* @memberof MsgUserAccountGridViewBase
*/
public counterServiceArray:Array<any> = [];
/**
* 数据变化
......@@ -459,6 +450,15 @@ export default class MsgUserAccountGridViewBase extends Vue {
*/
public viewCacheData:any;
/**
* 计数器服务对象集合
*
* @type {Array<*>}
* @memberof MsgUserAccountGridViewBase
*/
public counterServiceArray:Array<any> = [];
/**
* 解析视图参数
*
......
......@@ -77,15 +77,6 @@ import { Subject,Subscription } from 'rxjs';
},
})
export default class NotifyIndexViewBase extends Vue {
/**
* 计数器服务对象集合
*
* @type {Array<*>}
* @memberof NotifyIndexViewBase
*/
public counterServiceArray:Array<any> = [];
/**
* 数据变化
......@@ -288,6 +279,15 @@ export default class NotifyIndexViewBase extends Vue {
*/
public viewCacheData:any;
/**
* 计数器服务对象集合
*
* @type {Array<*>}
* @memberof NotifyIndexViewBase
*/
public counterServiceArray:Array<any> = [];
/**
* 解析视图参数
*
......
......@@ -2,6 +2,7 @@
@import '../theme/blue.theme.less';
@import '../theme/dark-blue.theme.less';
@import '../theme/default.theme.less';
@import './app-code-list.less';
@import './var.css';
.ibiz-page-tag .tags-body .tags-container .ivu-tag.tag-is-active .ivu-tag-text {
......
......@@ -12,8 +12,6 @@
<strong>We're sorry but app doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
</noscript>
<div id="app"></div>
<!-- <link rel="stylesheet" href="<%= BASE_URL %>assets/styles/loader.css">
<div class="loader" id="app-loader"></div> -->
<!-- built files will be auto injected -->
<script src="./environments/environment.js"></script>
</body>
</html>
......@@ -119,8 +119,12 @@ export class StudioActionUtil {
}, '*');
Vue.prototype.$message.warning('请在已打开的配置平台查看!');
} else {
console.log(`${Environment.StudioUrl}?ov=${JSON.stringify(params)}#/common_slnindex/srfkeys=${Environment.SlnId}/sysdesign_psdevslnsysmodeltreeexpview/srfkey=${Environment.SysId}`);
this.studioWin = window.open(`${Environment.StudioUrl}?ov=${encodeURIComponent(JSON.stringify(params))}#/common_slnindex/srfkeys=${Environment.SlnId}/sysdesign_psdevslnsysmodeltreeexpview/srfkey=${Environment.SysId}`, '_blank');
if(Environment.debugOpenMode === 'sln'){
console.log("打开sln未支持");
// this.studioWin = window.open(`${Environment.StudioUrl}?ov=${encodeURIComponent(JSON.stringify(params))}#/common_slnindex/srfkeys=${Environment.SlnId}/sysdesign_psdevslnsysmodeltreeexpview/srfkey=${Environment.SysId}`, '_blank');
}else{
this.studioWin = window.open(`${Environment.StudioUrl}?ov=${encodeURIComponent(JSON.stringify(params))}#/common_mosindex/srfkeys=${Environment.SysId}`, '_blank');
}
}
}
}
......
# util 工具包
## 工具包声明文件
......@@ -252,9 +252,10 @@ export class ViewTool {
* @memberof ViewTool
*/
public static calcActionItemAuthState(data:any,ActionModel:any,UIService:any){
let result: any[] = [];
for (const key in ActionModel) {
if (!ActionModel.hasOwnProperty(key)) {
return;
return result;
}
const _item = ActionModel[key];
if(_item && _item['dataaccaction'] && UIService){
......@@ -282,7 +283,9 @@ export class ViewTool {
_item.visabled = true;
_item.disabled = false;
}
result.push(dataActionResult);
}
}
return result;
}
}
\ No newline at end of file
......@@ -606,7 +606,7 @@ export default class NotifyIndexViewBase extends Vue implements ControlInterface
* @memberof NotifyIndexViewBase
*/
public handleMenusResource(inputMenus:Array<any>){
if(Environment.enablePermissionValid){
if(this.$store.getters['authresource/getEnablePermissionValid']){
this.computedEffectiveMenus(inputMenus);
this.computeParentMenus(inputMenus);
}
......
......@@ -121,6 +121,7 @@ import MsgOpenAccessUIService from '@/uiservice/msg-open-access/msg-open-access-
import { FormButtonModel, FormPageModel, FormItemModel, FormDRUIPartModel, FormPartModel, FormGroupPanelModel, FormIFrameModel, FormRowItemModel, FormTabPageModel, FormTabPanelModel, FormUserControlModel } from '@/model/form-detail';
import { debounceTime, distinctUntilChanged } from 'rxjs/operators';
import schema from 'async-validator';
import { Environment } from '@/environments/environment';
@Component({
......@@ -557,10 +558,10 @@ export default class MainBase extends Vue implements ControlInterface {
{ required: false, type: 'string', message: 'SecretKey(AppSecret) 值不能为空', trigger: 'blur' },
],
region_id: [
{ type: 'string', message: 'RegionId 值必须为字符串类型', trigger: 'change' },
{ type: 'string', message: 'RegionId 值必须为字符串类型', trigger: 'blur' },
{ required: false, type: 'string', message: 'RegionId 值不能为空', trigger: 'change' },
{ required: false, type: 'string', message: 'RegionId 值不能为空', trigger: 'blur' },
{ type: 'string', message: 'RegionId(CorpId) 值必须为字符串类型', trigger: 'change' },
{ type: 'string', message: 'RegionId(CorpId) 值必须为字符串类型', trigger: 'blur' },
{ required: false, type: 'string', message: 'RegionId(CorpId) 值不能为空', trigger: 'change' },
{ required: false, type: 'string', message: 'RegionId(CorpId) 值不能为空', trigger: 'blur' },
],
access_token: [
{ type: 'string', message: '管理账号token 值必须为字符串类型', trigger: 'change' },
......@@ -694,7 +695,7 @@ export default class MainBase extends Vue implements ControlInterface {
,
secret_key: new FormItemModel({ caption: 'SecretKey(AppSecret)', detailType: 'FORMITEM', name: 'secret_key', visible: true, isShowCaption: true, form: this, isControlledContent: false , disabled: false, enableCond: 3 })
,
region_id: new FormItemModel({ caption: 'RegionId', detailType: 'FORMITEM', name: 'region_id', visible: true, isShowCaption: true, form: this, isControlledContent: false , disabled: false, enableCond: 3 })
region_id: new FormItemModel({ caption: 'RegionId(CorpId)', detailType: 'FORMITEM', name: 'region_id', visible: true, isShowCaption: true, form: this, isControlledContent: false , disabled: false, enableCond: 3 })
,
access_token: new FormItemModel({ caption: '管理账号token', detailType: 'FORMITEM', name: 'access_token', visible: true, isShowCaption: true, form: this, isControlledContent: false , disabled: false, enableCond: 3 })
,
......@@ -1008,6 +1009,7 @@ export default class MainBase extends Vue implements ControlInterface {
Object.assign(this.context,{msgopenaccess:data.msgopenaccess})
}
this.setFormEnableCond(data);
this.computeButtonState(data);
this.fillForm(data,action);
this.oldData = {};
Object.assign(this.oldData, JSON.parse(JSON.stringify(this.data)));
......@@ -1185,10 +1187,12 @@ export default class MainBase extends Vue implements ControlInterface {
if(this.detailsModel && Object.keys(this.detailsModel).length >0){
Object.keys(this.detailsModel).forEach((name:any) =>{
if(this.detailsModel[name] && this.detailsModel[name].uiaction && this.detailsModel[name].uiaction.dataaccaction && Object.is(this.detailsModel[name].detailType,"BUTTON")){
this.detailsModel[name].isPower = true;
let tempUIAction:any = JSON.parse(JSON.stringify(this.detailsModel[name].uiaction));
ViewTool.calcActionItemAuthState(targetData,[tempUIAction],this.appUIService);
let result: any[] = ViewTool.calcActionItemAuthState(targetData,[tempUIAction],this.appUIService);
this.detailsModel[name].visible = tempUIAction.visabled;
this.detailsModel[name].disabled = tempUIAction.disabled;
this.detailsModel[name].isPower = result[0] === 1 ? true : false;
}
})
}
......@@ -1257,7 +1261,7 @@ export default class MainBase extends Vue implements ControlInterface {
this.refresh(data);
}
if (Object.is('panelaction', action)) {
this.panelAction(data.action,data.emitAction,data);
this.panelAction(data.action,data.emitAction,data.data);
}
});
}
......@@ -1368,7 +1372,6 @@ export default class MainBase extends Vue implements ControlInterface {
const data = response.data;
this.onFormLoad(data,'load');
this.$emit('load', data);
this.computeButtonState(data);
this.$nextTick(() => {
this.formState.next({ type: 'load', data: data });
});
......@@ -1412,7 +1415,6 @@ export default class MainBase extends Vue implements ControlInterface {
this.onFormLoad(data,'loadDraft');
data.msgopenaccess = null;
this.$emit('load', data);
this.computeButtonState(data);
this.$nextTick(() => {
this.formState.next({ type: 'load', data: data });
});
......@@ -1470,7 +1472,6 @@ export default class MainBase extends Vue implements ControlInterface {
const data = response.data;
this.onFormLoad(data,'autoSave');
this.$emit('save', data);
this.computeButtonState(data);
AppCenterService.notifyMessage({name:"MsgOpenAccess",action:'appRefresh',data:data});
this.$nextTick(() => {
this.formState.next({ type: 'save', data: data });
......@@ -1549,7 +1550,6 @@ export default class MainBase extends Vue implements ControlInterface {
const data = response.data;
this.onFormLoad(data,'save');
this.$emit('save', data);
this.computeButtonState(data);
AppCenterService.notifyMessage({name:"MsgOpenAccess",action:'appRefresh',data:data});
this.$nextTick(() => {
this.formState.next({ type: 'save', data: data });
......
......@@ -40,10 +40,14 @@
}
}
}
// 表单行间距
.app-form{
// 表单行间距
.app-form-item{
margin-bottom: 20px;
}
// 表单按钮margin
.app-form-button{
margin:0 6px;
}
}
// this is less
......@@ -125,6 +125,7 @@ import MainService from './main-grid-service';
import MsgOpenAccessUIService from '@/uiservice/msg-open-access/msg-open-access-ui-service';
import CodeListService from "@service/app/codelist-service";
import { FormItemModel } from '@/model/form-detail';
import { Environment } from '@/environments/environment';
@Component({
......@@ -637,7 +638,7 @@ export default class MainBase extends Vue implements ControlInterface {
},
{
name: 'region_id',
label: 'RegionId',
label: 'RegionId(CorpId)',
langtag: 'entities.msgopenaccess.main_grid.columns.region_id',
show: true,
unit: 'PX',
......@@ -659,8 +660,8 @@ export default class MainBase extends Vue implements ControlInterface {
* @memberof MainBase
*/
public getActionState(data:any){
let targetData:any = this.transformData(data);
let tempActionModel:any = JSON.parse(JSON.stringify(this.ActionModel));
let targetData:any = this.transformData(data);
ViewTool.calcActionItemAuthState(targetData,tempActionModel,this.appUIService);
return tempActionModel;
}
......
......@@ -138,6 +138,7 @@ import MsgTemplateUIService from '@/uiservice/msg-template/msg-template-ui-servi
import { FormButtonModel, FormPageModel, FormItemModel, FormDRUIPartModel, FormPartModel, FormGroupPanelModel, FormIFrameModel, FormRowItemModel, FormTabPageModel, FormTabPanelModel, FormUserControlModel } from '@/model/form-detail';
import { debounceTime, distinctUntilChanged } from 'rxjs/operators';
import schema from 'async-validator';
import { Environment } from '@/environments/environment';
@Component({
......@@ -1050,6 +1051,7 @@ export default class MainBase extends Vue implements ControlInterface {
Object.assign(this.context,{msgtemplate:data.msgtemplate})
}
this.setFormEnableCond(data);
this.computeButtonState(data);
this.fillForm(data,action);
this.oldData = {};
Object.assign(this.oldData, JSON.parse(JSON.stringify(this.data)));
......@@ -1227,10 +1229,12 @@ export default class MainBase extends Vue implements ControlInterface {
if(this.detailsModel && Object.keys(this.detailsModel).length >0){
Object.keys(this.detailsModel).forEach((name:any) =>{
if(this.detailsModel[name] && this.detailsModel[name].uiaction && this.detailsModel[name].uiaction.dataaccaction && Object.is(this.detailsModel[name].detailType,"BUTTON")){
this.detailsModel[name].isPower = true;
let tempUIAction:any = JSON.parse(JSON.stringify(this.detailsModel[name].uiaction));
ViewTool.calcActionItemAuthState(targetData,[tempUIAction],this.appUIService);
let result: any[] = ViewTool.calcActionItemAuthState(targetData,[tempUIAction],this.appUIService);
this.detailsModel[name].visible = tempUIAction.visabled;
this.detailsModel[name].disabled = tempUIAction.disabled;
this.detailsModel[name].isPower = result[0] === 1 ? true : false;
}
})
}
......@@ -1299,7 +1303,7 @@ export default class MainBase extends Vue implements ControlInterface {
this.refresh(data);
}
if (Object.is('panelaction', action)) {
this.panelAction(data.action,data.emitAction,data);
this.panelAction(data.action,data.emitAction,data.data);
}
});
}
......@@ -1410,7 +1414,6 @@ export default class MainBase extends Vue implements ControlInterface {
const data = response.data;
this.onFormLoad(data,'load');
this.$emit('load', data);
this.computeButtonState(data);
this.$nextTick(() => {
this.formState.next({ type: 'load', data: data });
});
......@@ -1454,7 +1457,6 @@ export default class MainBase extends Vue implements ControlInterface {
this.onFormLoad(data,'loadDraft');
data.msgtemplate = null;
this.$emit('load', data);
this.computeButtonState(data);
this.$nextTick(() => {
this.formState.next({ type: 'load', data: data });
});
......@@ -1512,7 +1514,6 @@ export default class MainBase extends Vue implements ControlInterface {
const data = response.data;
this.onFormLoad(data,'autoSave');
this.$emit('save', data);
this.computeButtonState(data);
AppCenterService.notifyMessage({name:"MsgTemplate",action:'appRefresh',data:data});
this.$nextTick(() => {
this.formState.next({ type: 'save', data: data });
......@@ -1591,7 +1592,6 @@ export default class MainBase extends Vue implements ControlInterface {
const data = response.data;
this.onFormLoad(data,'save');
this.$emit('save', data);
this.computeButtonState(data);
AppCenterService.notifyMessage({name:"MsgTemplate",action:'appRefresh',data:data});
this.$nextTick(() => {
this.formState.next({ type: 'save', data: data });
......
......@@ -40,10 +40,14 @@
}
}
}
// 表单行间距
.app-form{
// 表单行间距
.app-form-item{
margin-bottom: 20px;
}
// 表单按钮margin
.app-form-button{
margin:0 6px;
}
}
// this is less
......@@ -139,6 +139,7 @@ import MainService from './main-grid-service';
import MsgTemplateUIService from '@/uiservice/msg-template/msg-template-ui-service';
import CodeListService from "@service/app/codelist-service";
import { FormItemModel } from '@/model/form-detail';
import { Environment } from '@/environments/environment';
@Component({
......@@ -681,8 +682,8 @@ export default class MainBase extends Vue implements ControlInterface {
* @memberof MainBase
*/
public getActionState(data:any){
let targetData:any = this.transformData(data);
let tempActionModel:any = JSON.parse(JSON.stringify(this.ActionModel));
let targetData:any = this.transformData(data);
ViewTool.calcActionItemAuthState(targetData,tempActionModel,this.appUIService);
return tempActionModel;
}
......
......@@ -71,6 +71,7 @@ import MsgUserAccountUIService from '@/uiservice/msg-user-account/msg-user-accou
import { FormButtonModel, FormPageModel, FormItemModel, FormDRUIPartModel, FormPartModel, FormGroupPanelModel, FormIFrameModel, FormRowItemModel, FormTabPageModel, FormTabPanelModel, FormUserControlModel } from '@/model/form-detail';
import { debounceTime, distinctUntilChanged } from 'rxjs/operators';
import schema from 'async-validator';
import { Environment } from '@/environments/environment';
@Component({
......@@ -867,6 +868,7 @@ export default class MainBase extends Vue implements ControlInterface {
Object.assign(this.context,{msguseraccount:data.msguseraccount})
}
this.setFormEnableCond(data);
this.computeButtonState(data);
this.fillForm(data,action);
this.oldData = {};
Object.assign(this.oldData, JSON.parse(JSON.stringify(this.data)));
......@@ -1044,10 +1046,12 @@ export default class MainBase extends Vue implements ControlInterface {
if(this.detailsModel && Object.keys(this.detailsModel).length >0){
Object.keys(this.detailsModel).forEach((name:any) =>{
if(this.detailsModel[name] && this.detailsModel[name].uiaction && this.detailsModel[name].uiaction.dataaccaction && Object.is(this.detailsModel[name].detailType,"BUTTON")){
this.detailsModel[name].isPower = true;
let tempUIAction:any = JSON.parse(JSON.stringify(this.detailsModel[name].uiaction));
ViewTool.calcActionItemAuthState(targetData,[tempUIAction],this.appUIService);
let result: any[] = ViewTool.calcActionItemAuthState(targetData,[tempUIAction],this.appUIService);
this.detailsModel[name].visible = tempUIAction.visabled;
this.detailsModel[name].disabled = tempUIAction.disabled;
this.detailsModel[name].isPower = result[0] === 1 ? true : false;
}
})
}
......@@ -1116,7 +1120,7 @@ export default class MainBase extends Vue implements ControlInterface {
this.refresh(data);
}
if (Object.is('panelaction', action)) {
this.panelAction(data.action,data.emitAction,data);
this.panelAction(data.action,data.emitAction,data.data);
}
});
}
......@@ -1227,7 +1231,6 @@ export default class MainBase extends Vue implements ControlInterface {
const data = response.data;
this.onFormLoad(data,'load');
this.$emit('load', data);
this.computeButtonState(data);
this.$nextTick(() => {
this.formState.next({ type: 'load', data: data });
});
......@@ -1271,7 +1274,6 @@ export default class MainBase extends Vue implements ControlInterface {
this.onFormLoad(data,'loadDraft');
data.msguseraccount = null;
this.$emit('load', data);
this.computeButtonState(data);
this.$nextTick(() => {
this.formState.next({ type: 'load', data: data });
});
......@@ -1329,7 +1331,6 @@ export default class MainBase extends Vue implements ControlInterface {
const data = response.data;
this.onFormLoad(data,'autoSave');
this.$emit('save', data);
this.computeButtonState(data);
AppCenterService.notifyMessage({name:"MsgUserAccount",action:'appRefresh',data:data});
this.$nextTick(() => {
this.formState.next({ type: 'save', data: data });
......@@ -1408,7 +1409,6 @@ export default class MainBase extends Vue implements ControlInterface {
const data = response.data;
this.onFormLoad(data,'save');
this.$emit('save', data);
this.computeButtonState(data);
AppCenterService.notifyMessage({name:"MsgUserAccount",action:'appRefresh',data:data});
this.$nextTick(() => {
this.formState.next({ type: 'save', data: data });
......
......@@ -40,10 +40,14 @@
}
}
}
// 表单行间距
.app-form{
// 表单行间距
.app-form-item{
margin-bottom: 20px;
}
// 表单按钮margin
.app-form-button{
margin:0 6px;
}
}
// this is less
......@@ -113,6 +113,7 @@ import MainService from './main-grid-service';
import MsgUserAccountUIService from '@/uiservice/msg-user-account/msg-user-account-ui-service';
import CodeListService from "@service/app/codelist-service";
import { FormItemModel } from '@/model/form-detail';
import { Environment } from '@/environments/environment';
@Component({
......@@ -639,8 +640,8 @@ export default class MainBase extends Vue implements ControlInterface {
* @memberof MainBase
*/
public getActionState(data:any){
let targetData:any = this.transformData(data);
let tempActionModel:any = JSON.parse(JSON.stringify(this.ActionModel));
let targetData:any = this.transformData(data);
ViewTool.calcActionItemAuthState(targetData,tempActionModel,this.appUIService);
return tempActionModel;
}
......
此差异已折叠。
......@@ -43,6 +43,10 @@ zuul:
path: /dictionarys/**/Ibzou**
serviceId: ${ibiz.ref.service.ou:ibzou-api}
stripPrefix: false
ou:
path: /ibzdepartments/**
serviceId: ${ibiz.ref.service.ou:ibzou-api}
stripPrefix: false
uaadict:
path: /dictionarys/**/SysOperator
serviceId: ${ibiz.ref.service.uaa:ibzuaa-api}
......
......@@ -28,6 +28,10 @@ zuul:
path: /dictionarys/**/Ibzou**
serviceId: ${ibiz.ref.service.ou:ibzou-api}
stripPrefix: false
ou:
path: /ibzdepartments/**
serviceId: ${ibiz.ref.service.ou:ibzou-api}
stripPrefix: false
uaadict:
path: /dictionarys/**/SysOperator
serviceId: ${ibiz.ref.service.uaa:ibzuaa-api}
......
package cn.ibizlab.core.notify.domain;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.math.BigInteger;
import java.util.HashMap;
import java.math.BigDecimal;
import java.text.SimpleDateFormat;
import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.util.ObjectUtils;
import org.springframework.util.DigestUtils;
import cn.ibizlab.util.domain.EntityBase;
import cn.ibizlab.util.annotation.DEField;
import cn.ibizlab.util.enums.DEPredefinedFieldType;
import cn.ibizlab.util.enums.DEFieldDefaultValueType;
import java.io.Serializable;
import lombok.*;
import org.springframework.data.annotation.Transient;
import cn.ibizlab.util.annotation.Audit;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.baomidou.mybatisplus.annotation.*;
import cn.ibizlab.util.domain.EntityMP;
/**
* 实体[消息]
*/
@Getter
@Setter
@NoArgsConstructor
@JsonIgnoreProperties(value = "handler")
@TableName(value = "IBZMSGBODY",resultMap = "MsgBodyResultMap")
public class MsgBody extends EntityMP implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 消息模板标识
*/
@TableField(value = "templateid")
@JSONField(name = "template_id")
@JsonProperty("template_id")
private String templateId;
/**
* 消息类型
*/
@TableField(value = "msgtype")
@JSONField(name = "msg_type")
@JsonProperty("msg_type")
private Integer msgType;
/**
* 目标用户
*/
@TableField(value = "tousers")
@JSONField(name = "to_users")
@JsonProperty("to_users")
private String toUsers;
/**
* 消息模板参数
*/
@DEField(name = "templparams")
@TableField(value = "templparams")
@JSONField(name = "template_params")
@JsonProperty("template_params")
private String templateParams;
/**
* 是否发送
*/
@TableField(value = "issend")
@JSONField(name = "is_send")
@JsonProperty("is_send")
private Integer isSend;
/**
* 是否出错
*/
@TableField(value = "iserror")
@JSONField(name = "is_error")
@JsonProperty("is_error")
private Integer isError;
/**
* 消息标题
*/
@TableField(value = "subject")
@JSONField(name = "subject")
@JsonProperty("subject")
private String subject;
/**
* 消息内容
*/
@TableField(value = "content")
@JSONField(name = "content")
@JsonProperty("content")
private String content;
/**
* 消息链接
*/
@TableField(value = "msglink")
@JSONField(name = "msg_link")
@JsonProperty("msg_link")
private String msgLink;
/**
* 用户数据
*/
@TableField(value = "userdata")
@JSONField(name = "user_data")
@JsonProperty("user_data")
private String userData;
/**
* 消息标识
*/
@DEField(isKeyField=true)
@TableId(value= "msgid",type=IdType.ASSIGN_UUID)
@JSONField(name = "msg_id")
@JsonProperty("msg_id")
private String msgId;
/**
* 消息名称
*/
@TableField(value = "msgname")
@JSONField(name = "msg_name")
@JsonProperty("msg_name")
private String msgName;
/**
* 设置 [消息模板标识]
*/
public void setTemplateId(String templateId){
this.templateId = templateId ;
this.modify("templateid",templateId);
}
/**
* 设置 [消息类型]
*/
public void setMsgType(Integer msgType){
this.msgType = msgType ;
this.modify("msgtype",msgType);
}
/**
* 设置 [目标用户]
*/
public void setToUsers(String toUsers){
this.toUsers = toUsers ;
this.modify("tousers",toUsers);
}
/**
* 设置 [消息模板参数]
*/
public void setTemplateParams(String templateParams){
this.templateParams = templateParams ;
this.modify("templparams",templateParams);
}
/**
* 设置 [是否发送]
*/
public void setIsSend(Integer isSend){
this.isSend = isSend ;
this.modify("issend",isSend);
}
/**
* 设置 [是否出错]
*/
public void setIsError(Integer isError){
this.isError = isError ;
this.modify("iserror",isError);
}
/**
* 设置 [消息标题]
*/
public void setSubject(String subject){
this.subject = subject ;
this.modify("subject",subject);
}
/**
* 设置 [消息内容]
*/
public void setContent(String content){
this.content = content ;
this.modify("content",content);
}
/**
* 设置 [消息链接]
*/
public void setMsgLink(String msgLink){
this.msgLink = msgLink ;
this.modify("msglink",msgLink);
}
/**
* 设置 [用户数据]
*/
public void setUserData(String userData){
this.userData = userData ;
this.modify("userdata",userData);
}
/**
* 设置 [消息名称]
*/
public void setMsgName(String msgName){
this.msgName = msgName ;
this.modify("msgname",msgName);
}
}
......@@ -81,7 +81,7 @@ public class MsgOpenAccess extends EntityMP implements Serializable {
@JsonProperty("secret_key")
private String secretKey;
/**
* RegionId
* RegionId(CorpId)
*/
@DEField(name = "region_id")
@TableField(value = "region_id")
......@@ -157,7 +157,7 @@ public class MsgOpenAccess extends EntityMP implements Serializable {
}
/**
* 设置 [RegionId]
* 设置 [RegionId(CorpId)]
*/
public void setRegionId(String regionId){
this.regionId = regionId ;
......
package cn.ibizlab.core.notify.filter;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.HashMap;
import lombok.*;
import lombok.extern.slf4j.Slf4j;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.alibaba.fastjson.annotation.JSONField;
import org.springframework.util.ObjectUtils;
import org.springframework.util.StringUtils;
import cn.ibizlab.util.filter.QueryWrapperContext;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import cn.ibizlab.core.notify.domain.MsgBody;
/**
* 关系型数据实体[MsgBody] 查询条件对象
*/
@Slf4j
@Data
public class MsgBodySearchContext extends QueryWrapperContext<MsgBody> {
private Integer n_msgtype_eq;//[消息类型]
public void setN_msgtype_eq(Integer n_msgtype_eq) {
this.n_msgtype_eq = n_msgtype_eq;
if(!ObjectUtils.isEmpty(this.n_msgtype_eq)){
this.getSearchCond().eq("msgtype", n_msgtype_eq);
}
}
private String n_msgname_like;//[消息名称]
public void setN_msgname_like(String n_msgname_like) {
this.n_msgname_like = n_msgname_like;
if(!ObjectUtils.isEmpty(this.n_msgname_like)){
this.getSearchCond().like("msgname", n_msgname_like);
}
}
/**
* 启用快速搜索
*/
public void setQuery(String query)
{
this.query=query;
if(!StringUtils.isEmpty(query)){
this.getSearchCond().and( wrapper ->
wrapper.like("msgname", query)
);
}
}
}
package cn.ibizlab.core.notify.mapper;
import java.util.List;
import org.apache.ibatis.annotations.*;
import java.util.Map;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import java.util.HashMap;
import org.apache.ibatis.annotations.Select;
import cn.ibizlab.core.notify.domain.MsgBody;
import cn.ibizlab.core.notify.filter.MsgBodySearchContext;
import org.springframework.cache.annotation.CacheEvict;
import org.springframework.cache.annotation.Cacheable;
import java.io.Serializable;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.alibaba.fastjson.JSONObject;
public interface MsgBodyMapper extends BaseMapper<MsgBody>{
Page<MsgBody> searchDefault(IPage page, @Param("srf") MsgBodySearchContext context, @Param("ew") Wrapper<MsgBody> wrapper) ;
@Override
MsgBody selectById(Serializable id);
@Override
int insert(MsgBody entity);
@Override
int updateById(@Param(Constants.ENTITY) MsgBody entity);
@Override
int update(@Param(Constants.ENTITY) MsgBody entity, @Param("ew") Wrapper<MsgBody> updateWrapper);
@Override
int deleteById(Serializable id);
/**
* 自定义查询SQL
* @param sql
* @return
*/
@Select("${sql}")
List<JSONObject> selectBySQL(@Param("sql") String sql, @Param("et")Map param);
/**
* 自定义更新SQL
* @param sql
* @return
*/
@Update("${sql}")
boolean updateBySQL(@Param("sql") String sql, @Param("et")Map param);
/**
* 自定义插入SQL
* @param sql
* @return
*/
@Insert("${sql}")
boolean insertBySQL(@Param("sql") String sql, @Param("et")Map param);
/**
* 自定义删除SQL
* @param sql
* @return
*/
@Delete("${sql}")
boolean deleteBySQL(@Param("sql") String sql, @Param("et")Map param);
}
package cn.ibizlab.core.notify.service;
import java.io.Serializable;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.HashMap;
import java.util.Collection;
import java.math.BigInteger;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.scheduling.annotation.Async;
import com.alibaba.fastjson.JSONObject;
import org.springframework.cache.annotation.CacheEvict;
import cn.ibizlab.core.notify.domain.MsgBody;
import cn.ibizlab.core.notify.filter.MsgBodySearchContext;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* 实体[MsgBody] 服务对象接口
*/
public interface IMsgBodyService extends IService<MsgBody>{
boolean create(MsgBody et) ;
void createBatch(List<MsgBody> list) ;
boolean update(MsgBody et) ;
void updateBatch(List<MsgBody> list) ;
boolean remove(String key) ;
void removeBatch(Collection<String> idList) ;
MsgBody get(String key) ;
MsgBody getDraft(MsgBody et) ;
boolean checkKey(MsgBody et) ;
boolean save(MsgBody et) ;
void saveBatch(List<MsgBody> list) ;
Page<MsgBody> searchDefault(MsgBodySearchContext context) ;
/**
*自定义查询SQL
* @param sql select * from table where id =#{et.param}
* @param param 参数列表 param.put("param","1");
* @return select * from table where id = '1'
*/
List<JSONObject> select(String sql, Map param);
/**
*自定义SQL
* @param sql update table set name ='test' where id =#{et.param}
* @param param 参数列表 param.put("param","1");
* @return update table set name ='test' where id = '1'
*/
boolean execute(String sql, Map param);
}
......@@ -11,6 +11,7 @@ import java.math.BigInteger;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.scheduling.annotation.Async;
import com.alibaba.fastjson.JSONObject;
import org.springframework.cache.annotation.CacheEvict;
......
......@@ -11,6 +11,7 @@ import java.math.BigInteger;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.scheduling.annotation.Async;
import com.alibaba.fastjson.JSONObject;
import org.springframework.cache.annotation.CacheEvict;
......
......@@ -11,6 +11,7 @@ import java.math.BigInteger;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.scheduling.annotation.Async;
import com.alibaba.fastjson.JSONObject;
import org.springframework.cache.annotation.CacheEvict;
......
package cn.ibizlab.core.notify.service.impl;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import java.util.Set;
import java.util.Map;
import java.util.HashSet;
import java.util.HashMap;
import java.util.Collection;
import java.util.Objects;
import java.util.Optional;
import java.math.BigInteger;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cglib.beans.BeanCopier;
import org.springframework.stereotype.Service;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageImpl;
import org.springframework.data.domain.Pageable;
import org.springframework.util.ObjectUtils;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.context.annotation.Lazy;
import cn.ibizlab.core.notify.domain.MsgBody;
import cn.ibizlab.core.notify.filter.MsgBodySearchContext;
import cn.ibizlab.core.notify.service.IMsgBodyService;
import cn.ibizlab.util.helper.CachedBeanCopier;
import cn.ibizlab.util.helper.DEFieldCacheMap;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import cn.ibizlab.core.notify.mapper.MsgBodyMapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.alibaba.fastjson.JSONObject;
import org.springframework.util.StringUtils;
/**
* 实体[消息] 服务对象接口实现
*/
@Slf4j
@Service("MsgBodyServiceImpl")
public class MsgBodyServiceImpl extends ServiceImpl<MsgBodyMapper, MsgBody> implements IMsgBodyService {
protected int batchSize = 500;
@Override
@Transactional
public boolean create(MsgBody et) {
if(!this.retBool(this.baseMapper.insert(et)))
return false;
CachedBeanCopier.copy(get(et.getMsgId()),et);
return true;
}
@Override
public void createBatch(List<MsgBody> list) {
this.saveBatch(list,batchSize);
}
@Override
@Transactional
public boolean update(MsgBody et) {
if(!update(et,(Wrapper) et.getUpdateWrapper(true).eq("msgid",et.getMsgId())))
return false;
CachedBeanCopier.copy(get(et.getMsgId()),et);
return true;
}
@Override
public void updateBatch(List<MsgBody> list) {
updateBatchById(list,batchSize);
}
@Override
@Transactional
public boolean remove(String key) {
boolean result=removeById(key);
return result ;
}
@Override
public void removeBatch(Collection<String> idList) {
removeByIds(idList);
}
@Override
@Transactional
public MsgBody get(String key) {
MsgBody et = getById(key);
if(et==null){
et=new MsgBody();
et.setMsgId(key);
}
else{
}
return et;
}
@Override
public MsgBody getDraft(MsgBody et) {
return et;
}
@Override
public boolean checkKey(MsgBody et) {
return (!ObjectUtils.isEmpty(et.getMsgId()))&&(!Objects.isNull(this.getById(et.getMsgId())));
}
@Override
@Transactional
public boolean save(MsgBody et) {
if(!saveOrUpdate(et))
return false;
return true;
}
@Override
@Transactional
public boolean saveOrUpdate(MsgBody et) {
if (null == et) {
return false;
} else {
return checkKey(et) ? this.update(et) : this.create(et);
}
}
@Override
public boolean saveBatch(Collection<MsgBody> list) {
saveOrUpdateBatch(list,batchSize);
return true;
}
@Override
public void saveBatch(List<MsgBody> list) {
saveOrUpdateBatch(list,batchSize);
}
/**
* 查询集合 数据集
*/
@Override
public Page<MsgBody> searchDefault(MsgBodySearchContext context) {
com.baomidou.mybatisplus.extension.plugins.pagination.Page<MsgBody> pages=baseMapper.searchDefault(context.getPages(),context,context.getSelectCond());
return new PageImpl<MsgBody>(pages.getRecords(), context.getPageable(), pages.getTotal());
}
@Override
public List<JSONObject> select(String sql, Map param){
return this.baseMapper.selectBySQL(sql,param);
}
@Override
@Transactional
public boolean execute(String sql , Map param){
if (sql == null || sql.isEmpty()) {
return false;
}
if (sql.toLowerCase().trim().startsWith("insert")) {
return this.baseMapper.insertBySQL(sql,param);
}
if (sql.toLowerCase().trim().startsWith("update")) {
return this.baseMapper.updateBySQL(sql,param);
}
if (sql.toLowerCase().trim().startsWith("delete")) {
return this.baseMapper.deleteBySQL(sql,param);
}
log.warn("暂未支持的SQL语法");
return true;
}
}
......@@ -21,6 +21,7 @@ import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageImpl;
import org.springframework.data.domain.Pageable;
import org.springframework.util.ObjectUtils;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.context.annotation.Lazy;
import cn.ibizlab.core.notify.domain.MsgOpenAccess;
......
......@@ -21,6 +21,7 @@ import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageImpl;
import org.springframework.data.domain.Pageable;
import org.springframework.util.ObjectUtils;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.context.annotation.Lazy;
import cn.ibizlab.core.notify.domain.MsgTemplate;
......
......@@ -21,6 +21,7 @@ import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageImpl;
import org.springframework.data.domain.Pageable;
import org.springframework.util.ObjectUtils;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.context.annotation.Lazy;
import cn.ibizlab.core.notify.domain.MsgUserAccount;
......
<?xml version="1.1" encoding="UTF-8" standalone="no"?>
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog" xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog-ext http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.6.xsd">
<!--输出实体[MSG_OPEN_ACCESS]数据结构 -->
<changeSet author="a_A_5d9d78509" id="tab-msg_open_access-30-1">
<createTable tableName="IBZOPENACCESS">
<column name="ACCESSID" remarks="" type="VARCHAR(100)">
<constraints primaryKey="true" primaryKeyName="PK_MSG_OPEN_ACCESS_ACCESSID"/>
</column>
<column name="ACCESSNAME" remarks="" type="VARCHAR(100)">
</column>
<column name="OPEN_TYPE" remarks="" type="VARCHAR(100)">
</column>
<column name="ACCESS_KEY" remarks="" type="VARCHAR(100)">
</column>
<column name="SECRET_KEY" remarks="" type="VARCHAR(100)">
</column>
<column name="REGION_ID" remarks="" type="VARCHAR(100)">
</column>
<column name="ACCESS_TOKEN" remarks="" type="VARCHAR(1000)">
</column>
<column name="EXPIRES_TIME" remarks="" type="DATETIME">
</column>
<column name="DISABLED" remarks="" type="INT">
</column>
<column name="REDIRECT_URI" remarks="" type="VARCHAR(500)">
</column>
</createTable>
</changeSet>
<!--输出实体[MSG_TEMPLATE]数据结构 -->
<changeSet author="a_A_5d9d78509" id="tab-msg_template-101-2">
<createTable tableName="IBZMSGTEMPL">
<column name="TID" remarks="" type="VARCHAR(100)">
<constraints primaryKey="true" primaryKeyName="PK_MSG_TEMPLATE_TID"/>
</column>
<column name="TEMPLATE_NAME" remarks="" type="VARCHAR(100)">
</column>
<column name="TEMPLATE_TYPE" remarks="" type="VARCHAR(100)">
</column>
<column name="CONTENT" remarks="" type="VARCHAR(4000)">
</column>
<column name="TEMPLATE_ID" remarks="" type="VARCHAR(100)">
</column>
<column name="TEMPLATE_URL" remarks="" type="VARCHAR(1000)">
</column>
<column name="ACCESSID" remarks="" type="VARCHAR(100)">
</column>
<column name="ACCESSNAME" remarks="" type="VARCHAR(100)">
</column>
<column name="OPEN_TYPE" remarks="" type="VARCHAR(100)">
</column>
</createTable>
</changeSet>
<!--输出实体[MSG_USER_ACCOUNT]数据结构 -->
<changeSet author="a_A_5d9d78509" id="tab-msg_user_account-54-3">
<createTable tableName="IBZUSERAUTH">
<column name="AUTHID" remarks="" type="VARCHAR(100)">
<constraints primaryKey="true" primaryKeyName="PK_MSG_USER_ACCOUNT_AUTHID"/>
</column>
<column name="USERID" remarks="" type="VARCHAR(100)">
</column>
<column name="IDENTITY_TYPE" remarks="" type="VARCHAR(100)">
</column>
<column name="IDENTIFIER" remarks="" type="VARCHAR(200)">
</column>
<column name="CREDENTIAL" remarks="" type="VARCHAR(500)">
</column>
</createTable>
</changeSet>
<!--输出实体[MSG_OPEN_ACCESS]外键关系 -->
<!--输出实体[MSG_TEMPLATE]外键关系 -->
<!--输出实体[MSG_USER_ACCOUNT]外键关系 -->
</databaseChangeLog>
!!!!模版产生代码错误:----
Tip: If the failing expression is known to be legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing</#if>. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)??
----
----
FTL stack trace ("~" means nesting-related):
- Failed at: ${dbinst.getUserName()} [in template "CODETEMPL_zh_CN" at line 28, column 24]
----
\ No newline at end of file
此文件只用于让模板能发出[rollback]文件夹,无实际用途
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="cn.ibizlab.core.notify.mapper.MsgBodyMapper">
<!--该方法用于重写mybatis中selectById方法,以实现查询逻辑属性-->
<select id="selectById" resultMap="MsgBodyResultMap" databaseId="oracle">
<![CDATA[select t1.* from (SELECT t1.CONTENT, t1.ISERROR, t1.ISSEND, t1.MSGID, t1.MSGLINK, t1.MSGNAME, t1.MSGTYPE, t1.SUBJECT, t1.TEMPLATEID, t1.TEMPLPARAMS, t1.TOUSERS, t1.USERDATA FROM IBZMSGBODY t1 ) t1 where msgid=#{id}]]>
</select>
<!--通过mybatis将查询结果注入到entity中,通过配置autoMapping="true"由mybatis自动处理映射关系 -->
<resultMap id="MsgBodyResultMap" type="cn.ibizlab.core.notify.domain.MsgBody" autoMapping="true">
<id property="msgId" column="msgid" /><!--主键字段映射-->
<result property="templateParams" column="templparams" />
</resultMap>
<!--数据集合[Default]-->
<select id="searchDefault" parameterType="cn.ibizlab.core.notify.filter.MsgBodySearchContext" resultMap="MsgBodyResultMap">
select t1.* from (
<include refid="Default" />
)t1
<where><if test="ew!=null and ew.sqlSegment!=null and !ew.emptyOfWhere">${ew.sqlSegment}</if></where>
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">${ew.sqlSegment}</if>
</select>
<!--数据查询[Default]-->
<sql id="Default" databaseId="oracle">
<![CDATA[ SELECT t1.CONTENT, t1.ISERROR, t1.ISSEND, t1.MSGID, t1.MSGLINK, t1.MSGNAME, t1.MSGTYPE, t1.SUBJECT, t1.TEMPLATEID, t1.TOUSERS, t1.USERDATA FROM IBZMSGBODY t1
]]>
</sql>
<!--数据查询[View]-->
<sql id="View" databaseId="oracle">
<![CDATA[ SELECT t1.CONTENT, t1.ISERROR, t1.ISSEND, t1.MSGID, t1.MSGLINK, t1.MSGNAME, t1.MSGTYPE, t1.SUBJECT, t1.TEMPLATEID, t1.TEMPLPARAMS, t1.TOUSERS, t1.USERDATA FROM IBZMSGBODY t1
]]>
</sql>
</mapper>
......@@ -11,7 +11,6 @@ import com.alibaba.fastjson.JSONObject;
import javax.servlet.ServletRequest;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cglib.beans.BeanCopier;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;
import org.springframework.http.HttpStatus;
......@@ -50,7 +49,6 @@ public class MsgOpenAccessResource {
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibznotify-MsgOpenAccess-Create-all')")
@ApiOperation(value = "新建接入开放平台", tags = {"接入开放平台" }, notes = "新建接入开放平台")
@RequestMapping(method = RequestMethod.POST, value = "/msgopenaccesses")
@Transactional
public ResponseEntity<MsgOpenAccessDTO> create(@RequestBody MsgOpenAccessDTO msgopenaccessdto) {
MsgOpenAccess domain = msgopenaccessMapping.toDomain(msgopenaccessdto);
msgopenaccessService.create(domain);
......@@ -69,7 +67,6 @@ public class MsgOpenAccessResource {
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibznotify-MsgOpenAccess-Update-all')")
@ApiOperation(value = "更新接入开放平台", tags = {"接入开放平台" }, notes = "更新接入开放平台")
@RequestMapping(method = RequestMethod.PUT, value = "/msgopenaccesses/{msgopenaccess_id}")
@Transactional
public ResponseEntity<MsgOpenAccessDTO> update(@PathVariable("msgopenaccess_id") String msgopenaccess_id, @RequestBody MsgOpenAccessDTO msgopenaccessdto) {
MsgOpenAccess domain = msgopenaccessMapping.toDomain(msgopenaccessdto);
domain .setId(msgopenaccess_id);
......@@ -89,7 +86,6 @@ public class MsgOpenAccessResource {
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibznotify-MsgOpenAccess-Remove-all')")
@ApiOperation(value = "删除接入开放平台", tags = {"接入开放平台" }, notes = "删除接入开放平台")
@RequestMapping(method = RequestMethod.DELETE, value = "/msgopenaccesses/{msgopenaccess_id}")
@Transactional
public ResponseEntity<Boolean> remove(@PathVariable("msgopenaccess_id") String msgopenaccess_id) {
return ResponseEntity.status(HttpStatus.OK).body(msgopenaccessService.remove(msgopenaccess_id));
}
......
......@@ -11,7 +11,6 @@ import com.alibaba.fastjson.JSONObject;
import javax.servlet.ServletRequest;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cglib.beans.BeanCopier;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;
import org.springframework.http.HttpStatus;
......@@ -50,7 +49,6 @@ public class MsgTemplateResource {
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibznotify-MsgTemplate-Create-all')")
@ApiOperation(value = "新建消息模板", tags = {"消息模板" }, notes = "新建消息模板")
@RequestMapping(method = RequestMethod.POST, value = "/msgtemplates")
@Transactional
public ResponseEntity<MsgTemplateDTO> create(@RequestBody MsgTemplateDTO msgtemplatedto) {
MsgTemplate domain = msgtemplateMapping.toDomain(msgtemplatedto);
msgtemplateService.create(domain);
......@@ -69,7 +67,6 @@ public class MsgTemplateResource {
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibznotify-MsgTemplate-Update-all')")
@ApiOperation(value = "更新消息模板", tags = {"消息模板" }, notes = "更新消息模板")
@RequestMapping(method = RequestMethod.PUT, value = "/msgtemplates/{msgtemplate_id}")
@Transactional
public ResponseEntity<MsgTemplateDTO> update(@PathVariable("msgtemplate_id") String msgtemplate_id, @RequestBody MsgTemplateDTO msgtemplatedto) {
MsgTemplate domain = msgtemplateMapping.toDomain(msgtemplatedto);
domain .setTid(msgtemplate_id);
......@@ -89,7 +86,6 @@ public class MsgTemplateResource {
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibznotify-MsgTemplate-Remove-all')")
@ApiOperation(value = "删除消息模板", tags = {"消息模板" }, notes = "删除消息模板")
@RequestMapping(method = RequestMethod.DELETE, value = "/msgtemplates/{msgtemplate_id}")
@Transactional
public ResponseEntity<Boolean> remove(@PathVariable("msgtemplate_id") String msgtemplate_id) {
return ResponseEntity.status(HttpStatus.OK).body(msgtemplateService.remove(msgtemplate_id));
}
......
......@@ -11,7 +11,6 @@ import com.alibaba.fastjson.JSONObject;
import javax.servlet.ServletRequest;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cglib.beans.BeanCopier;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;
import org.springframework.http.HttpStatus;
......@@ -50,7 +49,6 @@ public class MsgUserAccountResource {
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibznotify-MsgUserAccount-Create-all')")
@ApiOperation(value = "新建绑定消息账号", tags = {"绑定消息账号" }, notes = "新建绑定消息账号")
@RequestMapping(method = RequestMethod.POST, value = "/msguseraccounts")
@Transactional
public ResponseEntity<MsgUserAccountDTO> create(@RequestBody MsgUserAccountDTO msguseraccountdto) {
MsgUserAccount domain = msguseraccountMapping.toDomain(msguseraccountdto);
msguseraccountService.create(domain);
......@@ -69,7 +67,6 @@ public class MsgUserAccountResource {
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibznotify-MsgUserAccount-Update-all')")
@ApiOperation(value = "更新绑定消息账号", tags = {"绑定消息账号" }, notes = "更新绑定消息账号")
@RequestMapping(method = RequestMethod.PUT, value = "/msguseraccounts/{msguseraccount_id}")
@Transactional
public ResponseEntity<MsgUserAccountDTO> update(@PathVariable("msguseraccount_id") String msguseraccount_id, @RequestBody MsgUserAccountDTO msguseraccountdto) {
MsgUserAccount domain = msguseraccountMapping.toDomain(msguseraccountdto);
domain .setId(msguseraccount_id);
......@@ -89,7 +86,6 @@ public class MsgUserAccountResource {
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibznotify-MsgUserAccount-Remove-all')")
@ApiOperation(value = "删除绑定消息账号", tags = {"绑定消息账号" }, notes = "删除绑定消息账号")
@RequestMapping(method = RequestMethod.DELETE, value = "/msguseraccounts/{msguseraccount_id}")
@Transactional
public ResponseEntity<Boolean> remove(@PathVariable("msguseraccount_id") String msguseraccount_id) {
return ResponseEntity.status(HttpStatus.OK).body(msguseraccountService.remove(msguseraccount_id));
}
......
......@@ -60,7 +60,7 @@ public class AuthorizationTokenFilter extends OncePerRequestFilter {
if (authTokenUtil.validateToken(authToken, userDetails)) {
UsernamePasswordAuthenticationToken authentication = new UsernamePasswordAuthenticationToken(userDetails, null, userDetails.getAuthorities());
authentication.setDetails(new WebAuthenticationDetailsSource().buildDetails(request));
log.info("authorizated user '{}', setting security context", username);
// log.info("authorizated user '{}', setting security context", username);
SecurityContextHolder.getContext().setAuthentication(authentication);
}
}
......
......@@ -22,9 +22,9 @@ spring:
max-file-size: 100MB
max-request-size: 100MB
datasource:
username: a_A_5d9d78509
password: '@6dEfb3@'
url: jdbc:mysql://172.16.180.232:3306/a_A_5d9d78509?autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&useOldAliasMetadataBehavior=true&allowMultiQueries=true
username: root
password: 'root'
url: jdbc:mysql://127.0.0.1:3306/ibznotify?autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&useOldAliasMetadataBehavior=true&allowMultiQueries=true
driver-class-name: com.mysql.jdbc.Driver
filters: stat,wall,log4j2
#配置初始化大小/最小/最大
......@@ -45,7 +45,7 @@ spring:
pool-prepared-statements: false
max-pool-prepared-statement-per-connection-size: 20
isSyncDBSchema: false
defaultSchema: a_A_5d9d78509
defaultSchema: root
conf: classpath:liquibase/master.xml
#Mybatis-plus配置
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册