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

wwwwww 部署微服务应用

上级 4fcf4752
## v7.0.0-alpha.5 [2020-5-28]
### Bug修复
修复处理快速分组模型动态数据部分
修复列表,数据视图默认排序
修复门户部件flex布局
修复表格选择框列样式出现省略号
修复批删除传递参数调整
修复表单上界面行为参数传递bug
修复分页导航、编辑类视图标题
修复界面行为多主键分隔符由";"改为","
修复导航类视图宽度格式
修复图表排序
修复关系界面逻辑
修复401跳登录页清除user和token
修复树导航debug展示位置
修复菜单默认展开
修复快速搜索框bug
### 功能新增及优化
#### 模板
补充单位选择器、部门选择器、人员选择器
面板项支持偏移
应用支持自定义默认端口
门户部件图标和容器样式
表格列头图片和头部样式
表格操作列图标
表格编辑项值规则
增加树选择双击事件
增加图表分组属性计数统计(srfcount)
增加雷达图支持
#### 基础文件
补充单位选择器、部门选择器、人员选择器
修复分页导航、编辑类视图标题
修复界面行为多主键分隔符由";"改为","
修复关系界面逻辑
修复401跳登录页清除user和token
修复树导航debug展示位置
修复菜单默认展开
修复快速搜索框bug
## v7.0.0-alpha.4 [2020-5-21] ## v7.0.0-alpha.4 [2020-5-21]
### Bug修复 ### Bug修复
......
...@@ -18,13 +18,16 @@ ...@@ -18,13 +18,16 @@
"@fullcalendar/list": "^4.4.0", "@fullcalendar/list": "^4.4.0",
"@fullcalendar/timegrid": "^4.4.0", "@fullcalendar/timegrid": "^4.4.0",
"@fullcalendar/vue": "^4.4.0", "@fullcalendar/vue": "^4.4.0",
"vuedraggable": "^2.23.2",
"async-validator": "^3.3.0",
"axios": "^0.19.1", "axios": "^0.19.1",
"core-js": "^3.4.4", "core-js": "^3.4.4",
"echarts": "^4.6.0", "echarts": "^4.6.0",
"element-ui": "^2.13.0", "element-ui": "^2.13.0",
"file-saver": "^2.0.2", "file-saver": "^2.0.2",
"font-awesome": "^4.7.0", "font-awesome": "^4.7.0",
"ibiz-gantt-elastic": "^1.0.8", "ibiz-gantt-elastic": "^1.0.15",
"ibiz-vue-lib": "^0.1.9",
"interactjs": "^1.9.4", "interactjs": "^1.9.4",
"moment": "^2.24.0", "moment": "^2.24.0",
"path-to-regexp": "^6.1.0", "path-to-regexp": "^6.1.0",
......
...@@ -71,6 +71,11 @@ import AppUploadFileInfo from './components/app-upload-file-info/app-upload-file ...@@ -71,6 +71,11 @@ import AppUploadFileInfo from './components/app-upload-file-info/app-upload-file
import ContextMenu from './components/context-menu/context-menu' import ContextMenu from './components/context-menu/context-menu'
import AppColumnFormat from './components/app-column-format/app-column-format.vue' import AppColumnFormat from './components/app-column-format/app-column-format.vue'
import AppQuickGroup from './components/app-quick-group/app-quick-group.vue' import AppQuickGroup from './components/app-quick-group/app-quick-group.vue'
import AppOrgSelect from './components/app-org-select/app-org-select.vue'
import AppDepartmentSelect from './components/app-department-select/app-department-select.vue'
import IBizGroupSelect from './components/ibiz-group-select/ibiz-group-select.vue'
import IBizGroupPicker from './components/ibiz-group-picker/ibiz-group-picker.vue'
import AppWFApproval from './components/app-wf-approval/app-wf-approval.vue'
// 全局挂载UI实体服务注册中心 // 全局挂载UI实体服务注册中心
window['uiServiceRegister'] = uiServiceRegister; window['uiServiceRegister'] = uiServiceRegister;
...@@ -151,5 +156,10 @@ export const AppComponents = { ...@@ -151,5 +156,10 @@ export const AppComponents = {
v.component('context-menu',ContextMenu); v.component('context-menu',ContextMenu);
v.component('app-column-format',AppColumnFormat); v.component('app-column-format',AppColumnFormat);
v.component('app-quick-group',AppQuickGroup); v.component('app-quick-group',AppQuickGroup);
v.component('app-org-select',AppOrgSelect);
v.component('app-department-select',AppDepartmentSelect);
v.component('ibiz-group-select',IBizGroupSelect);
v.component('ibiz-group-picker',IBizGroupPicker);
v.component('app-wf-approval',AppWFApproval);
}, },
}; };
\ No newline at end of file
.ivu-dropdown{
.ivu-dropdown-rel{
.tree-input{
.ivu-input-suffix{
width: auto;
text-align: right;
.icon-arrow{
margin-right: 4px;
}
}
.el-icon-circle-close{
display: none;
}
}
.tree-input:hover{
.el-icon-circle-close{
display: inline-block;
}
}
}
.ivu-select-dropdown{
max-height: 200px;
overflow: scroll;
.tree-contant{
overflow:inherit;
}
}
}
<template>
<div class="app-department-select">
<ibiz-select-tree :NodesData="Nodesdata" v-model="selectTreeValue" :multiple="multiple" @select="onSelect"></ibiz-select-tree>
</div>
</template>
<script lang="ts">
import { Vue, Component, Watch, Prop, Model } from 'vue-property-decorator';
@Component({
})
export default class AppDepartmentSelect extends Vue {
/**
* 接口url
*
* @type {*}
* @memberof AppDepartmentSelect
*/
@Prop() public url?: any;
/**
* 过滤项
*
* @type {*}
* @memberof AppDepartmentSelect
*/
@Prop() public filter?: any;
/**
* 过滤项
*
* @type {*}
* @memberof AppDepartmentSelect
*/
@Prop() public fillMap?: any;
/**
* 是否多选
*
* @type {*}
* @memberof AppDepartmentSelect
*/
@Prop({default:false}) public multiple?: any;
/**
* 表单数据
*
* @type {*}
* @memberof AppDepartmentSelect
*/
@Prop() public data!: any;
/**
* 上下文变量
*
* @type {*}
* @memberof AppDepartmentSelect
*/
@Prop() public context!: any;
/**
* 选中数值
*
* @type {*}
* @memberof AppDepartmentSelect
*/
public selectTreeValue:any = "";
/**
* 树节点数据
*
* @type {*}
* @memberof AppDepartmentSelect
*/
public Nodesdata: any[] = [];
/**
* 当前树节点数据的url
*
* @type {*}
* @memberof AppDepartmentSelect
*/
public oldurl: any[] = [];
/**
* 获取节点数据
*
* @memberof AppDepartmentSelect
*/
public handleFilter(){
if(this.filter){
if(this.data && this.data[this.filter]){
return this.data[this.filter];
}else if(this.context && this.context[this.filter]){
return this.context[this.filter];
}
}else{
return this.context.srforgid;
}
}
/**
* 获取节点数据
*
* @memberof AppDepartmentSelect
*/
public searchNodesData(){
// 处理过滤参数,生成url
let param = this.handleFilter();
let _url = this.url.replace('${orgid}',param)
if(this.oldurl === _url){
return;
}
this.oldurl = _url;
// 缓存机制
const result:any = this.$store.getters.getCopyData(_url);
if(result){
this.Nodesdata = result;
return;
}
this.$http.get(_url).then((response: any) => {
this.Nodesdata = response.data;
this.$store.commit('addDepData', { srfkey: this.filter, orgData: response.data });
}).catch((response: any) => {
if (!response || !response.status || !response.data) {
this.$Notice.error({ title: '错误', desc: '系统异常!' });
return;
}
});
}
/**
* 值变化
*
* @param {*} newVal
* @param {*} oldVal
* @memberof AppDepartmentSelect
*/
@Watch('data',{immediate:true,deep:true})
public onValueChange(newVal: any, oldVal: any) {
if(newVal){
this.computedSelectedData();
this.$nextTick(()=>{
this.searchNodesData();
});
}
}
/**
* 计算选中值
*
* @memberof AppOrgSelect
*/
public computedSelectedData(){
// 单选
if(!this.multiple){
if(this.fillMap && Object.keys(this.fillMap).length >0){
let templateValue = {};
Object.keys(this.fillMap).forEach((item:any) =>{
if(this.data && this.data[this.fillMap[item]]){
Object.assign(templateValue,{[item]:this.data[this.fillMap[item]]});
}
})
this.selectTreeValue = JSON.stringify([templateValue]);
}
}else{
// 多选
if(this.fillMap && Object.keys(this.fillMap).length >0){
let tempArray:Array<any> = [];
Object.keys(this.fillMap).forEach((item:any) =>{
if(this.data && this.data[this.fillMap[item]]){
let tempDataArray:Array<any> = (this.data[this.fillMap[item]]).split(",");
tempDataArray.forEach((tempData:any,index:number) =>{
if(tempArray.length < tempDataArray.length){
let singleData:any ={[item]:tempData};
tempArray.push(singleData);
}else{
Object.assign(tempArray[index],{[item]:tempData});
}
})
}
})
this.selectTreeValue = JSON.stringify(tempArray);
}
}
}
/**
* select事件处理
*
* @param {*} $event
* @memberof AppDepartmentSelect
*/
public onSelect($event:any){
// 组件自身抛值事件
let selectArr = JSON.parse($event);
// fillMap抛值事件
if(this.fillMap && Object.keys(this.fillMap).length > 0){
Object.keys(this.fillMap).forEach((attribute:string) => {
let _name = this.fillMap[attribute];
let values = selectArr.map((item:any) => item[attribute]);
let _value = $event === "[]" ? null : values.join(",");
this.$emit('select-change',{name: this.fillMap[attribute], value: _value})
});
}
}
}
</script>
<style lang='less'>
@import './app-department-select.less';
</style>
\ No newline at end of file
...@@ -240,7 +240,7 @@ export default class AppFormDRUIPart extends Vue { ...@@ -240,7 +240,7 @@ export default class AppFormDRUIPart extends Vue {
} }
const formData: any = data?data:JSON.parse(this.data); const formData: any = data?data:JSON.parse(this.data);
const _paramitem = formData[this.paramItem]; const _paramitem = formData[this.paramItem];
let viewdata = {srfparentdename:this.parentName,srfparentkey:_paramitem}; let viewdata = {};
Object.assign(viewdata, this.$viewTool.getIndexViewParam()); Object.assign(viewdata, this.$viewTool.getIndexViewParam());
const _parameters: any[] = [...this.$viewTool.getIndexParameters(), ...this.parameters]; const _parameters: any[] = [...this.$viewTool.getIndexParameters(), ...this.parameters];
_parameters.forEach((parameter: any) => { _parameters.forEach((parameter: any) => {
...@@ -252,6 +252,7 @@ export default class AppFormDRUIPart extends Vue { ...@@ -252,6 +252,7 @@ export default class AppFormDRUIPart extends Vue {
Object.assign(viewdata, { [this.paramItem]: _paramitem }); Object.assign(viewdata, { [this.paramItem]: _paramitem });
//设置顶层视图唯一标识 //设置顶层视图唯一标识
Object.assign(viewdata,this.context); Object.assign(viewdata,this.context);
Object.assign(viewdata,{srfparentdename:this.parentName,srfparentkey:_paramitem});
this.viewdata = JSON.stringify(viewdata); this.viewdata = JSON.stringify(viewdata);
this.viewparam = JSON.stringify(this.viewparams); this.viewparam = JSON.stringify(this.viewparams);
if (this.isRelationalData) { if (this.isRelationalData) {
......
.app-org-select {
width: 100%;
}
\ No newline at end of file
<template>
<div class="app-org-select">
<ibiz-select-tree :NodesData="NodesData" v-model="selectTreeValue" :multiple="multiple" @select="treeSelectChange"></ibiz-select-tree>
</div>
</template>
<script lang = 'ts'>
import { Vue, Component, Prop, Watch } from "vue-property-decorator";
import { Http } from '@/utils';
@Component({})
export default class AppOrgSelect extends Vue {
/**
* 表单数据
*
* @memberof AppOrgSelect
*/
@Prop() public data!:any;
/**
* 上下文
*
* @memberof AppOrgSelect
*/
@Prop() public context!:any;
/**
* 填充对象
*
* @memberof AppOrgSelect
*/
@Prop() public fillMap:any;
/**
* 过滤项
*
* @memberof AppOrgSelect
*/
@Prop() public filter?:string;
/**
* 是否多选
*
* @memberof AppOrgSelect
*/
@Prop({default:false}) public multiple?:boolean;
/**
* 查询单位路径
*
* @memberof AppOrgSelect
*/
@Prop() public url!:string;
/**
* 监听表单数据变化
*
* @memberof AppOrgSelect
*/
@Watch('data',{immediate:true,deep:true})
onDataChange(newVal: any, oldVal: any) {
if(newVal){
this.computedSelectedData();
if(this.filter){
let tempFilterValue:any = this.initBasicData();
// filter值变化才去请求数据
if(tempFilterValue && (this.copyFilterValue !== tempFilterValue)){
this.loadTreeData(this.url.replace('${orgid}',tempFilterValue));
this.copyFilterValue = tempFilterValue;
}
}
}
}
/**
* 选择值
*
* @memberof AppOrgSelect
*/
public selectTreeValue:any = "";
/**
* 树节点数据
*
* @memberof AppOrgSelect
*/
public NodesData:any = [];
/**
* 备份过滤值
*
* @memberof AppOrgSelect
*/
public copyFilterValue:any;
/**
* vue生命周期
*
* @memberof AppOrgSelect
*/
public created(){
if(!this.filter){
this.loadTreeData(this.url);
}
}
/**
* 加载树数据
*
* @memberof AppOrgSelect
*/
public initBasicData(){
// 计算出过滤值
if(this.filter){
if(this.data && this.data[this.filter]){
return this.data[this.filter];
}else if(this.context && this.context[this.filter]){
return this.context[this.filter];
}else{
return null;
}
}
}
/**
* 计算选中值
*
* @memberof AppOrgSelect
*/
public computedSelectedData(){
// 单选
if(!this.multiple){
if(this.fillMap && Object.keys(this.fillMap).length >0){
let templateValue = {};
Object.keys(this.fillMap).forEach((item:any) =>{
if(this.data && this.data[this.fillMap[item]]){
Object.assign(templateValue,{[item]:this.data[this.fillMap[item]]});
}
})
this.selectTreeValue = JSON.stringify([templateValue]);
}
}else{
// 多选
if(this.fillMap && Object.keys(this.fillMap).length >0){
let tempArray:Array<any> = [];
Object.keys(this.fillMap).forEach((item:any) =>{
if(this.data && this.data[this.fillMap[item]]){
let tempDataArray:Array<any> = (this.data[this.fillMap[item]]).split(",");
tempDataArray.forEach((tempData:any,index:number) =>{
if(tempArray.length < tempDataArray.length){
let singleData:any ={[item]:tempData};
tempArray.push(singleData);
}else{
Object.assign(tempArray[index],{[item]:tempData});
}
})
}
})
this.selectTreeValue = JSON.stringify(tempArray);
}
}
}
/**
* 加载树数据
*
* @memberof AppOrgSelect
*/
public loadTreeData(requestUrl:string){
if(this.filter){
const result:any = this.$store.getters.getCopyData(this.filter);
if(result){
this.NodesData = result;
return;
}
}
Http.getInstance().get(requestUrl).then((res:any) =>{
if(!res.status && res.status !== 200){
console.error("加载数据失败");
return;
}
this.NodesData = res.data;
if(this.filter){
this.$store.commit('addOrgData', { srfkey: this.filter, orgData: res.data });
}
})
}
/**
* 树选择触发事件
*
* @memberof AppOrgSelect
*/
public treeSelectChange($event:any){
// 多选
if(this.multiple){
if(!Object.is($event,'[]')){
const tempValue:any = JSON.parse($event);
if(this.fillMap && Object.keys(this.fillMap).length >0){
Object.keys(this.fillMap).forEach((item:any) =>{
let tempResult:any ="";
tempValue.forEach((value:any,index:number) =>{
tempResult += index>0?`,${value[item]}`:`${value[item]}`;
})
this.emitValue(this.fillMap[item],tempResult);
})
}
}else{
if(this.fillMap && Object.keys(this.fillMap).length >0){
Object.keys(this.fillMap).forEach((item:any) =>{
this.emitValue(this.fillMap[item],null);
})
}
}
}else{
// 单选
if(!Object.is($event,'[]')){
const tempValue:any = JSON.parse($event)[0];
if(this.fillMap && Object.keys(this.fillMap).length >0){
Object.keys(this.fillMap).forEach((item:any) =>{
this.emitValue(this.fillMap[item],tempValue[item]);
})
}
}else{
if(this.fillMap && Object.keys(this.fillMap).length >0){
Object.keys(this.fillMap).forEach((item:any) =>{
this.emitValue(this.fillMap[item],null);
})
}
}
}
}
/**
* 抛值
*
* @memberof AppOrgSelect
*/
public emitValue(name:string,value:any){
this.$emit('select-change',{name:name,value:value});
}
}
</script>
<style lang="less">
@import "./app-org-select.less";
</style>
\ No newline at end of file
.app-wf-approval{
width:100%;
.app-wf-approval-header{
width: 100%;
text-align: center;
background: #e5eaef;
height: 32px;
line-height: 32px;
font-size: 16px;
border: 1px solid #565656;
.approval-header-left{
margin-right: 24px;
}
}
.app-wf-approval-bottom{
width: 100%;
text-align: center;
background: #e5eaef;
height: 32px;
line-height: 32px;
font-size: 16px;
border-style: solid;
border-width: 0px 1px 1px 1px;
border-color: #565656;
}
.app-wf-approval-content{
border-left: 1px solid #565656;
border-right: 1px solid #565656;
.approval-content-item{
display: flex;
align-items: center;
font-size: 16px;
border-bottom: 1px solid #565656;
.approval-content-item-left{
width: 130px;
padding: 8px;
text-align: center;
}
.approval-content-item-right{
width: calc(100% - 130px);
border-left:1px solid #565656;
.approval-content-item-wait{
padding: 0px 4px;
height: 32px;
line-height: 32px;
font-size: 16px;
border-bottom:1px solid #565656;
background: #d1ef5c;
>span{
font-size: 18px;
color: #000;
font-weight: 600;
}
}
.approval-content-item-info{
.approval-content-item-info-item {
padding: 0px 4px;
height: 32px;
line-height: 32px;
border-bottom:1px solid #565656;
}
.approval-content-item-info-top{
font-size: 16px;
}
.approval-content-item-info-bottom{
font-size: 14px;
text-align: right;
>span{
margin-right:6px;
}
.info-bottom-name{
font-size: 18px;
font-weight: 600;
}
}
> div:nth-last-child(1){
> .approval-content-item-info-item:nth-last-child(1){
border-bottom: 0;
}
}
}
.approval-content-item-memo{
padding: 0px 4px;
.el-textarea__inner{
border: 0px !important;
padding: 0px !important;
}
}
}
}
}
}
\ No newline at end of file
<template>
<div class='app-wf-approval'>
<div class="app-wf-approval-header">
<span class="approval-header-left">{{data.startTime}}</span>
<span>{{data.startUserName}}提交</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">
等待<span v-for="(identitylink,inx) in usertask.identitylinks" :key="inx">{{identitylink.displayname}}<span v-if="inx >0"></span></span>处理
</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}`}}
</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="请输入内容"></el-input>
</div>
</div>
</div>
</div>
<div class="app-wf-approval-bottom">
<span v-if="data.endTime">{{data.endTime}}结束</span>
</div>
</div>
</template>
<script lang = 'ts'>
import { Vue, Component,Prop,Model } from 'vue-property-decorator';
@Component({
})
export default class AppWFApproval extends Vue {
/**
* 双向绑定值
*
* @memberof AppWFApproval
*/
@Model ('change') value!: string;
/**
* 数据
*
* @memberof AppWFApproval
*/
public data:any = {};
/**
* 初始化memo
*
* @memberof AppWFApproval
*/
public initmemo:string = "";
/**
* 传入数据服务
*
* @memberof AppWFApproval
*/
@Prop() public service:any;
/**
* 上下文
*
* @memberof AppWFApproval
*/
@Prop() public context:any;
/**
* 视图参数
*
* @memberof AppWFApproval
*/
@Prop() public viewparams:any;
/**
* 初始化数据
*
* @memberof AppWFApproval
*/
public created(){
if(this.service){
this.service.GetWFHistory(this.context).then((res:any) =>{
if(res && (res.status === 200)){
this.data = res.data;
}
})
}
}
/**
* 抛出wfprocmemo
*
* @memberof AppWFApproval
*/
public handleBlur($event:any){
this.$emit('change',$event.target.value);
}
}
</script>
<style lang="less">
@import './app-wf-approval.less';
</style>
\ No newline at end of file
<template>
<div class="ibiz-group-picker">
<div class="ibiz-group-container">
<div v-if="showTree" class="ibiz-group-tree">
<ibiz-select-tree :NodesData="treeItems" v-model="treeSelectVal" :treeOnly="true" :defaultChecked="true" @select="treeSelect"></ibiz-select-tree>
</div>
<div class="ibiz-group-content">
<ibiz-group-card :data="cardItems" text="label" value="id" groupName="group" :multiple="multiple" :defaultSelect="cardSelctVal" @select="groupSelect"></ibiz-group-card>
</div>
</div>
<div class="ibiz-group-footer">
<el-button size="small" type="primary" @click="onOK">确认</el-button>
<el-button size="small" @click="onCancel">取消</el-button>
</div>
</div>
</template>
<script lang="ts">
import { Component, Vue, Prop, Watch } from 'vue-property-decorator';
import { Subject } from 'rxjs';
import { Http } from '../../utils';
@Component({})
export default class IBizGroupPicker extends Vue {
/**
* 视图上下文参数
*
* @type {*}
* @memberof IBizGroupPicker
*/
@Prop() viewdata: any;
/**
* 视图参数
*
* @type {*}
* @memberof IBizGroupPicker
*/
@Prop() viewparam: any;
/**
* 多选
*
* @type {*}
* @memberof IBizGroupPicker
*/
protected multiple: boolean = false;
/**
* 加载树url
*
* @type {*}
* @memberof IBizGroupPicker
*/
protected treeurl:any;
/**
* 加载人员url
*
* @type {*}
* @memberof IBizGroupPicker
*/
protected url:any;
/**
* 树数据集
*
* @type {*}
* @memberof IBizGroupPicker
*/
protected treeItems: any[] = [];
/**
* 分组表数据集
*
* @type {*}
* @memberof IBizGroupPicker
*/
protected cardItems: any[] = [];
/**
* 视图上下文参数对象
*
* @type {*}
* @memberof IBizGroupPicker
*/
protected viewData: any;
/**
* 视图参数对象
*
* @type {*}
* @memberof IBizGroupPicker
*/
protected viewParam: any;
/**
* 树选中值
*
* @type {*}
* @memberof IBizGroupPicker
*/
protected treeSelectVal: string = '';
/**
* 分组表选中集合
*
* @type {*}
* @memberof IBizGroupPicker
*/
protected cardSelctVal: any = [];
/**
* 数据选中集合
*
* @type {*}
* @memberof IBizGroupPicker
*/
protected selects: any[] = [];
/**
* 是否显示树
*
* @type {*}
* @memberof IBizGroupPicker
*/
get showTree() {
if(this.viewParam) {
return this.viewParam.showtree;
}
}
/**
* 生命周期
*
* @type {*}
* @memberof IBizGroupPicker
*/
public created() {
if(!this.viewdata || !this.viewparam) {
return;
}
this.viewData = JSON.parse(this.viewdata);
this.viewParam = JSON.parse(this.viewparam);
this.multiple = this.viewParam.multiple;
this.treeurl = this.viewParam.treeurl;
this.url = this.viewParam.url;
if (this.viewParam.selects) {
this.viewParam.selects.forEach((select: any) => {
this.selects.push(select);
this.cardSelctVal.push(select.id)
})
}
this.load();
}
/**
* 加载数据
*
* @type {*}
* @memberof IBizGroupPicker
*/
public load() {
if(this.showTree) {
this.loadTree();
} else {
this.loadGroupData(this.viewParam.filtervalue);
}
}
/**
* 加载树数据
*
* @type {*}
* @memberof IBizGroupPicker
*/
public loadTree() {
let orgid = this.viewParam.filtervalue;
let tempTreeUrl:string = this.treeurl.replace('${orgid}',orgid);
let get = Http.getInstance().get(tempTreeUrl, true);
get.then((response: any) => {
if(response.status === 200) {
this.treeItems = response.data;
}
}).catch((error: any) => {
console.log(error)
})
}
/**
* 加载分组表数据
*
* @type {*}
* @memberof IBizGroupPicker
*/
public loadGroupData(key: string) {
let tempUrl = this.url.replace('${selected-orgid}',key);
let get = Http.getInstance().get(tempUrl, true);
get.then((response: any) => {
if(response.status === 200) {
this.cardItems = response.data;
}
}).catch((error: any) => {
console.log(error)
})
}
/**
* 树选中
*
* @type {*}
* @memberof IBizGroupPicker
*/
public treeSelect(event: any) {
if(!event || JSON.parse(event).length == 0) {
return;
}
const items: any = JSON.parse(event);
this.loadGroupData(items[0].id);
}
/**
* 分组表选中
*
* @type {*}
* @memberof IBizGroupPicker
*/
public groupSelect(event: any) {
if (!event || !event.select) {
return;
}
if(!this.multiple) {
this.selects = [];
}
if(event.rselect) {
let index: number = this.selects.findIndex((item: any) => Object.is(event.rselect, item.id));
if(index >= 0) {
this.selects.splice(index, 1);
}
} else {
event.select.forEach((key: string) => {
let index: number = this.selects.findIndex((item: any) => Object.is(key, item.id));
if(index >= 0) {
return;
}
let item: any = this.cardItems.find((item: any) => Object.is(key, item.id));
if (item) {
this.selects.push(item);
}
});
}
}
/**
* 确认
*
* @type {*}
* @memberof IBizGroupPicker
*/
public onOK() {
this.$emit('close', this.selects);
}
/**
* 取消
*
* @type {*}
* @memberof IBizGroupPicker
*/
public onCancel() {
this.$emit('close');
}
}
</script>
<style lang="less">
.ibiz-group-container {
display: flex;
height: calc(100% - 65px);
.ibiz-group-tree {
width: 400px;
border-right: 1px solid #ddd;
padding: 0 10px;
overflow: auto;
height: 100%;
}
.ibiz-group-content {
flex-grow: 1;
padding: 0 10px;
overflow: auto;
height: 100%;
}
}
.ibiz-group-footer {
padding: 16px;
text-align: right;
border-top: 1px solid #ddd;
}
</style>
\ No newline at end of file
<template>
<div class="ibiz-group-select">
<div class="ibiz-group-content">
<span v-if="!multiple">
{{ selectName }}
</span>
<template v-else v-for="(select, index) of selects">
<div :key="index" class="ibiz-group-item">
{{ select.label }}
<i v-if="!disabled" class="el-icon-close" @click="remove(select)"></i>
</div>
</template>
</div>
<div v-if="!disabled" class="ibiz-group-open">
<i v-if="!disabled && !multiple && selects.length > 0" class="el-icon-close" @click="remove(selects[0])"></i>
<i class="el-icon-search" @click="openView"></i>
</div>
</div>
</template>
<script lang="ts">
import { Component, Vue, Prop, Watch } from 'vue-property-decorator';
import { Subject } from 'rxjs';
@Component({})
export default class IBizGroupSelect extends Vue {
/**
* 名称标识
*
* @type {*}
* @memberof IBizGroupSelect
*/
@Prop() name!: string;
/**
* 树加载地址
*
* @type {*}
* @memberof IBizGroupSelect
*/
@Prop() treeurl?:boolean;
/**
* 数据接口地址
*
* @type {*}
* @memberof IBizGroupSelect
*/
@Prop() url!: string;
/**
* 多选
*
* @type {*}
* @memberof IBizGroupSelect
*/
@Prop({default: false}) multiple?: boolean;
/**
* 数据对象
*
* @type {*}
* @memberof IBizGroupSelect
*/
@Prop() data: any;
/**
* 过滤属性标识
*
* @type {*}
* @memberof IBizGroupSelect
*/
@Prop() filter?: string;
/**
* 是否启用
*
* @type {*}
* @memberof IBizGroupSelect
*/
@Prop() disabled?: boolean;
/**
* 值
*
* @type {*}
* @memberof IBizGroupSelect
*/
@Prop() value: any;
/**
* 上下文参数
*
* @type {*}
* @memberof IBizGroupSelect
*/
@Prop() context: any;
/**
* 关联属性
*
* @type {*}
* @memberof IBizGroupSelect
*/
@Prop() valueitem: any;
/**
* 填充属性
*
* @type {*}
* @memberof IBizGroupSelect
*/
@Prop() fillmap: any;
/**
* 选中项集合
*
* @type {*}
* @memberof IBizGroupSelect
*/
protected selects: any[] = [];
/**
* 值变化
*
* @type {*}
* @memberof IBizGroupSelect
*/
@Watch('value')
onValueChange(newVal: any) {
this.selects = [];
if (newVal) {
let item: any = {};
item.label = newVal.split(',');
if(this.valueitem) {
item.id = this.data[this.valueitem] ? this.data[this.valueitem].split(',') : [];
}
if(this.fillmap) {
for(let key in this.fillmap) {
item[this.fillmap[key]] = this.data[key] ? this.data[key].split(',') : [];
}
}
item.label.forEach((val: string, index: number) => {
let _item: any = {};
for(let key in item) {
_item[key] = item[key][index] ? item[key][index] : null;
}
this.selects.push(_item)
})
}
}
/**
* 单选时选中名称
*
* @type {*}
* @memberof IBizGroupSelect
*/
get selectName() {
if(this.selects.length > 0) {
return this.selects[0].label;
}
}
/**
* 打开选择视图
*
* @type {*}
* @memberof IBizGroupSelect
*/
public openView() {
const view: any = {
viewname: 'ibiz-group-picker',
title: '分组选择'
};
const context: any = JSON.parse(JSON.stringify(this.context));
let filtervalue:string = "";
if(this.filter){
if(this.data[this.filter]){
filtervalue = this.data[this.filter];
}else if(context[this.filter]){
filtervalue = context[this.filter];
}else{
filtervalue = context.srforgid;
}
}else{
filtervalue = context.srforgid;
}
const param: any = {};
Object.assign(param, {
showtree: this.treeurl?true:false,
url:this.url,
treeurl:this.treeurl,
filtervalue: filtervalue,
multiple: this.multiple,
selects: this.selects
});
let container: Subject<any> = this.$appmodal.openModal(view, context, param);
container.subscribe((result: any) => {
if (!result || !Object.is(result.ret, 'OK')) {
return;
}
this.openViewClose(result);
});
}
/**
* 选择视图关闭
*
* @type {*}
* @memberof IBizGroupSelect
*/
public openViewClose(result: any) {
this.selects = [];
if (result.datas && result.datas.length > 0) {
this.selects = result.datas
}
this.setValue()
}
/**
* 数据删除
*
* @type {*}
* @memberof IBizGroupSelect
*/
public remove(item: any) {
this.selects.splice(this.selects.indexOf(item), 1);
this.setValue()
}
/**
* 设置值
*
* @type {*}
* @memberof IBizGroupSelect
*/
public setValue() {
let item: any = {};
item[this.name] = null;
if(this.valueitem) {
item[this.valueitem] = null;
}
if(this.fillmap) {
for(let key in this.fillmap) {
item[key] = null;
}
}
if(this.multiple) {
this.selects.forEach((select: any) => {
item[this.name] = item[this.name] ? `${item[this.name]},${select.label}` : select.label;
if(this.valueitem) {
item[this.valueitem] = item[this.valueitem] ? `${item[this.valueitem]},${select.id}` : select.id;
}
if(this.fillmap) {
for(let key in this.fillmap) {
item[key] = item[key] ? `${item[key]},${select[this.fillmap[key]]}` : select[this.fillmap[key]];
}
}
});
} else {
item = this.selects.length > 0 ? this.selects[0] : {};
item[this.name] = this.selects.length > 0 ? this.selects[0].label : null;
if(this.valueitem) {
item[this.valueitem] = this.selects.length > 0 ? this.selects[0].id : null;
}
if(this.fillmap) {
for(let key in this.fillmap) {
item[key] = this.selects.length > 0 ? this.selects[0][this.fillmap[key]] : null;
}
}
}
for(let key in item) {
this.$emit('formitemvaluechange', { name: key, value: item[key] });
}
}
}
</script>
<style lang="less">
.ibiz-group-select {
width: 100%;
display: flex;
border: 1px solid #DCDFE6;
min-height: 32px;
border-radius: 4px;
.ibiz-group-content {
flex-grow: 1;
padding: 0 16px;
.ibiz-group-item {
display: inline-block;
border: 1px solid #bbb;
line-height: 24px;
border-radius: 5px;
margin-right: 5px;
padding: 0 5px;
}
}
.ibiz-group-open {
display: flex;
text-align: center;
align-items: center;
padding: 0 5px;
}
}
.ibiz-group-select:hover {
border-color: #108cee;
}
</style>
\ No newline at end of file
...@@ -26,13 +26,16 @@ ...@@ -26,13 +26,16 @@
top: 50%; top: 50%;
transform: translateY(-60%); transform: translateY(-60%);
width: 300px; width: 300px;
.ivu-card{
border-radius: 15px;
.ivu-card-head { .ivu-card-head {
padding: 14px 6px; padding: 14px 6px;
>p{ >p{
line-height: 20px; line-height: 20px;
font-size: 14px; font-size: 20px;
color: #17233d; color: #17233d;
font-weight: 700; font-weight: 700;
text-align:center;
} }
} }
&-header{ &-header{
...@@ -43,11 +46,25 @@ ...@@ -43,11 +46,25 @@
} }
.form-con{ .form-con{
padding: 10px 0 0; padding: 10px 0 0;
.ivu-form-item{
margin-bottom: 20px;
}
p{
font-size: 14px;
font-weight: bold;
height: 21px;
line-height: 21px;
}
button{
background-image: linear-gradient(to bottom,#8bbcf1 0%,#2d8cf0 100%);
border-color:#8bbcf1;
}
} }
.login-tip{ .login-tip{
font-size: 10px; font-size: 10px;
text-align: center; text-align: center;
color: #c3c3c3; color: #5f4949;
}
} }
} }
} }
\ No newline at end of file
...@@ -10,12 +10,14 @@ ...@@ -10,12 +10,14 @@
<div class='login-con'> <div class='login-con'>
<card :bordered="false"> <card :bordered="false">
<p slot='title'> <p slot='title'>
<icon type='ios-log-in'></icon> <!-- <icon type='ios-log-in'></icon> -->
&nbsp;&nbsp;{{this.$t('components.login.caption')}} <!-- &nbsp;&nbsp; -->
{{this.$t('components.login.caption')}}
</p> </p>
<div class='form-con'> <div class='form-con'>
<i-form ref='loginForm' :rules="rules" :model="form"> <i-form ref='loginForm' :rules="rules" :model="form">
<form-item prop='loginname'> <form-item prop='loginname'>
<p>用户名</p>
<i-input <i-input
prefix='ios-contact' prefix='ios-contact'
v-model="form.loginname" v-model="form.loginname"
...@@ -23,6 +25,7 @@ ...@@ -23,6 +25,7 @@
</i-input> </i-input>
</form-item> </form-item>
<form-item prop='password'> <form-item prop='password'>
<p>密码</p>
<i-input <i-input
prefix='ios-key' prefix='ios-key'
v-model="form.password" v-model="form.password"
......
...@@ -201,11 +201,11 @@ export default class TabPageExp extends Vue { ...@@ -201,11 +201,11 @@ export default class TabPageExp extends Vue {
* @param {*} caption * @param {*} caption
* @memberof TabPageExp * @memberof TabPageExp
*/ */
public setCurPageCaption(routename: string, caption: any, info: string) { public setCurPageCaption(caption: string, title: any, info: string) {
if(!Object.is(this.$route.name, routename)) { if(this.$route.meta && (!Object.is(this.$route.meta.caption, caption))) {
return; return;
} }
this.$store.commit("setCurPageCaption", { route: this.$route, caption: caption, info: info }); this.$store.commit("setCurPageCaption", { route: this.$route, caption: title, info: info });
setTimeout(() => { setTimeout(() => {
this.moveToView(this.$route); this.moveToView(this.$route);
}, 1); }, 1);
......
...@@ -85,6 +85,15 @@ export class AppHeaderMenus extends Vue { ...@@ -85,6 +85,15 @@ export class AppHeaderMenus extends Vue {
@Model('change', { default: '' }) @Model('change', { default: '' })
protected searchValue!: string; protected searchValue!: string;
/**
* input绑定的搜索框值
*
* @protected
* @type {string}
* @memberof AppHeaderMenus
*/
protected inputSearchValue: string = this.searchValue;
/** /**
* 搜索框提示内容 * 搜索框提示内容
* *
...@@ -125,6 +134,20 @@ export class AppHeaderMenus extends Vue { ...@@ -125,6 +134,20 @@ export class AppHeaderMenus extends Vue {
} }
} }
/**
* 监控searchValue
*
* @param {*} val
* @param {*} oldVal
* @memberof AppHeaderMenus
*/
@Watch('searchValue', { immediate: true })
public watchSearchValue(val: any, oldVal: any): void {
if(val && val !== this.inputSearchValue){
this.inputSearchValue = val;
}
}
/** /**
* 是否为模式1呈现 * 是否为模式1呈现
* *
...@@ -264,12 +287,8 @@ export class AppHeaderMenus extends Vue { ...@@ -264,12 +287,8 @@ export class AppHeaderMenus extends Vue {
* @param {*} val * @param {*} val
* @memberof AppHeaderMenus * @memberof AppHeaderMenus
*/ */
protected searchValChange(val: any): void { protected searchValChange($event: any): void {
if (val) { this.$emit('change', this.inputSearchValue);
this.$emit('change', this.searchValue + val);
} else {
this.$emit('change', '');
}
} }
/** /**
...@@ -290,7 +309,7 @@ export class AppHeaderMenus extends Vue { ...@@ -290,7 +309,7 @@ export class AppHeaderMenus extends Vue {
searchMenu = <i-button type={this.isModeOne() ? 'text' : 'default'} shape="circle" icon="ios-search" on-click={() => this.activeSearch()} /> searchMenu = <i-button type={this.isModeOne() ? 'text' : 'default'} shape="circle" icon="ios-search" on-click={() => this.activeSearch()} />
} }
return <div class={"app-view-quick-search " + this.mode}> return <div class={"app-view-quick-search " + this.mode}>
<i-input v-show={this.isActiveSearch} ref="search" value={this.searchValue} autofocus autocomplete="on" search placeholder={this.searchPlaceholder} on-on-change={(e: any) => this.searchValChange(e.data)} on-on-blur={() => this.searchBlur()} on-on-search={(val: string) => this.search(val)} /> <i-input v-show={this.isActiveSearch} ref="search" v-model={this.inputSearchValue} autofocus autocomplete="on" search placeholder={this.searchPlaceholder} on-on-change={(e: any) => this.searchValChange(e)} on-on-blur={() => this.searchBlur()} on-on-search={(val: string) => this.search(val)} />
{!this.isActiveSearch ? searchMenu : null} {!this.isActiveSearch ? searchMenu : null}
</div> </div>
} }
......
...@@ -96,6 +96,7 @@ export class AppMenus extends Vue { ...@@ -96,6 +96,7 @@ export class AppMenus extends Vue {
if (this.$route && this.$route.matched.length <= 1) { if (this.$route && this.$route.matched.length <= 1) {
this.calcDefaultActive(this.menus); this.calcDefaultActive(this.menus);
this.defaultOpeneds = this.defaultOpeneds.reverse(); this.defaultOpeneds = this.defaultOpeneds.reverse();
this.calcDefaultOpend(this.menus);
} }
} }
...@@ -121,6 +122,23 @@ export class AppMenus extends Vue { ...@@ -121,6 +122,23 @@ export class AppMenus extends Vue {
} }
}); });
} }
/**
* 递归计算默认展开
*
* @protected
* @param {any[]} menus
* @memberof AppMenus
*/
protected calcDefaultOpend(menus: any[]){
menus.forEach((item: any) => {
if (item.items) {
this.calcDefaultOpend(item.items);
}
if(item.expanded){
this.defaultOpeneds.push(item.id)
}
});
}
/** /**
* 绘制项图标 * 绘制项图标
...@@ -188,7 +206,7 @@ export class AppMenus extends Vue { ...@@ -188,7 +206,7 @@ export class AppMenus extends Vue {
*/ */
protected renderLeftModeMenu(): any { protected renderLeftModeMenu(): any {
return <div class="app-menus-vertical-wrapper"> return <div class="app-menus-vertical-wrapper">
<el-menu class="app-menus-vertical" default-active={this.defaultActive}> <el-menu class="app-menus-vertical" default-active={this.defaultActive} default-openeds={this.defaultOpeneds}>
{this.menus.map((item: any) => { {this.menus.map((item: any) => {
if (item.hidden) { if (item.hidden) {
return; return;
......
...@@ -247,9 +247,9 @@ export default class EditViewEngine extends ViewEngine { ...@@ -247,9 +247,9 @@ export default class EditViewEngine extends ViewEngine {
*/ */
public setTabCaption(info: string): void { public setTabCaption(info: string): void {
let viewdata: any = this.view.model; let viewdata: any = this.view.model;
let viewParam = this.view.$store.getters['viewaction/getAppView'](this.view.viewtag); if (viewdata && info && !Object.is(info, '') && this.view.$tabPageExp && (viewdata.srfTitle.indexOf(" - ") === -1)) {
if (viewdata && viewParam && info && !Object.is(info, '') && this.view.$tabPageExp) { this.view.$tabPageExp.setCurPageCaption(viewdata.srfCaption, viewdata.srfTitle, info);
this.view.$tabPageExp.setCurPageCaption(`${viewParam.viewmodule}_${viewParam.viewname}`.toLocaleLowerCase(), viewdata.srfCaption, info); this.view.model.srfTitle = `${this.view.$t(viewdata.srfTitle)} - ${viewdata.dataInfo}`;
} }
} }
......
...@@ -35,4 +35,20 @@ export default class PickupTreeViewEngine extends TreeViewEngine { ...@@ -35,4 +35,20 @@ export default class PickupTreeViewEngine extends TreeViewEngine {
this.view.$emit('viewdataschange', args); this.view.$emit('viewdataschange', args);
} }
} }
/**
* 双击选中激活数据
*
* @param {string} ctrlName
* @param {string} eventName
* @param {*} args
* @memberof PickupTreeViewEngine
*/
public onCtrlEvent(ctrlName: string, eventName: string, args: any): void {
if (Object.is(ctrlName, 'tree') && Object.is(eventName, 'nodedblclick')) {
this.view.$emit('viewdatasactivated', args);
return ;
}
super.onCtrlEvent(ctrlName, eventName, args);
}
} }
\ No newline at end of file
import { ChartSeries } from './chart-series';
/**
* 雷达图序列模型
*
* @export
* @class ChartRadarSeries
*/
export class ChartRadarSeries extends ChartSeries{
/**
* 分类属性
*
* @type {string}
* @memberof ChartRadarSeries
*/
public categorField: string = '';
/**
* 值属性
*
* @type {string}
* @memberof ChartRadarSeries
*/
public valueField: string = '';
/**
* 雷达图指示器
*
* @type {string}
* @memberof ChartRadarSeries
*/
public indicator: Array<any> = [];
/**
* 分类代码表
*
* @type {string}
* @memberof ChartRadarSeries
*/
public categorCodeList: any = null;
/**
* 维度编码
*
* @type {*}
* @memberof ChartRadarSeries
*/
public encode:any = null;
/**
* Creates an instance of ChartRadarSeries.
* ChartRadarSeries 实例
*
* @param {*} [opts={}]
* @memberof ChartRadarSeries
*/
constructor(opts: any = {}) {
super(opts);
this.categorField = !Object.is(opts.categorField, '') ? opts.categorField : '';
this.categorCodeList = opts.categorCodeList ? opts.categorCodeList : null;
this.valueField = !Object.is(opts.valueField, '') ? opts.valueField : '';
this.encode = opts.encode ? opts.encode : null;
this.indicator = opts.indicator ? opts.indicator:[];
}
/**
* 设置分类属性
*
* @param {string} state
* @memberof ChartRadarSeries
*/
public setCategorField(state: string): void {
this.categorField = state;
}
/**
* 设置序列名称
*
* @param {string} state
* @memberof ChartRadarSeries
*/
public setValueField(state: string): void {
this.valueField = state;
}
/**
* 分类代码表
*
* @param {*} state
* @memberof ChartRadarSeries
*/
public setCategorCodeList(state: any): void {
this.categorCodeList = state;
}
/**
* 设置编码
*
* @param {*} state
* @memberof ChartRadarSeries
*/
public setEncode(state: any): void {
this.encode = state;
}
/**
* 设置雷达图指示器
*
* @param {*} state
* @memberof ChartRadarSeries
*/
public setIndicator(state: any): void {
this.indicator = state;
}
}
\ No newline at end of file
...@@ -3,3 +3,4 @@ export { ChartLineSeries } from './chart-line-series'; ...@@ -3,3 +3,4 @@ export { ChartLineSeries } from './chart-line-series';
export { ChartFunnelSeries } from './chart-funnel-series'; export { ChartFunnelSeries } from './chart-funnel-series';
export { ChartPieSeries } from './chart-pie-series'; export { ChartPieSeries } from './chart-pie-series';
export { ChartBarSeries } from './chart-bar-series'; export { ChartBarSeries } from './chart-bar-series';
export { ChartRadarSeries } from './chart-radar-series';
\ No newline at end of file
<template> <template>
<app-layout viewName="emassettabexpview" viewTitle="资产信息" :isShowCaptionBar="false" :isShowToolbar="false" :className="{ 'view-container': true, 'default-mode-view': true, 'detabexpview': true, 'emassettab-exp-view': true }" layoutMode="VIEW" :isShowUserInfo="isDefaultView()" :openMode="openMode" @close-view="closeView($event)"> <app-layout viewName="emassettabexpview" viewTitle="资产信息" :isShowCaptionBar="false" :isShowToolbar="false" :className="{ 'view-container': true, 'default-mode-view': true, 'detabexpview': true, 'emassettab-exp-view': true }" layoutMode="VIEW" :isShowUserInfo="isDefaultView()" :openMode="openMode" @close-view="closeView($event)">
<template slot="headerLeft"> <template slot="headerLeft">
......
<template> <template>
<app-layout viewName="emeqlctgsstabexpview" viewTitle="钢丝绳位置超期预警" :isShowToolbar="false" :className="{ 'view-container': true, 'default-mode-view': true, 'detabexpview': true, 'emeqlctgsstab-exp-view': true }" layoutMode="VIEW" :isShowUserInfo="isDefaultView()" :openMode="openMode" @close-view="closeView($event)"> <app-layout viewName="emeqlctgsstabexpview" viewTitle="钢丝绳位置超期预警" :isShowToolbar="false" :className="{ 'view-container': true, 'default-mode-view': true, 'detabexpview': true, 'emeqlctgsstab-exp-view': true }" layoutMode="VIEW" :isShowUserInfo="isDefaultView()" :openMode="openMode" @close-view="closeView($event)">
<template slot="headerLeft"> <template slot="headerLeft">
......
<template> <template>
<app-layout viewName="emequiptabexpview" viewTitle="设备档案分页导航视图" :isShowCaptionBar="false" :isShowToolbar="false" :className="{ 'view-container': true, 'default-mode-view': true, 'detabexpview': true, 'emequiptab-exp-view': true }" layoutMode="VIEW" :isShowUserInfo="isDefaultView()" :openMode="openMode" @close-view="closeView($event)"> <app-layout viewName="emequiptabexpview" viewTitle="设备档案分页导航视图" :isShowCaptionBar="false" :isShowToolbar="false" :className="{ 'view-container': true, 'default-mode-view': true, 'detabexpview': true, 'emequiptab-exp-view': true }" layoutMode="VIEW" :isShowUserInfo="isDefaultView()" :openMode="openMode" @close-view="closeView($event)">
<template slot="headerLeft"> <template slot="headerLeft">
......
<template> <template>
<app-layout viewName="emitemtabexpview" viewTitle="物品分页导航视图" :isShowCaptionBar="false" :isShowToolbar="false" :className="{ 'view-container': true, 'default-mode-view': true, 'detabexpview': true, 'emitemtab-exp-view': true }" layoutMode="VIEW" :isShowUserInfo="isDefaultView()" :openMode="openMode" @close-view="closeView($event)"> <app-layout viewName="emitemtabexpview" viewTitle="物品分页导航视图" :isShowCaptionBar="false" :isShowToolbar="false" :className="{ 'view-container': true, 'default-mode-view': true, 'detabexpview': true, 'emitemtab-exp-view': true }" layoutMode="VIEW" :isShowUserInfo="isDefaultView()" :openMode="openMode" @close-view="closeView($event)">
<template slot="headerLeft"> <template slot="headerLeft">
......
<template> <template>
<app-layout viewName="emplantabexpview" viewTitle="计划" :isShowToolbar="false" :className="{ 'view-container': true, 'default-mode-view': true, 'detabexpview': true, 'emplantab-exp-view': true }" layoutMode="VIEW" :isShowUserInfo="isDefaultView()" :openMode="openMode" @close-view="closeView($event)"> <app-layout viewName="emplantabexpview" viewTitle="计划" :isShowToolbar="false" :className="{ 'view-container': true, 'default-mode-view': true, 'detabexpview': true, 'emplantab-exp-view': true }" layoutMode="VIEW" :isShowUserInfo="isDefaultView()" :openMode="openMode" @close-view="closeView($event)">
<template slot="headerLeft"> <template slot="headerLeft">
......
<template> <template>
<app-layout viewName="emrfodetabexpview" viewTitle="现象" :isShowCaptionBar="false" :isShowToolbar="false" :className="{ 'view-container': true, 'default-mode-view': true, 'detabexpview': true, 'emrfodetab-exp-view': true }" layoutMode="VIEW" :isShowUserInfo="isDefaultView()" :openMode="openMode" @close-view="closeView($event)"> <app-layout viewName="emrfodetabexpview" viewTitle="现象" :isShowCaptionBar="false" :isShowToolbar="false" :className="{ 'view-container': true, 'default-mode-view': true, 'detabexpview': true, 'emrfodetab-exp-view': true }" layoutMode="VIEW" :isShowUserInfo="isDefaultView()" :openMode="openMode" @close-view="closeView($event)">
<template slot="headerLeft"> <template slot="headerLeft">
......
<template> <template>
<app-layout viewName="emeqlocationtabexpview" viewTitle="位置" :isShowCaptionBar="false" :isShowToolbar="false" :className="{ 'view-container': true, 'default-mode-view': true, 'detabexpview': true, 'emeqlocationtab-exp-view': true }" layoutMode="VIEW" :isShowUserInfo="isDefaultView()" :openMode="openMode" @close-view="closeView($event)"> <app-layout viewName="emeqlocationtabexpview" viewTitle="位置" :isShowCaptionBar="false" :isShowToolbar="false" :className="{ 'view-container': true, 'default-mode-view': true, 'detabexpview': true, 'emeqlocationtab-exp-view': true }" layoutMode="VIEW" :isShowUserInfo="isDefaultView()" :openMode="openMode" @close-view="closeView($event)">
<template slot="headerLeft"> <template slot="headerLeft">
......
...@@ -4,12 +4,14 @@ import VueRouter from 'vue-router'; ...@@ -4,12 +4,14 @@ import VueRouter from 'vue-router';
import App from '@/App.vue'; import App from '@/App.vue';
import ElementUi from 'element-ui'; import ElementUi from 'element-ui';
import ViewUI from 'view-design'; import ViewUI from 'view-design';
import ibizLab from 'ibiz-vue-lib';
import { Interceptors } from '@/utils'; import { Interceptors } from '@/utils';
import {Print} from '@/utils/print'; import {Print} from '@/utils/print';
import i18n from '@/locale' import i18n from '@/locale'
import 'element-ui/lib/theme-chalk/index.css'; import 'element-ui/lib/theme-chalk/index.css';
import 'view-design/dist/styles/iview.css'; import 'view-design/dist/styles/iview.css';
import 'ibiz-vue-lib/lib/ibiz-vue-lib.css';
import '@/styles/default.less'; import '@/styles/default.less';
...@@ -30,7 +32,8 @@ Vue.config.errorHandler = function (err: any, vm: any, info: any) { ...@@ -30,7 +32,8 @@ Vue.config.errorHandler = function (err: any, vm: any, info: any) {
console.log(err); console.log(err);
} }
Vue.config.productionTip = false; Vue.config.productionTip = false;
Vue.use(Print) Vue.use(Print);
Vue.use(ibizLab);
Vue.use(Vuex); Vue.use(Vuex);
Vue.use(VueRouter);; Vue.use(VueRouter);;
Vue.use(ElementUi, { Vue.use(ElementUi, {
......
...@@ -75,21 +75,6 @@ export default class EMRFODEServiceBase extends EntityService { ...@@ -75,21 +75,6 @@ export default class EMRFODEServiceBase extends EntityService {
*/ */
public async Save(context: any = {},data: any = {}, isloading?: boolean): Promise<any> { public async Save(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let masterData:any = {}; let masterData:any = {};
let emrfocasData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_emrfocas'),'undefined')){
emrfocasData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_emrfocas') as any);
if(emrfocasData && emrfocasData.length && emrfocasData.length > 0){
emrfocasData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.emrfocaid = null;
}
delete item.srffrontuf;
}
});
}
}
masterData.emrfocas = emrfocasData;
let emrfoacsData:any = []; let emrfoacsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_emrfoacs'),'undefined')){ if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_emrfoacs'),'undefined')){
emrfoacsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_emrfoacs') as any); emrfoacsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_emrfoacs') as any);
...@@ -120,11 +105,26 @@ export default class EMRFODEServiceBase extends EntityService { ...@@ -120,11 +105,26 @@ export default class EMRFODEServiceBase extends EntityService {
} }
} }
masterData.emrfomos = emrfomosData; masterData.emrfomos = emrfomosData;
let emrfocasData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_emrfocas'),'undefined')){
emrfocasData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_emrfocas') as any);
if(emrfocasData && emrfocasData.length && emrfocasData.length > 0){
emrfocasData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.emrfocaid = null;
}
delete item.srffrontuf;
}
});
}
}
masterData.emrfocas = emrfocasData;
Object.assign(data,masterData); Object.assign(data,masterData);
let res:any = await Http.getInstance().post(`/emrfodes/${context.emrfode}/save`,data,isloading); let res:any = await Http.getInstance().post(`/emrfodes/${context.emrfode}/save`,data,isloading);
this.tempStorage.setItem(context.srfsessionkey+'_emrfocas',JSON.stringify(res.data.emrfocas));
this.tempStorage.setItem(context.srfsessionkey+'_emrfoacs',JSON.stringify(res.data.emrfoacs)); this.tempStorage.setItem(context.srfsessionkey+'_emrfoacs',JSON.stringify(res.data.emrfoacs));
this.tempStorage.setItem(context.srfsessionkey+'_emrfomos',JSON.stringify(res.data.emrfomos)); this.tempStorage.setItem(context.srfsessionkey+'_emrfomos',JSON.stringify(res.data.emrfomos));
this.tempStorage.setItem(context.srfsessionkey+'_emrfocas',JSON.stringify(res.data.emrfocas));
return res; return res;
} }
...@@ -139,21 +139,6 @@ export default class EMRFODEServiceBase extends EntityService { ...@@ -139,21 +139,6 @@ export default class EMRFODEServiceBase extends EntityService {
*/ */
public async Update(context: any = {},data: any = {}, isloading?: boolean): Promise<any> { public async Update(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let masterData:any = {}; let masterData:any = {};
let emrfocasData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_emrfocas'),'undefined')){
emrfocasData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_emrfocas') as any);
if(emrfocasData && emrfocasData.length && emrfocasData.length > 0){
emrfocasData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.emrfocaid = null;
}
delete item.srffrontuf;
}
});
}
}
masterData.emrfocas = emrfocasData;
let emrfoacsData:any = []; let emrfoacsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_emrfoacs'),'undefined')){ if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_emrfoacs'),'undefined')){
emrfoacsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_emrfoacs') as any); emrfoacsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_emrfoacs') as any);
...@@ -184,11 +169,26 @@ export default class EMRFODEServiceBase extends EntityService { ...@@ -184,11 +169,26 @@ export default class EMRFODEServiceBase extends EntityService {
} }
} }
masterData.emrfomos = emrfomosData; masterData.emrfomos = emrfomosData;
let emrfocasData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_emrfocas'),'undefined')){
emrfocasData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_emrfocas') as any);
if(emrfocasData && emrfocasData.length && emrfocasData.length > 0){
emrfocasData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.emrfocaid = null;
}
delete item.srffrontuf;
}
});
}
}
masterData.emrfocas = emrfocasData;
Object.assign(data,masterData); Object.assign(data,masterData);
let res:any = await Http.getInstance().put(`/emrfodes/${context.emrfode}`,data,isloading); let res:any = await Http.getInstance().put(`/emrfodes/${context.emrfode}`,data,isloading);
this.tempStorage.setItem(context.srfsessionkey+'_emrfocas',JSON.stringify(res.data.emrfocas));
this.tempStorage.setItem(context.srfsessionkey+'_emrfoacs',JSON.stringify(res.data.emrfoacs)); this.tempStorage.setItem(context.srfsessionkey+'_emrfoacs',JSON.stringify(res.data.emrfoacs));
this.tempStorage.setItem(context.srfsessionkey+'_emrfomos',JSON.stringify(res.data.emrfomos)); this.tempStorage.setItem(context.srfsessionkey+'_emrfomos',JSON.stringify(res.data.emrfomos));
this.tempStorage.setItem(context.srfsessionkey+'_emrfocas',JSON.stringify(res.data.emrfocas));
return res; return res;
} }
...@@ -217,21 +217,6 @@ export default class EMRFODEServiceBase extends EntityService { ...@@ -217,21 +217,6 @@ export default class EMRFODEServiceBase extends EntityService {
*/ */
public async Create(context: any = {},data: any = {}, isloading?: boolean): Promise<any> { public async Create(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let masterData:any = {}; let masterData:any = {};
let emrfocasData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_emrfocas'),'undefined')){
emrfocasData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_emrfocas') as any);
if(emrfocasData && emrfocasData.length && emrfocasData.length > 0){
emrfocasData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.emrfocaid = null;
}
delete item.srffrontuf;
}
});
}
}
masterData.emrfocas = emrfocasData;
let emrfoacsData:any = []; let emrfoacsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_emrfoacs'),'undefined')){ if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_emrfoacs'),'undefined')){
emrfoacsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_emrfoacs') as any); emrfoacsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_emrfoacs') as any);
...@@ -262,6 +247,21 @@ export default class EMRFODEServiceBase extends EntityService { ...@@ -262,6 +247,21 @@ export default class EMRFODEServiceBase extends EntityService {
} }
} }
masterData.emrfomos = emrfomosData; masterData.emrfomos = emrfomosData;
let emrfocasData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_emrfocas'),'undefined')){
emrfocasData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_emrfocas') as any);
if(emrfocasData && emrfocasData.length && emrfocasData.length > 0){
emrfocasData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.emrfocaid = null;
}
delete item.srffrontuf;
}
});
}
}
masterData.emrfocas = emrfocasData;
Object.assign(data,masterData); Object.assign(data,masterData);
if(!data.srffrontuf || data.srffrontuf !== "1"){ if(!data.srffrontuf || data.srffrontuf !== "1"){
data[this.APPDEKEY] = null; data[this.APPDEKEY] = null;
...@@ -271,9 +271,9 @@ export default class EMRFODEServiceBase extends EntityService { ...@@ -271,9 +271,9 @@ export default class EMRFODEServiceBase extends EntityService {
} }
let tempContext:any = JSON.parse(JSON.stringify(context)); let tempContext:any = JSON.parse(JSON.stringify(context));
let res:any = await Http.getInstance().post(`/emrfodes`,data,isloading); let res:any = await Http.getInstance().post(`/emrfodes`,data,isloading);
this.tempStorage.setItem(tempContext.srfsessionkey+'_emrfocas',JSON.stringify(res.data.emrfocas));
this.tempStorage.setItem(tempContext.srfsessionkey+'_emrfoacs',JSON.stringify(res.data.emrfoacs)); this.tempStorage.setItem(tempContext.srfsessionkey+'_emrfoacs',JSON.stringify(res.data.emrfoacs));
this.tempStorage.setItem(tempContext.srfsessionkey+'_emrfomos',JSON.stringify(res.data.emrfomos)); this.tempStorage.setItem(tempContext.srfsessionkey+'_emrfomos',JSON.stringify(res.data.emrfomos));
this.tempStorage.setItem(tempContext.srfsessionkey+'_emrfocas',JSON.stringify(res.data.emrfocas));
return res; return res;
} }
...@@ -288,9 +288,9 @@ export default class EMRFODEServiceBase extends EntityService { ...@@ -288,9 +288,9 @@ export default class EMRFODEServiceBase extends EntityService {
*/ */
public async Get(context: any = {},data: any = {}, isloading?: boolean): Promise<any> { public async Get(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = await Http.getInstance().get(`/emrfodes/${context.emrfode}`,isloading); let res:any = await Http.getInstance().get(`/emrfodes/${context.emrfode}`,isloading);
this.tempStorage.setItem(context.srfsessionkey+'_emrfocas',JSON.stringify(res.data.emrfocas));
this.tempStorage.setItem(context.srfsessionkey+'_emrfoacs',JSON.stringify(res.data.emrfoacs)); this.tempStorage.setItem(context.srfsessionkey+'_emrfoacs',JSON.stringify(res.data.emrfoacs));
this.tempStorage.setItem(context.srfsessionkey+'_emrfomos',JSON.stringify(res.data.emrfomos)); this.tempStorage.setItem(context.srfsessionkey+'_emrfomos',JSON.stringify(res.data.emrfomos));
this.tempStorage.setItem(context.srfsessionkey+'_emrfocas',JSON.stringify(res.data.emrfocas));
return res; return res;
} }
...@@ -307,9 +307,9 @@ export default class EMRFODEServiceBase extends EntityService { ...@@ -307,9 +307,9 @@ export default class EMRFODEServiceBase extends EntityService {
public async GetDraft(context: any = {},data: any = {}, isloading?: boolean): Promise<any> { public async GetDraft(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = await Http.getInstance().get(`/emrfodes/getdraft`,isloading); let res:any = await Http.getInstance().get(`/emrfodes/getdraft`,isloading);
res.data.emrfode = data.emrfode; res.data.emrfode = data.emrfode;
this.tempStorage.setItem(context.srfsessionkey+'_emrfocas',JSON.stringify(res.data.emrfocas));
this.tempStorage.setItem(context.srfsessionkey+'_emrfoacs',JSON.stringify(res.data.emrfoacs)); this.tempStorage.setItem(context.srfsessionkey+'_emrfoacs',JSON.stringify(res.data.emrfoacs));
this.tempStorage.setItem(context.srfsessionkey+'_emrfomos',JSON.stringify(res.data.emrfomos)); this.tempStorage.setItem(context.srfsessionkey+'_emrfomos',JSON.stringify(res.data.emrfomos));
this.tempStorage.setItem(context.srfsessionkey+'_emrfocas',JSON.stringify(res.data.emrfocas));
return res; return res;
} }
......
...@@ -619,7 +619,22 @@ export default class EntityService { ...@@ -619,7 +619,22 @@ export default class EntityService {
* @memberof EntityService * @memberof EntityService
*/ */
public async removeBatch(context: any = {},data: any, isloading?: boolean): Promise<any> { public async removeBatch(context: any = {},data: any, isloading?: boolean): Promise<any> {
return Http.getInstance().delete(`/${this.APPDENAME}/batch`,isloading,data); return Http.getInstance().delete(`/${this.APPDENAME}/batch`,isloading,data[this.APPDEKEY]);
}
/**
* getDataInfo接口方法
*
* @param {*} [context={}]
* @param {*} [data]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof EntityService
*/
public async getDataInfo(context: any = {},data: any, isloading?: boolean):Promise<any> {
if(context[this.APPLYDEKEY]){
return this.Get(context,data, isloading);
}
} }
/** /**
...@@ -765,6 +780,19 @@ export default class EntityService { ...@@ -765,6 +780,19 @@ export default class EntityService {
return Http.getInstance().get(`/wfcore/${this.SYSTEMNAME}-app-${this.APPNAME}/${this.APPDENAME}/${context[this.APPLYDEKEY]}/usertasks/${data['taskDefinitionKey']}/ways`); return Http.getInstance().get(`/wfcore/${this.SYSTEMNAME}-app-${this.APPNAME}/${this.APPDENAME}/${context[this.APPLYDEKEY]}/usertasks/${data['taskDefinitionKey']}/ways`);
} }
/**
* GetWFHistory接口方法(根据业务主键获取工作流程记录)
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof EntityService
*/
public async GetWFHistory(context: any = {},data: any = {}, isloading?: boolean):Promise<any> {
return Http.getInstance().get(`/wfcore/${this.SYSTEMNAME}-app-${this.APPNAME}/${this.APPDENAME}/${context[this.APPLYDEKEY]}/process-instances/alls/history`);
}
/** /**
* WFSubmit接口方法 * WFSubmit接口方法
* *
......
...@@ -89,3 +89,23 @@ export const getCopyData = (state: any) => (srfkey: string) => { ...@@ -89,3 +89,23 @@ export const getCopyData = (state: any) => (srfkey: string) => {
} }
return copyData; return copyData;
} }
/**
* 获取单位数据
*
* @param state
*/
export const getOrgData = (state: any) => (srfkey: string) => {
let orgData = state.orgDataMap[srfkey];
return orgData;
}
/**
* 获取部门数据
*
* @param state
*/
export const getDepData = (state: any) => (srfkey: string) => {
let depData = state.depDataMap[srfkey];
return depData;
}
\ No newline at end of file
...@@ -266,3 +266,27 @@ export const addCopyData = (state: any, args: {srfkey: string,copyData: any}) => ...@@ -266,3 +266,27 @@ export const addCopyData = (state: any, args: {srfkey: string,copyData: any}) =>
state.copyDataMap[args.srfkey] = JSON.parse(JSON.stringify(args.copyData)); state.copyDataMap[args.srfkey] = JSON.parse(JSON.stringify(args.copyData));
} }
} }
/**
* 添加单位数据
*
* @param state
* @param args
*/
export const addOrgData = (state: any, args: {srfkey: string,orgData: any}) => {
if(args && args.srfkey && args.orgData){
state.orgDataMap[args.srfkey] = JSON.parse(JSON.stringify(args.orgData));
}
}
/**
* 添加部门数据
*
* @param state
* @param args
*/
export const addDepData = (state: any, args: {srfkey: string,depData: any}) => {
if(args && args.srfkey && args.depData){
state.depDataMap[args.srfkey] = JSON.parse(JSON.stringify(args.depData));
}
}
\ No newline at end of file
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册