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

xignzi006 发布系统代码

上级 44cc6d0b
......@@ -765,29 +765,7 @@ export default {
tip: "关闭",
},
},
treegridexviewtoolbar_toolbar: {
deuiaction1: {
caption: "New",
tip: "New",
},
tbitem2: {
caption: "-",
tip: "",
},
tbitem4: {
caption: "Edit",
tip: "Edit {0}",
},
tbitem7: {
caption: "-",
tip: "",
},
tbitem8: {
caption: "Remove",
tip: "Remove {0}",
},
},
usablegridviewtoolbar_toolbar: {
gridviewtoolbar_toolbar: {
tbitem1_openquickcreateview: {
caption: "新建",
tip: "新建",
......@@ -824,20 +802,34 @@ export default {
caption: "-",
tip: "",
},
tbitem14_inactive: {
caption: "停用",
tip: "停用",
tbitem19: {
caption: "Filter",
tip: "Filter",
},
tbitem15: {
},
treegridexviewtoolbar_toolbar: {
deuiaction1: {
caption: "New",
tip: "New",
},
tbitem2: {
caption: "-",
tip: "",
},
tbitem19: {
caption: "Filter",
tip: "Filter",
tbitem4: {
caption: "Edit",
tip: "Edit {0}",
},
tbitem7: {
caption: "-",
tip: "",
},
tbitem8: {
caption: "Remove",
tip: "Remove {0}",
},
},
stopgridviewtoolbar_toolbar: {
usablegridviewtoolbar_toolbar: {
tbitem1_openquickcreateview: {
caption: "新建",
tip: "新建",
......@@ -874,9 +866,9 @@ export default {
caption: "-",
tip: "",
},
tbitem14_active: {
caption: "激活",
tip: "激活",
tbitem14_inactive: {
caption: "停用",
tip: "停用",
},
tbitem15: {
caption: "-",
......@@ -887,7 +879,7 @@ export default {
tip: "Filter",
},
},
gridviewtoolbar_toolbar: {
stopgridviewtoolbar_toolbar: {
tbitem1_openquickcreateview: {
caption: "新建",
tip: "新建",
......@@ -924,6 +916,14 @@ export default {
caption: "-",
tip: "",
},
tbitem14_active: {
caption: "激活",
tip: "激活",
},
tbitem15: {
caption: "-",
tip: "",
},
tbitem19: {
caption: "Filter",
tip: "Filter",
......
......@@ -764,29 +764,7 @@ export default {
tip: "关闭",
},
},
treegridexviewtoolbar_toolbar: {
deuiaction1: {
caption: "新建",
tip: "新建",
},
tbitem2: {
caption: "-",
tip: "",
},
tbitem4: {
caption: "编辑",
tip: "编辑",
},
tbitem7: {
caption: "-",
tip: "",
},
tbitem8: {
caption: "删除",
tip: "删除",
},
},
usablegridviewtoolbar_toolbar: {
gridviewtoolbar_toolbar: {
tbitem1_openquickcreateview: {
caption: "新建",
tip: "新建",
......@@ -823,20 +801,34 @@ export default {
caption: "-",
tip: "",
},
tbitem14_inactive: {
caption: "停用",
tip: "停用",
tbitem19: {
caption: "过滤",
tip: "过滤",
},
tbitem15: {
},
treegridexviewtoolbar_toolbar: {
deuiaction1: {
caption: "新建",
tip: "新建",
},
tbitem2: {
caption: "-",
tip: "",
},
tbitem19: {
caption: "过滤",
tip: "过滤",
tbitem4: {
caption: "编辑",
tip: "编辑",
},
tbitem7: {
caption: "-",
tip: "",
},
tbitem8: {
caption: "删除",
tip: "删除",
},
},
stopgridviewtoolbar_toolbar: {
usablegridviewtoolbar_toolbar: {
tbitem1_openquickcreateview: {
caption: "新建",
tip: "新建",
......@@ -873,9 +865,9 @@ export default {
caption: "-",
tip: "",
},
tbitem14_active: {
caption: "激活",
tip: "激活",
tbitem14_inactive: {
caption: "停用",
tip: "停用",
},
tbitem15: {
caption: "-",
......@@ -886,7 +878,7 @@ export default {
tip: "过滤",
},
},
gridviewtoolbar_toolbar: {
stopgridviewtoolbar_toolbar: {
tbitem1_openquickcreateview: {
caption: "新建",
tip: "新建",
......@@ -923,6 +915,14 @@ export default {
caption: "-",
tip: "",
},
tbitem14_active: {
caption: "激活",
tip: "激活",
},
tbitem15: {
caption: "-",
tip: "",
},
tbitem19: {
caption: "过滤",
tip: "过滤",
......@@ -937,4 +937,11 @@ export default {
account_remove: "删除",
},
},
gradation_treegridex: {
uiactions: {
account_openmaineditview: "编辑",
account_inactive: "停用",
account_remove: "删除",
},
},
};
\ No newline at end of file
......@@ -73,44 +73,6 @@ export default {
uiactions: {
},
},
gridviewtoolbar_toolbar: {
tbitem3: {
caption: "New",
tip: "New",
},
tbitem4: {
caption: "Edit",
tip: "Edit {0}",
},
tbitem6: {
caption: "Copy",
tip: "Copy {0}",
},
tbitem7: {
caption: "-",
tip: "",
},
tbitem8: {
caption: "Remove",
tip: "Remove {0}",
},
tbitem9: {
caption: "-",
tip: "",
},
tbitem13: {
caption: "Export",
tip: "Export {0} Data To Excel",
},
tbitem10: {
caption: "-",
tip: "",
},
tbitem19: {
caption: "Filter",
tip: "Filter",
},
},
editviewtoolbar_toolbar: {
tbitem3: {
caption: "Save",
......@@ -149,4 +111,42 @@ export default {
tip: "Copy {0}",
},
},
gridviewtoolbar_toolbar: {
tbitem3: {
caption: "New",
tip: "New",
},
tbitem4: {
caption: "Edit",
tip: "Edit {0}",
},
tbitem6: {
caption: "Copy",
tip: "Copy {0}",
},
tbitem7: {
caption: "-",
tip: "",
},
tbitem8: {
caption: "Remove",
tip: "Remove {0}",
},
tbitem9: {
caption: "-",
tip: "",
},
tbitem13: {
caption: "Export",
tip: "Export {0} Data To Excel",
},
tbitem10: {
caption: "-",
tip: "",
},
tbitem19: {
caption: "Filter",
tip: "Filter",
},
},
};
\ No newline at end of file
......@@ -72,44 +72,6 @@ export default {
uiactions: {
},
},
gridviewtoolbar_toolbar: {
tbitem3: {
caption: "新建",
tip: "新建",
},
tbitem4: {
caption: "编辑",
tip: "编辑",
},
tbitem6: {
caption: "拷贝",
tip: "拷贝",
},
tbitem7: {
caption: "-",
tip: "",
},
tbitem8: {
caption: "删除",
tip: "删除",
},
tbitem9: {
caption: "-",
tip: "",
},
tbitem13: {
caption: "导出",
tip: "导出",
},
tbitem10: {
caption: "-",
tip: "",
},
tbitem19: {
caption: "过滤",
tip: "过滤",
},
},
editviewtoolbar_toolbar: {
tbitem3: {
caption: "保存",
......@@ -148,4 +110,42 @@ export default {
tip: "拷贝",
},
},
gridviewtoolbar_toolbar: {
tbitem3: {
caption: "新建",
tip: "新建",
},
tbitem4: {
caption: "编辑",
tip: "编辑",
},
tbitem6: {
caption: "拷贝",
tip: "拷贝",
},
tbitem7: {
caption: "-",
tip: "",
},
tbitem8: {
caption: "删除",
tip: "删除",
},
tbitem9: {
caption: "-",
tip: "",
},
tbitem13: {
caption: "导出",
tip: "导出",
},
tbitem10: {
caption: "-",
tip: "",
},
tbitem19: {
caption: "过滤",
tip: "过滤",
},
},
};
\ No newline at end of file
......@@ -3,7 +3,7 @@
import { Component } from 'vue-property-decorator';
import { VueLifeCycleProcessing } from '@/studio-core';
import { AccountTreeGridExViewBase } from './account-tree-grid-ex-view-base';
import view_treegridex from '@widgets/app/channel-content-treegridex/channel-content-treegridex.vue';
import view_treegridex from '@widgets/account/gradation-treegridex/gradation-treegridex.vue';
/**
* 客户树表格视图视图
......
import { Prop, Provide, Emit, Model } from 'vue-property-decorator';
import { Subject, Subscription } from 'rxjs';
import { Watch, MainControlBase } from '@/studio-core';
import AccountService from '@/service/account/account-service';
import GradationService from './gradation-treegridex-service';
import AccountUIService from '@/uiservice/account/account-ui-service';
/**
* treegridex部件基类
*
* @export
* @class MainControlBase
* @extends {GradationTreegridexBase}
*/
export class GradationTreegridexBase extends MainControlBase {
/**
* 获取部件类型
*
* @protected
* @type {string}
* @memberof GradationTreegridexBase
*/
protected controlType: string = 'TREEGRIDEX';
/**
* 建构部件服务对象
*
* @type {GradationService}
* @memberof GradationTreegridexBase
*/
public service: GradationService = new GradationService({ $store: this.$store });
/**
* 实体服务对象
*
* @type {AccountService}
* @memberof GradationTreegridexBase
*/
public appEntityService: AccountService = new AccountService({ $store: this.$store });
/**
* 应用实体名称
*
* @protected
* @type {string}
* @memberof GradationTreegridexBase
*/
protected appDeName: string = 'account';
/**
* childaccount_cm 部件 click 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof GradationTreegridexBase
*/
public childaccount_cm_click($event: any, $event2?: any) {
if (Object.is($event.tag, 'deuiaction1')) {
this.childaccount_cm_deuiaction1_click(null, 'childaccount_cm', $event2);
}
if (Object.is($event.tag, 'deuiaction3')) {
this.childaccount_cm_deuiaction3_click(null, 'childaccount_cm', $event2);
}
if (Object.is($event.tag, 'deuiaction2')) {
this.childaccount_cm_deuiaction2_click(null, 'childaccount_cm', $event2);
}
}
/**
* rootaccount_cm 部件 click 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof GradationTreegridexBase
*/
public rootaccount_cm_click($event: any, $event2?: any) {
if (Object.is($event.tag, 'deuiaction1')) {
this.rootaccount_cm_deuiaction1_click(null, 'rootaccount_cm', $event2);
}
if (Object.is($event.tag, 'deuiaction3')) {
this.rootaccount_cm_deuiaction3_click(null, 'rootaccount_cm', $event2);
}
if (Object.is($event.tag, 'deuiaction2')) {
this.rootaccount_cm_deuiaction2_click(null, 'rootaccount_cm', $event2);
}
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public rootaccount_cm_deuiaction1_click(params: any = {}, tag?: any, $event?: any) {
// 参数
// 取数
let datas: any[] = [];
let xData: any = null;
// _this 指向容器对象
const _this: any = this;
let paramJO:any = {};
let contextJO:any = {};
xData = this;
if (_this.getDatas && _this.getDatas instanceof Function) {
datas = [..._this.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
const curUIService:AccountUIService = new AccountUIService();
curUIService.Account_OpenMainEditView(datas,contextJO, paramJO, $event, xData,this,"Account");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public rootaccount_cm_deuiaction3_click(params: any = {}, tag?: any, $event?: any) {
// 参数
// 取数
let datas: any[] = [];
let xData: any = null;
// _this 指向容器对象
const _this: any = this;
let paramJO:any = {};
let contextJO:any = {};
xData = this;
if (_this.getDatas && _this.getDatas instanceof Function) {
datas = [..._this.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
const curUIService:AccountUIService = new AccountUIService();
curUIService.Account_Inactive(datas,contextJO, paramJO, $event, xData,this,"Account");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public rootaccount_cm_deuiaction2_click(params: any = {}, tag?: any, $event?: any) {
// 参数
// 取数
let datas: any[] = [];
let xData: any = null;
// _this 指向容器对象
const _this: any = this;
let paramJO:any = {};
let contextJO:any = {};
xData = this;
if (_this.getDatas && _this.getDatas instanceof Function) {
datas = [..._this.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
const curUIService:AccountUIService = new AccountUIService();
curUIService.Account_Remove(datas,contextJO, paramJO, $event, xData,this,"Account");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public childaccount_cm_deuiaction1_click(params: any = {}, tag?: any, $event?: any) {
// 参数
// 取数
let datas: any[] = [];
let xData: any = null;
// _this 指向容器对象
const _this: any = this;
let paramJO:any = {};
let contextJO:any = {};
xData = this;
if (_this.getDatas && _this.getDatas instanceof Function) {
datas = [..._this.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
const curUIService:AccountUIService = new AccountUIService();
curUIService.Account_OpenMainEditView(datas,contextJO, paramJO, $event, xData,this,"Account");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public childaccount_cm_deuiaction3_click(params: any = {}, tag?: any, $event?: any) {
// 参数
// 取数
let datas: any[] = [];
let xData: any = null;
// _this 指向容器对象
const _this: any = this;
let paramJO:any = {};
let contextJO:any = {};
xData = this;
if (_this.getDatas && _this.getDatas instanceof Function) {
datas = [..._this.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
const curUIService:AccountUIService = new AccountUIService();
curUIService.Account_Inactive(datas,contextJO, paramJO, $event, xData,this,"Account");
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public childaccount_cm_deuiaction2_click(params: any = {}, tag?: any, $event?: any) {
// 参数
// 取数
let datas: any[] = [];
let xData: any = null;
// _this 指向容器对象
const _this: any = this;
let paramJO:any = {};
let contextJO:any = {};
xData = this;
if (_this.getDatas && _this.getDatas instanceof Function) {
datas = [..._this.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
const curUIService:AccountUIService = new AccountUIService();
curUIService.Account_Remove(datas,contextJO, paramJO, $event, xData,this,"Account");
}
/**
* 显示处理提示
*
* @type {boolean}
* @memberof Gradation
*/
@Prop({ default: true }) public showBusyIndicator?: boolean;
/**
* 部件行为--load
*
* @type {string}
* @memberof Gradation
*/
@Prop() public loadAction!: string;
/**
* 是否单选
*
* @type {boolean}
* @memberof Gradation
*/
@Prop({ default: true }) public isSingleSelect!: boolean;
/**
* 部件样式名
*
* @public
* @type {any[]}
* @memberof Gradation
*/
public controlClass: string = "treegridex";
/**
* 数据集合
*
* @public
* @type {any[]}
* @memberof Gradation
*/
public items: any[] = [];
/**
* 默认展开节点集合
*
* @memberof Gradation
*/
public defExpands: any = [];
/**
* 行节点下标
*
* @memberof Gradation
*/
public itemNum: any = {};
/**
* 计数下标
*
* @memberof Gradation
*/
public num: number = 0;
/**
* 获取列属性值
*
* @public
* @memberof Gradation
*/
public getColumnValue(task: any, field: string) {
if(Object.is(task.id.split(';')[0], 'RootAccount')) {
return task[field];
}
if(Object.is(task.id.split(';')[0], 'ChildAccount')) {
return task[field];
}
}
/**
* 获取代码项
*
* @public
* @memberof Gradation
*/
public getCodeListItem(codelist: any, val: any) {
for(let i = 0; i < codelist.items.length; i++) {
if(Object.is(codelist.items[i].value, val)) {
return codelist.items[i].text;
}
}
return codelist.emptytext;
}
/**
* 搜索获取日程事件
*
* @param {*} $event 日期信息
* @memberof Gradation
*/
public load(task: any = {}, resolve?: any) {
const params: any = {
srfnodeid: task && task.id ? task.id : "#",
srfnodefilter: ''
};
let tempViewParams:any = JSON.parse(JSON.stringify(this.viewparams));
let curNode:any = {};
this.$util.deepObjectMerge(curNode, task);
let tempContext:any = this.computecurNodeContext(curNode);
if(curNode && curNode.srfparentdename) {
Object.assign(tempContext,{ srfparentdename: curNode.srfparentdename });
Object.assign(tempViewParams,{ srfparentdename: curNode.srfparentdename });
}
if(curNode && curNode.srfparentkey) {
Object.assign(tempContext,{ srfparentkey: curNode.srfparentkey });
Object.assign(tempViewParams,{ srfparentkey: curNode.srfparentkey });
}
Object.assign(params,{viewparams:tempViewParams});
this.service.getNodes(tempContext,params).then((response: any) => {
if (!response || response.status !== 200) {
this.$Notice.error({ title: "错误", desc: response.info });
return;
}
response.data.forEach((item: any) => {
this.itemNum[item.id] = this.num++;
if(!item.collapsed) {
this.defExpands.push(item);
}
})
if(resolve && resolve instanceof Function) {
resolve(response.data);
} else {
this.items = [...response.data];
}
this.$nextTick(() => {
this.expandDefNode();
})
this.$emit("load", this.items);
}).catch((response: any) => {
if (response && response.status === 401) {
return;
}
this.$Notice.error({ title: "错误", desc: response.info });
});
}
/**
* 加载节点
*
* @memberof TreeTable
*/
public loadTreeNode(tree: any, treeNode: any, resolve: any) {
this.load(tree, resolve);
}
/**
* 计算当前节点的上下文
*
* @param {*} curNode 当前节点
* @memberof Gradation
*/
public computecurNodeContext(curNode:any){
let tempContext:any = {};
if(curNode && curNode.data && curNode.data.srfappctx){
tempContext = JSON.parse(JSON.stringify(curNode.data.srfappctx));
}else{
tempContext = JSON.parse(JSON.stringify(this.context));
}
return tempContext;
}
/**
* 节点展开
*
* @param {*} item 当前节点
* @memberof Gradation
*/
public itemExpand(item: any) {
}
/**
* 刷新
*
* @memberof Gradation
*/
public refresh() {
this.load();
}
/**
* 选中的数据
*
* @returns {any[]}
* @memberof Gradation
*/
public selections: any[] = [];
/**
* 获取多项数据
*
* @returns {any[]}
* @memberof Gradation
*/
public getDatas(): any[] {
return this.selections;
}
/**
* 获取单项树
*
* @returns {*}
* @memberof Gradation
*/
public getData(): any {
return null;
}
/**
* vue 生命周期
*
* @returns
* @memberof Gradation
*/
public created() {
this.load();
}
/**
* 设置行Class
*
* @returns
* @memberof Gradation
*/
public setRowClass({row, rowIndex}: {row: any, rowIndex: number}) {
return 'treegrid' + this.itemNum[row.id];
}
/**
* 展开默认节点
*
* @returns
* @memberof Gradation
*/
public expandDefNode() {
if(this.defExpands.length > 0) {
let item: any = this.defExpands[0];
this.defExpands.splice(0, 1);
let trs: any = this.$el.getElementsByClassName('treegrid' + this.itemNum[item.id]);
if(trs) {
let icons: any = trs[0].getElementsByClassName('el-table__expand-icon');
icons[0].click();
}
}
}
/**
* 选中变化
*
* @returns
* @memberof Gradation
*/
public select($event: any) {
if (!$event) {
return;
}
this.selections = [JSON.parse(JSON.stringify($event))];
this.$emit('selectionchange', this.selections);
}
}
\ No newline at end of file
/**
* Gradation 部件模型
*
* @export
* @class GradationModel
*/
export default class GradationModel {
/**
* 日历项类型
*
* @returns {any[]}
* @memberof GradationTreegridexMode
*/
public itemType: string = "";
/**
* 获取数据项集合
*
* @returns {any[]}
* @memberof GradationTreegridexMode
*/
public getDataItems(): any[] {
let dataItems: any = [
// 前端新增修改标识,新增为"0",修改为"1"或未设值
{
name: 'srffrontuf',
prop: 'srffrontuf',
dataType: 'TEXT',
},
{
name: 'style',
},
{
name: 'textColor',
},
{
name: 'itemType',
},
{
name: 'parentId'
},
{
name: 'query',
prop: 'query',
},
];
switch(this.itemType){
case "RootAccount":
dataItems = [...dataItems,
{
name: 'id',
prop: 'accountid'
},
{
name: 'telephone1',
prop: 'telephone1'
},
{
name: 'accountname',
prop: 'accountname'
},
];
break;
case "ChildAccount":
dataItems = [...dataItems,
{
name: 'id',
prop: 'accountid'
},
{
name: 'accountname',
prop: 'accountname'
},
{
name: 'telephone1',
prop: 'telephone1'
},
];
break;
}
return dataItems;
}
}
\ No newline at end of file
!!!!模版产生代码错误:----
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: ${srfclassname(ctrl.getRootPSDETreeNo... [in template "TEMPLCODE_zh_CN" at line 198, column 28]
----
\ No newline at end of file
<el-table ref="treegridex"
:data="items"
row-key="id"
border
lazy
height="100%"
:row-class-name="setRowClass"
:load="loadTreeNode.bind(_self)"
:tree-props="{ children: 'children', hasChildren: 'leaf' }"
:select-on-indeterminate="isSingleSelect"
@current-change="select.apply(_self, arguments)"
>
<el-table-column show-overflow-tooltip prop="accountname" label="客户名称" :width="50" :align="''">
<template v-slot="{ row }">
<span>{{ getColumnValue(row, 'accountname') }}</span>
</template>
</el-table-column>
<el-table-column show-overflow-tooltip prop="telephone1" label="主要电话" :width="100" :align="''">
<template v-slot="{ row }">
<span>{{ getColumnValue(row, 'telephone1') }}</span>
</template>
</el-table-column>
</el-table>
\ No newline at end of file
<template src="./gradation-treegridex.html"/>
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import { VueLifeCycleProcessing } from '@/studio-core';
import { GradationTreegridexBase } from './gradation-treegridex-base';
/**
* treegridex部件
*
* @export
* @class GradationTreegridex
* @extends {GradationTreegridexBase}
*/
@Component({
components: {
}
})
@VueLifeCycleProcessing()
export default class GradationTreegridex extends GradationTreegridexBase { }
</script>
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册