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

xignzi006 发布系统代码

上级 67986e09
...@@ -49,6 +49,16 @@ ...@@ -49,6 +49,16 @@
"viewtag": "97f41e16790401fccbc7d297a6e37e93", "viewtag": "97f41e16790401fccbc7d297a6e37e93",
"memo": "系统自动添加" "memo": "系统自动添加"
}, },
"websitechannelcontenttreeview": {
"title": "频道内容",
"caption": "频道内容",
"viewtype": "DETREEEXPVIEW",
"viewmodule": "WebSite",
"viewname": "WebSiteChannelContentTreeView",
"viewfilename": "web-site-channel-content-tree-view",
"viewtag": "9b9de8c2724ef66a73380159197e7d72",
"memo": ""
},
"websitechanneleditview": { "websitechanneleditview": {
"title": "站点频道", "title": "站点频道",
"caption": "站点频道", "caption": "站点频道",
......
...@@ -136,7 +136,8 @@ export default class AppFileUpload extends Vue { ...@@ -136,7 +136,8 @@ export default class AppFileUpload extends Vue {
if (this.ignorefieldvaluechange) { if (this.ignorefieldvaluechange) {
return; return;
} }
this.setFiles(newval) this.getParams();
this.setFiles(newval);
this.dataProcess(); this.dataProcess();
} }
...@@ -288,6 +289,7 @@ export default class AppFileUpload extends Vue { ...@@ -288,6 +289,7 @@ export default class AppFileUpload extends Vue {
this.formStateEvent = this.formState.subscribe(($event: any) => { this.formStateEvent = this.formState.subscribe(($event: any) => {
// 表单加载完成 // 表单加载完成
if (Object.is($event.type, 'load')) { if (Object.is($event.type, 'load')) {
this.getParams();
this.setFiles(this.value); this.setFiles(this.value);
this.dataProcess(); this.dataProcess();
} }
...@@ -303,28 +305,37 @@ export default class AppFileUpload extends Vue { ...@@ -303,28 +305,37 @@ export default class AppFileUpload extends Vue {
*/ */
public mounted() { public mounted() {
this.appData = this.$store.getters.getAppData(); this.appData = this.$store.getters.getAppData();
this.getParams();
this.setFiles(this.value);
this.dataProcess();
}
let uploadparams: any = {}; /**
let exportparams: any = {}; *获取上传,导出参数
*
*@memberof AppFileUpload
*/
public getParams(){
let uploadparams: any = JSON.parse(JSON.stringify(this.uploadparams));
let exportparams: any = JSON.parse(JSON.stringify(this.exportparams));
let upload_params: Array<string> = []; let upload_params: Array<string> = [];
let export_params: Array<string> = []; let export_params: Array<string> = [];
let custom_arr: Array<string> = [];
let param:any = this.viewparams; let param:any = this.viewparams;
let context:any = this.context; let context:any = this.context;
let _data:any = JSON.parse(this.data); let _data:any = JSON.parse(this.data);
if (this.uploadparams && !Object.is(this.uploadparams, '')) { if (this.uploadparams && !Object.is(this.uploadparams, '')) {
uploadparams = this.uploadparams;
upload_params = this.$util.computedNavData(_data,param,context,uploadparams); upload_params = this.$util.computedNavData(_data,param,context,uploadparams);
} }
if (this.exportparams && !Object.is(this.exportparams, '')) { if (this.exportparams && !Object.is(this.exportparams, '')) {
exportparams = this.exportparams;
export_params = this.$util.computedNavData(_data,param,context,exportparams); export_params = this.$util.computedNavData(_data,param,context,exportparams);
} }
this.upload_params = [];
this.export_params = [];
for (const item in upload_params) { for (const item in upload_params) {
this.upload_params.push({ this.upload_params.push({
[item]:upload_params[item] [item]:upload_params[item]
...@@ -335,9 +346,6 @@ export default class AppFileUpload extends Vue { ...@@ -335,9 +346,6 @@ export default class AppFileUpload extends Vue {
[item]:export_params[item] [item]:export_params[item]
}) })
} }
this.setFiles(this.value);
this.dataProcess();
} }
/** /**
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
:filterable="filterable === true ? true : false" :filterable="filterable === true ? true : false"
@on-open-change="onClick" @on-open-change="onClick"
:placeholder="$t('components.dropDownListMpicker.placeholder')"> :placeholder="$t('components.dropDownListMpicker.placeholder')">
<i-option v-for="(item, index) in items" :key="index" :value="item.value" :label="item.text"> <i-option v-for="(item, index) in items" :key="index" :value="item.value.toString()" :label="item.text">
<Checkbox :value = "(currentVal.indexOf(item.value))==-1?false:true"> <Checkbox :value = "(currentVal.indexOf(item.value))==-1?false:true">
{{Object.is(codelistType,'STATIC') ? $t('codelist.'+tag+'.'+item.value) : item.text}} {{Object.is(codelistType,'STATIC') ? $t('codelist.'+tag+'.'+item.value) : item.text}}
</Checkbox> </Checkbox>
......
...@@ -7,12 +7,12 @@ ...@@ -7,12 +7,12 @@
<div ref="scrollChild" class="tags-container" :style="{left: styleLeft + 'px'}"> <div ref="scrollChild" class="tags-container" :style="{left: styleLeft + 'px'}">
<transition-group name="tags-transition"> <transition-group name="tags-transition">
<template v-for="(item, index) of appService.navHistory.historyList"> <template v-for="(item, index) of appService.navHistory.historyList">
<Tag ref="tagElement" :key="index" :class="isActive(item) ? 'tag-is-active' : ''" :name="index" closable @click.native="changePage(item)" @on-close="onClose(item)"> <Tag ref="tagElement" :key="item.tag + index" :class="isActive(item) ? 'tag-is-active' : ''" :name="index" closable @click.native="changePage(item)" @on-close="onClose(item)">
<div class="tag-text"> <div class="tag-text">
<div :title="getCaption(item.meta.caption, item.meta.info)" style="max-width: 300px;"> <div :title="item.title" style="max-width: 300px;">
<i v-if="item.meta.iconCls && !Object.is(item.meta.iconCls, '')" :class="item.meta.iconCls"></i> <i v-if="item.meta.iconCls && !Object.is(item.meta.iconCls, '')" :class="item.meta.iconCls"></i>
<img v-else :src="item.meta.imgPath" class="text-icon" /> <img v-else :src="item.meta.imgPath" class="text-icon" />
&nbsp;{{getCaption(item.meta.caption, item.meta.info)}} &nbsp;{{item.title}}
</div> </div>
</div> </div>
</Tag> </Tag>
...@@ -63,10 +63,6 @@ export default class TabPageExp extends Vue { ...@@ -63,10 +63,6 @@ export default class TabPageExp extends Vue {
Vue.prototype.$tabPageExp = this; Vue.prototype.$tabPageExp = this;
} }
public getCaption(caption: any, info: any):any {
return info && !Object.is(info, '') ? `${this.$t(caption)} - ${info}` : this.$t(caption);
}
/** /**
* 向左移动 * 向左移动
* *
...@@ -107,10 +103,7 @@ export default class TabPageExp extends Vue { ...@@ -107,10 +103,7 @@ export default class TabPageExp extends Vue {
* @memberof TabPageExp * @memberof TabPageExp
*/ */
public isActive(item: HistoryItem): boolean { public isActive(item: HistoryItem): boolean {
if (Object.is(item.to.fullPath, this.$route.fullPath)) { return this.appService.navHistory.isRouteSame(item.to, this.$route);
return true;
}
return false;
} }
/** /**
...@@ -129,14 +122,24 @@ export default class TabPageExp extends Vue { ...@@ -129,14 +122,24 @@ export default class TabPageExp extends Vue {
content: content, content: content,
onOk: () => { onOk: () => {
this.appService.navHistory.remove(item); this.appService.navHistory.remove(item);
this.gotoPage(item.to); if (this.appService.navHistory.historyList.length > 0) {
}, if (this.appService.navHistory.isRouteSame(item.to, this.$route)) {
onCancel: () => { this.$router.back();
}
} else {
this.$router.push('/');
}
} }
}); });
} else { } else {
this.appService.navHistory.remove(item); this.appService.navHistory.remove(item);
this.gotoPage(item.to); if (this.appService.navHistory.historyList.length > 0) {
if (this.appService.navHistory.isRouteSame(item.to, this.$route)) {
this.$router.back();
}
} else {
this.$router.push('/');
}
} }
} }
...@@ -170,7 +173,7 @@ export default class TabPageExp extends Vue { ...@@ -170,7 +173,7 @@ export default class TabPageExp extends Vue {
* @memberof TabPageExp * @memberof TabPageExp
*/ */
public gotoPage(page?: any) { public gotoPage(page?: any) {
if (page) { if (page && this.appService.navHistory.historyList.length > 0) {
if (Object.is(page.fullPath, this.$route.fullPath)) { if (Object.is(page.fullPath, this.$route.fullPath)) {
return; return;
} }
...@@ -178,29 +181,13 @@ export default class TabPageExp extends Vue { ...@@ -178,29 +181,13 @@ export default class TabPageExp extends Vue {
} else { } else {
const path: string | null = window.sessionStorage.getItem(Environment.AppName); const path: string | null = window.sessionStorage.getItem(Environment.AppName);
if(path) { if(path) {
this.$router.push({path: path}); this.$router.push({ path: path });
} else { } else {
this.$router.push('/'); this.$router.push('/');
} }
} }
} }
/**
* 设置当前页标题
*
* @param {*} caption
* @memberof TabPageExp
*/
public setCurPageCaption(caption: string, title: any, info: string) {
if(this.$route.meta && (!Object.is(this.$route.meta.caption, caption))) {
return;
}
this.appService.navHistory.setCaption({ route: this.$route, caption: title, info: info });
setTimeout(() => {
this.moveToView(this.$route);
}, 1);
}
/** /**
* 移动至指定页面标签 * 移动至指定页面标签
* *
......
...@@ -248,13 +248,12 @@ export default class EditViewEngine extends ViewEngine { ...@@ -248,13 +248,12 @@ 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;
if (viewdata && info && !Object.is(info, '') && this.view.$tabPageExp && (viewdata.srfTitle.indexOf(" - ") === -1)) { if (viewdata && info && !Object.is(info, '') && this.view.$tabPageExp && (viewdata.srfTitle.indexOf(" - ") === -1)) {
this.view.$tabPageExp.setCurPageCaption(viewdata.srfTitle, viewdata.srfTitle, info);
if(this.view.$route){ if(this.view.$route){
this.view.$route.meta.info = info; this.view.$route.meta.info = info;
} }
const title = this.view.model.srfTitle = `${this.view.$t(viewdata.srfTitle)} - ${viewdata.dataInfo}`; const title = this.view.model.srfTitle = `${this.view.$t(viewdata.srfTitle)} - ${viewdata.dataInfo}`;
this.view.$emit('viewModelChange', title); this.view.$emit('viewModelChange', title);
this.view.$appService.navHistory.setCaption({ route: this.view.$route, info: viewdata.dataInfo }); this.view.$appService.navHistory.setCaption({ tag: this.view.viewtag, info: viewdata.dataInfo });
} }
} }
......
...@@ -22,6 +22,10 @@ export default { ...@@ -22,6 +22,10 @@ export default {
caption: "站点频道", caption: "站点频道",
title: "站点频道", title: "站点频道",
}, },
contenttreeview: {
caption: "频道内容",
title: "频道内容",
},
editview: { editview: {
caption: "站点频道", caption: "站点频道",
title: "站点频道", title: "站点频道",
...@@ -143,4 +147,11 @@ export default { ...@@ -143,4 +147,11 @@ export default {
tip: "Copy {0}", tip: "Copy {0}",
}, },
}, },
channeltree_treeview: {
nodes: {
root: "默认根节点",
},
uiactions: {
},
},
}; };
\ No newline at end of file
...@@ -21,6 +21,10 @@ export default { ...@@ -21,6 +21,10 @@ export default {
caption: "站点频道", caption: "站点频道",
title: "站点频道", title: "站点频道",
}, },
contenttreeview: {
caption: "频道内容",
title: "频道内容",
},
editview: { editview: {
caption: "站点频道", caption: "站点频道",
title: "站点频道", title: "站点频道",
...@@ -142,4 +146,11 @@ export default { ...@@ -142,4 +146,11 @@ export default {
tip: "拷贝", tip: "拷贝",
}, },
}, },
channeltree_treeview: {
nodes: {
root: "默认根节点",
},
uiactions: {
},
},
}; };
\ No newline at end of file
...@@ -516,6 +516,95 @@ mock.onGet(new RegExp(/^\/websitechannels\/fetchdefault(\?[\w-./?%&=,]*)*$/)).re ...@@ -516,6 +516,95 @@ mock.onGet(new RegExp(/^\/websitechannels\/fetchdefault(\?[\w-./?%&=,]*)*$/)).re
return [status, records ? records : []]; return [status, records ? records : []];
}); });
// FetchRoot
mock.onGet(new RegExp(/^\/websites\/([a-zA-Z0-9\-\;]{1,35})\/websitechannels\/fetchroot$/)).reply((config: any) => {
console.groupCollapsed("实体:websitechannel 方法: FetchRoot");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
const paramArray:Array<any> = ['websiteid'];
let tempValue: any = {};
const matchArray:any = new RegExp(/^\/websites\/([a-zA-Z0-9\-\;]{1,35})\/websitechannels\/fetchroot$/).exec(config.url);
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => {
Object.defineProperty(tempValue, item, {
enumerable: true,
value: matchArray[index + 1]
});
});
}
let items = mockDatas ? mockDatas : [];
if (items.length > 0 && paramArray.length > 0) {
paramArray.forEach((paramkey: any) => {
if (tempValue[paramkey] && tempValue[paramkey].indexOf(";") > 0) {
let keysGrounp: Array<any> = tempValue[paramkey].split(new RegExp(/[\;]/));
let tempArray: Array<any> = [];
keysGrounp.forEach((singlekey: any) => {
let _items = items.filter((item: any) => { return item[paramkey] == singlekey });
if(_items.length >0){
tempArray.push(..._items);
}
})
items = tempArray;
} else {
items = items.filter((item: any) => { return item[paramkey] == tempValue[paramkey] });
}
})
}
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(items);
console.groupEnd();
console.groupEnd();
return [status, items];
});
// FetchRoot
mock.onGet(new RegExp(/^\/websitechannels\/fetchroot$/)).reply((config: any) => {
console.groupCollapsed("实体:websitechannel 方法: FetchRoot");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(mockDatas);
console.groupEnd();
console.groupEnd();
return [status, mockDatas ? mockDatas : []];
});
// FetchRoot
mock.onGet(new RegExp(/^\/websitechannels\/fetchroot(\?[\w-./?%&=,]*)*$/)).reply((config: any) => {
console.groupCollapsed("实体:websitechannel 方法: FetchRoot");
console.table({url:config.url, method: config.method, data:config.data});
if(config.url.includes('page')){
let url = config.url.split('?')[1];
let params = qs.parse(url);
Object.assign(config, params);
}
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
let total = mockDatas.length;
let records: Array<any> = [];
if(!config.page || !config.size){
records = mockDatas;
}else{
if((config.page-1)*config.size < total){
records = mockDatas.slice(config.page,config.size);
}
}
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(records ? records : []);
console.groupEnd();
console.groupEnd();
return [status, records ? records : []];
});
// URI参数传递情况未实现 // URI参数传递情况未实现
// URI参数传递情况未实现 // URI参数传递情况未实现
......
...@@ -47,6 +47,14 @@ mock.onGet('./assets/json/view-config.json').reply((config: any) => { ...@@ -47,6 +47,14 @@ mock.onGet('./assets/json/view-config.json').reply((config: any) => {
"viewname": "WebSiteEditView", "viewname": "WebSiteEditView",
"viewtag": "97f41e16790401fccbc7d297a6e37e93" "viewtag": "97f41e16790401fccbc7d297a6e37e93"
}, },
"websitechannelcontenttreeview": {
"title": "频道内容",
"caption": "频道内容",
"viewtype": "DETREEEXPVIEW",
"viewmodule": "WebSite",
"viewname": "WebSiteChannelContentTreeView",
"viewtag": "9b9de8c2724ef66a73380159197e7d72"
},
"websitechanneleditview": { "websitechanneleditview": {
"title": "站点频道", "title": "站点频道",
"caption": "站点频道", "caption": "站点频道",
......
...@@ -3,9 +3,10 @@ export const PageComponents = { ...@@ -3,9 +3,10 @@ export const PageComponents = {
Vue.component('web-site-grid-view', () => import('@pages/web-site/web-site-grid-view/web-site-grid-view.vue')); Vue.component('web-site-grid-view', () => import('@pages/web-site/web-site-grid-view/web-site-grid-view.vue'));
Vue.component('web-site-channel-edit-view', () => import('@pages/web-site/web-site-channel-edit-view/web-site-channel-edit-view.vue')); Vue.component('web-site-channel-edit-view', () => import('@pages/web-site/web-site-channel-edit-view/web-site-channel-edit-view.vue'));
Vue.component('web-site-content-grid-view', () => import('@pages/web-site/web-site-content-grid-view/web-site-content-grid-view.vue')); Vue.component('web-site-content-grid-view', () => import('@pages/web-site/web-site-content-grid-view/web-site-content-grid-view.vue'));
Vue.component('web-site-channel-content-tree-view', () => import('@pages/web-site/web-site-channel-content-tree-view/web-site-channel-content-tree-view.vue'));
Vue.component('web-site-edit-view', () => import('@pages/web-site/web-site-edit-view/web-site-edit-view.vue')); Vue.component('web-site-edit-view', () => import('@pages/web-site/web-site-edit-view/web-site-edit-view.vue'));
Vue.component('web-site-resource-edit-view', () => import('@pages/web-site/web-site-resource-edit-view/web-site-resource-edit-view.vue'));
Vue.component('web-site-content-edit-view', () => import('@pages/web-site/web-site-content-edit-view/web-site-content-edit-view.vue')); Vue.component('web-site-content-edit-view', () => import('@pages/web-site/web-site-content-edit-view/web-site-content-edit-view.vue'));
Vue.component('web-site-resource-edit-view', () => import('@pages/web-site/web-site-resource-edit-view/web-site-resource-edit-view.vue'));
Vue.component('web-site-channel-grid-view', () => import('@pages/web-site/web-site-channel-grid-view/web-site-channel-grid-view.vue')); Vue.component('web-site-channel-grid-view', () => import('@pages/web-site/web-site-channel-grid-view/web-site-channel-grid-view.vue'));
Vue.component('web-site-resource-grid-view', () => import('@pages/web-site/web-site-resource-grid-view/web-site-resource-grid-view.vue')); Vue.component('web-site-resource-grid-view', () => import('@pages/web-site/web-site-resource-grid-view/web-site-resource-grid-view.vue'));
} }
......
...@@ -151,47 +151,47 @@ const router = new Router({ ...@@ -151,47 +151,47 @@ const router = new Router({
component: () => import('@pages/web-site/web-site-content-grid-view/web-site-content-grid-view.vue'), component: () => import('@pages/web-site/web-site-content-grid-view/web-site-content-grid-view.vue'),
}, },
{ {
path: 'websites/:website?/editview/:editview?', path: 'websites/:website?/websitechannels/:websitechannel?/contenttreeview/:contenttreeview?',
meta: { meta: {
caption: 'entities.website.views.editview.title', caption: 'entities.websitechannel.views.contenttreeview.title',
info:'', info:'',
parameters: [ parameters: [
{ pathName: 'website', parameterName: 'website' }, { pathName: 'website', parameterName: 'website' },
{ pathName: 'websites', parameterName: 'website' }, { pathName: 'websites', parameterName: 'website' },
{ pathName: 'editview', parameterName: 'editview' }, { pathName: 'websitechannels', parameterName: 'websitechannel' },
{ pathName: 'contenttreeview', parameterName: 'contenttreeview' },
], ],
requireAuth: true, requireAuth: true,
}, },
component: () => import('@pages/web-site/web-site-edit-view/web-site-edit-view.vue'), component: () => import('@pages/web-site/web-site-channel-content-tree-view/web-site-channel-content-tree-view.vue'),
}, },
{ {
path: 'websites/:website?/websiteresources/:websiteresource?/editview/:editview?', path: 'websitechannels/:websitechannel?/contenttreeview/:contenttreeview?',
meta: { meta: {
caption: 'entities.websiteresource.views.editview.title', caption: 'entities.websitechannel.views.contenttreeview.title',
info:'', info:'',
parameters: [ parameters: [
{ pathName: 'website', parameterName: 'website' }, { pathName: 'website', parameterName: 'website' },
{ pathName: 'websites', parameterName: 'website' }, { pathName: 'websitechannels', parameterName: 'websitechannel' },
{ pathName: 'websiteresources', parameterName: 'websiteresource' }, { pathName: 'contenttreeview', parameterName: 'contenttreeview' },
{ pathName: 'editview', parameterName: 'editview' },
], ],
requireAuth: true, requireAuth: true,
}, },
component: () => import('@pages/web-site/web-site-resource-edit-view/web-site-resource-edit-view.vue'), component: () => import('@pages/web-site/web-site-channel-content-tree-view/web-site-channel-content-tree-view.vue'),
}, },
{ {
path: 'websiteresources/:websiteresource?/editview/:editview?', path: 'websites/:website?/editview/:editview?',
meta: { meta: {
caption: 'entities.websiteresource.views.editview.title', caption: 'entities.website.views.editview.title',
info:'', info:'',
parameters: [ parameters: [
{ pathName: 'website', parameterName: 'website' }, { pathName: 'website', parameterName: 'website' },
{ pathName: 'websiteresources', parameterName: 'websiteresource' }, { pathName: 'websites', parameterName: 'website' },
{ pathName: 'editview', parameterName: 'editview' }, { pathName: 'editview', parameterName: 'editview' },
], ],
requireAuth: true, requireAuth: true,
}, },
component: () => import('@pages/web-site/web-site-resource-edit-view/web-site-resource-edit-view.vue'), component: () => import('@pages/web-site/web-site-edit-view/web-site-edit-view.vue'),
}, },
{ {
path: 'websites/:website?/websitechannels/:websitechannel?/websitecontents/:websitecontent?/editview/:editview?', path: 'websites/:website?/websitechannels/:websitechannel?/websitecontents/:websitecontent?/editview/:editview?',
...@@ -253,6 +253,35 @@ const router = new Router({ ...@@ -253,6 +253,35 @@ const router = new Router({
}, },
component: () => import('@pages/web-site/web-site-content-edit-view/web-site-content-edit-view.vue'), component: () => import('@pages/web-site/web-site-content-edit-view/web-site-content-edit-view.vue'),
}, },
{
path: 'websites/:website?/websiteresources/:websiteresource?/editview/:editview?',
meta: {
caption: 'entities.websiteresource.views.editview.title',
info:'',
parameters: [
{ pathName: 'website', parameterName: 'website' },
{ pathName: 'websites', parameterName: 'website' },
{ pathName: 'websiteresources', parameterName: 'websiteresource' },
{ pathName: 'editview', parameterName: 'editview' },
],
requireAuth: true,
},
component: () => import('@pages/web-site/web-site-resource-edit-view/web-site-resource-edit-view.vue'),
},
{
path: 'websiteresources/:websiteresource?/editview/:editview?',
meta: {
caption: 'entities.websiteresource.views.editview.title',
info:'',
parameters: [
{ pathName: 'website', parameterName: 'website' },
{ pathName: 'websiteresources', parameterName: 'websiteresource' },
{ pathName: 'editview', parameterName: 'editview' },
],
requireAuth: true,
},
component: () => import('@pages/web-site/web-site-resource-edit-view/web-site-resource-edit-view.vue'),
},
{ {
path: 'websites/:website?/websitechannels/:websitechannel?/gridview/:gridview?', path: 'websites/:website?/websitechannels/:websitechannel?/gridview/:gridview?',
meta: { meta: {
......
import { Subject } from 'rxjs';
import { TreeExpViewBase } from '@/studio-core';
import WebSiteChannelService from '@/service/web-site-channel/web-site-channel-service';
import TreeExpViewEngine from '@engine/view/tree-exp-view-engine';
/**
* 频道内容视图基类
*
* @export
* @class WebSiteChannelContentTreeViewBase
* @extends {TreeExpViewBase}
*/
export class WebSiteChannelContentTreeViewBase extends TreeExpViewBase {
/**
* 实体服务对象
*
* @type {WebSiteChannelService}
* @memberof WebSiteChannelContentTreeViewBase
*/
protected appEntityService: WebSiteChannelService = new WebSiteChannelService;
/**
* 计数器服务对象集合
*
* @protected
* @type {Array<*>}
* @memberof WebSiteChannelContentTreeViewBase
*/
protected counterServiceArray: Array<any> = [];
/**
* 视图模型数据
*
* @protected
* @type {*}
* @memberof WebSiteChannelContentTreeViewBase
*/
protected model: any = {
srfCaption: 'entities.websitechannel.views.contenttreeview.caption',
srfTitle: 'entities.websitechannel.views.contenttreeview.title',
srfSubTitle: 'entities.websitechannel.views.contenttreeview.subtitle',
dataInfo: ''
}
/**
* 容器模型
*
* @protected
* @type {*}
* @memberof WebSiteChannelContentTreeViewBase
*/
protected containerModel: any = {
view_treeexpbar: { name: 'treeexpbar', type: 'TREEEXPBAR' },
};
/**
* 视图唯一标识
*
* @protected
* @type {string}
* @memberof ViewBase
*/
protected viewtag: string = '9b9de8c2724ef66a73380159197e7d72';
/**
* 视图引擎
*
* @public
* @type {Engine}
* @memberof WebSiteChannelContentTreeViewBase
*/
public engine: TreeExpViewEngine = new TreeExpViewEngine();
/**
* 引擎初始化
*
* @public
* @memberof WebSiteChannelContentTreeViewBase
*/
public engineInit(): void {
this.engine.init({
view: this,
treeexpbar: this.$refs.treeexpbar,
keyPSDEField: 'websitechannel',
majorPSDEField: 'websitechannelname',
isLoadDefault: true,
});
}
/**
* treeexpbar 部件 selectionchange 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof WebSiteChannelContentTreeViewBase
*/
public treeexpbar_selectionchange($event: any, $event2?: any): void {
this.engine.onCtrlEvent('treeexpbar', 'selectionchange', $event);
}
/**
* treeexpbar 部件 activated 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof WebSiteChannelContentTreeViewBase
*/
public treeexpbar_activated($event: any, $event2?: any): void {
this.engine.onCtrlEvent('treeexpbar', 'activated', $event);
}
/**
* treeexpbar 部件 load 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof WebSiteChannelContentTreeViewBase
*/
public treeexpbar_load($event: any, $event2?: any): void {
this.engine.onCtrlEvent('treeexpbar', 'load', $event);
}
/**
* 打开新建数据视图
*
* @param {any[]} args
* @param {*} [params]
* @param {*} [fullargs]
* @param {*} [$event]
* @param {*} [xData]
* @memberof WebSiteChannelContentTreeView
*/
public newdata(args: any[],fullargs?:any[], params?: any, $event?: any, xData?: any) {
let localContext:any = null;
let localViewParam:any =null;
this.$Notice.warning({ title: '错误', desc: '未指定关系视图' });
}
/**
* 打开编辑数据视图
*
* @param {any[]} args
* @param {*} [params]
* @param {*} [fullargs]
* @param {*} [$event]
* @param {*} [xData]
* @memberof WebSiteChannelContentTreeView
*/
public opendata(args: any[],fullargs?:any[],params?: any, $event?: any, xData?: any) {
let localContext:any = null;
let localViewParam:any =null;
this.$Notice.warning({ title: '错误', desc: '未指定关系视图' });
}
/**
* 视图唯一标识
*
* @type {string}
* @memberof WebSiteChannelContentTreeView
*/
public viewUID: string = 'web-site-web-site-channel-content-tree-view';
}
\ No newline at end of file
<studio-view-style2 viewName="websitechannelcontenttreeview" viewTitle="频道内容" class='detreeexpview web-site-channel-content-tree-view'>
<template slot='title'>
<span class='caption-info'>{{$t(model.srfTitle)}}</span>
</template>
<view_treeexpbar
:viewState="viewState"
:viewparams="viewparams"
:context="context"
:viewUID="viewUID"
:newdata="newdata"
:opendata="opendata"
name="treeexpbar"
ref='treeexpbar'
@selectionchange="treeexpbar_selectionchange($event)"
@activated="treeexpbar_activated($event)"
@load="treeexpbar_load($event)"
@closeview="closeView($event)">
</view_treeexpbar>
</studio-view-style2>
\ No newline at end of file
<template src="./web-site-channel-content-tree-view.html"/>
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import { VueLifeCycleProcessing } from '@/studio-core';
import { WebSiteChannelContentTreeViewBase } from './web-site-channel-content-tree-view-base';
import view_treeexpbar from '@widgets/web-site-channel/content-tree-viewtreeexpbar-treeexpbar/content-tree-viewtreeexpbar-treeexpbar.vue';
/**
* 频道内容视图
*
* @export
* @class WebSiteChannelContentTreeView
* @extends {WebSiteChannelContentTreeViewBase}
*/
@Component({
components: {
view_treeexpbar,
}
})
@VueLifeCycleProcessing()
export default class WebSiteChannelContentTreeView extends WebSiteChannelContentTreeViewBase { }
</script>
...@@ -15,12 +15,6 @@ import view_form from '@widgets/web-site-channel/main-form/main-form.vue'; ...@@ -15,12 +15,6 @@ import view_form from '@widgets/web-site-channel/main-form/main-form.vue';
@Component({ @Component({
components: { components: {
view_form, view_form,
},
beforeRouteEnter: (to: any, from: any, next: any) => {
next((vm: any) => {
vm.$appService.navHistory.setViewTag(vm.viewtag, to);
vm.$appService.navHistory.setViewContext(vm.context, to);
});
} }
}) })
@VueLifeCycleProcessing() @VueLifeCycleProcessing()
......
...@@ -17,12 +17,6 @@ import view_searchform from '@widgets/web-site-channel/default-searchform/defaul ...@@ -17,12 +17,6 @@ import view_searchform from '@widgets/web-site-channel/default-searchform/defaul
components: { components: {
view_grid, view_grid,
view_searchform, view_searchform,
},
beforeRouteEnter: (to: any, from: any, next: any) => {
next((vm: any) => {
vm.$appService.navHistory.setViewTag(vm.viewtag, to);
vm.$appService.navHistory.setViewContext(vm.context, to);
});
} }
}) })
@VueLifeCycleProcessing() @VueLifeCycleProcessing()
......
...@@ -15,12 +15,6 @@ import view_form from '@widgets/web-site-content/main-form/main-form.vue'; ...@@ -15,12 +15,6 @@ import view_form from '@widgets/web-site-content/main-form/main-form.vue';
@Component({ @Component({
components: { components: {
view_form, view_form,
},
beforeRouteEnter: (to: any, from: any, next: any) => {
next((vm: any) => {
vm.$appService.navHistory.setViewTag(vm.viewtag, to);
vm.$appService.navHistory.setViewContext(vm.context, to);
});
} }
}) })
@VueLifeCycleProcessing() @VueLifeCycleProcessing()
......
...@@ -17,12 +17,6 @@ import view_searchform from '@widgets/web-site-content/default-searchform/defaul ...@@ -17,12 +17,6 @@ import view_searchform from '@widgets/web-site-content/default-searchform/defaul
components: { components: {
view_grid, view_grid,
view_searchform, view_searchform,
},
beforeRouteEnter: (to: any, from: any, next: any) => {
next((vm: any) => {
vm.$appService.navHistory.setViewTag(vm.viewtag, to);
vm.$appService.navHistory.setViewContext(vm.context, to);
});
} }
}) })
@VueLifeCycleProcessing() @VueLifeCycleProcessing()
......
...@@ -15,12 +15,6 @@ import view_form from '@widgets/web-site/main-form/main-form.vue'; ...@@ -15,12 +15,6 @@ import view_form from '@widgets/web-site/main-form/main-form.vue';
@Component({ @Component({
components: { components: {
view_form, view_form,
},
beforeRouteEnter: (to: any, from: any, next: any) => {
next((vm: any) => {
vm.$appService.navHistory.setViewTag(vm.viewtag, to);
vm.$appService.navHistory.setViewContext(vm.context, to);
});
} }
}) })
@VueLifeCycleProcessing() @VueLifeCycleProcessing()
......
...@@ -17,12 +17,6 @@ import view_searchform from '@widgets/web-site/default-searchform/default-search ...@@ -17,12 +17,6 @@ import view_searchform from '@widgets/web-site/default-searchform/default-search
components: { components: {
view_grid, view_grid,
view_searchform, view_searchform,
},
beforeRouteEnter: (to: any, from: any, next: any) => {
next((vm: any) => {
vm.$appService.navHistory.setViewTag(vm.viewtag, to);
vm.$appService.navHistory.setViewContext(vm.context, to);
});
} }
}) })
@VueLifeCycleProcessing() @VueLifeCycleProcessing()
......
...@@ -15,12 +15,6 @@ import view_form from '@widgets/web-site-resource/main-form/main-form.vue'; ...@@ -15,12 +15,6 @@ import view_form from '@widgets/web-site-resource/main-form/main-form.vue';
@Component({ @Component({
components: { components: {
view_form, view_form,
},
beforeRouteEnter: (to: any, from: any, next: any) => {
next((vm: any) => {
vm.$appService.navHistory.setViewTag(vm.viewtag, to);
vm.$appService.navHistory.setViewContext(vm.context, to);
});
} }
}) })
@VueLifeCycleProcessing() @VueLifeCycleProcessing()
......
...@@ -17,12 +17,6 @@ import view_searchform from '@widgets/web-site-resource/default-searchform/defau ...@@ -17,12 +17,6 @@ import view_searchform from '@widgets/web-site-resource/default-searchform/defau
components: { components: {
view_grid, view_grid,
view_searchform, view_searchform,
},
beforeRouteEnter: (to: any, from: any, next: any) => {
next((vm: any) => {
vm.$appService.navHistory.setViewTag(vm.viewtag, to);
vm.$appService.navHistory.setViewContext(vm.context, to);
});
} }
}) })
@VueLifeCycleProcessing() @VueLifeCycleProcessing()
......
...@@ -340,4 +340,22 @@ export default class WebSiteChannelServiceBase extends EntityService { ...@@ -340,4 +340,22 @@ export default class WebSiteChannelServiceBase extends EntityService {
let tempData:any = JSON.parse(JSON.stringify(data)); let tempData:any = JSON.parse(JSON.stringify(data));
return Http.getInstance().get(`/websitechannels/fetchdefault`,tempData,isloading); return Http.getInstance().get(`/websitechannels/fetchdefault`,tempData,isloading);
} }
/**
* FetchRoot接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof WebSiteChannelServiceBase
*/
public async FetchRoot(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.website && true){
let tempData:any = JSON.parse(JSON.stringify(data));
return Http.getInstance().get(`/websites/${context.website}/websitechannels/fetchroot`,tempData,isloading);
}
let tempData:any = JSON.parse(JSON.stringify(data));
return Http.getInstance().get(`/websitechannels/fetchroot`,tempData,isloading);
}
} }
\ No newline at end of file
...@@ -50,6 +50,16 @@ export const viewstate: any = { ...@@ -50,6 +50,16 @@ export const viewstate: any = {
refviews: [ refviews: [
], ],
}, },
{
viewtag: '9b9de8c2724ef66a73380159197e7d72',
viewmodule: 'WebSite',
viewname: 'WebSiteChannelContentTreeView',
viewaction: '',
viewdatachange: false,
refviews: [
'd3e1d08292c9d8474b8b6ef7b161b045',
],
},
{ {
viewtag: 'a7a0d344965e73bc3007248ca2cfdfa9', viewtag: 'a7a0d344965e73bc3007248ca2cfdfa9',
viewmodule: 'WebSite', viewmodule: 'WebSite',
...@@ -87,7 +97,7 @@ export const viewstate: any = { ...@@ -87,7 +97,7 @@ export const viewstate: any = {
viewdatachange: false, viewdatachange: false,
refviews: [ refviews: [
'ae5751b832d4b1fcd33a2195a2425390', 'ae5751b832d4b1fcd33a2195a2425390',
'd3e1d08292c9d8474b8b6ef7b161b045', '9b9de8c2724ef66a73380159197e7d72',
'217b6c971b8e8981b6ed12189607c795', '217b6c971b8e8981b6ed12189607c795',
'3aae044bf3c4e3a671ad89955fd060a4', '3aae044bf3c4e3a671ad89955fd060a4',
], ],
......
...@@ -438,7 +438,7 @@ ...@@ -438,7 +438,7 @@
>.translate-contant { >.translate-contant {
display: flex; display: flex;
height: calc(100% - 44px); height: 100%;
width: 100%; width: 100%;
>.center { >.center {
......
...@@ -110,4 +110,14 @@ export class UIStateService { ...@@ -110,4 +110,14 @@ export class UIStateService {
} }
} }
/**
* 是否为Style2模式
*
* @returns {boolean}
* @memberof UIStateService
*/
public isStyle2(): boolean {
return this.layoutState.styleMode === 'STYLE2';
}
} }
\ No newline at end of file
import { Util } from '@/utils'; import qs from 'qs';
import i18n from '@/locale'
import { AppContextStore } from '../app-context-store/AppContextStore'; import { AppContextStore } from '../app-context-store/AppContextStore';
import { UIStateService } from '../UIStateService'; import { UIStateService } from '../UIStateService';
...@@ -37,6 +38,13 @@ export interface HistoryItem { ...@@ -37,6 +38,13 @@ export interface HistoryItem {
* @memberof HistoryItem * @memberof HistoryItem
*/ */
context?: any; context?: any;
/**
* 标题
*
* @type {string}
* @memberof HistoryItem
*/
title?: string;
} }
/** /**
...@@ -89,13 +97,33 @@ export class AppNavHistoryBase { ...@@ -89,13 +97,33 @@ export class AppNavHistoryBase {
/** /**
* Creates an instance of AppNavHistoryBase. * Creates an instance of AppNavHistoryBase.
*
* @memberof AppNavHistoryBase * @memberof AppNavHistoryBase
*/ */
constructor() { constructor() {
addEventListener('popstate', (event) => { if (this.uiStateService.layoutState.styleMode === 'STYLE2') {
addEventListener('hashchange', ({ oldURL }) => {
const hash = oldURL.substring(oldURL.indexOf('#') + 1);
const queryIndex = hash.indexOf('?');
const path = queryIndex === -1 ? hash : hash.substring(0, queryIndex);
const queryStr = queryIndex === -1 ? '' : hash.substring(queryIndex + 1);
if (this.isRouteSame({ path, query: !isEmpty(queryStr) ? qs.parse(queryStr) : {} }, this.historyList[this.historyList.length - 1].to)) {
this.pop(); this.pop();
}
}); });
} }
}
/**
* 根据视图标识查找记录
*
* @param {string} tag
* @returns {*}
* @memberof AppNavHistoryBase
*/
public findHistoryByTag(tag: string): any {
return this.historyList.find((item) => (isExistAndNotEmpty(item.tag) && item.tag === tag));
}
/** /**
* 查找路由缓存 * 查找路由缓存
...@@ -106,37 +134,52 @@ export class AppNavHistoryBase { ...@@ -106,37 +134,52 @@ export class AppNavHistoryBase {
* @memberof AppNavHistoryBase * @memberof AppNavHistoryBase
*/ */
public findHistoryIndex(page: any, list: any[] = this.historyList): number { public findHistoryIndex(page: any, list: any[] = this.historyList): number {
if (page === undefined || page === null) { if (!isExist(page)) {
return -1; return -1;
} }
return list.findIndex((item: any) => { return list.findIndex((item: any) => {
const to = item.to; return this.isRouteSame(page, item.to);
// 基本路径是否一致 });;
if (Object.is(to.path, page.path)) { }
// 历史路径是否存在参数
if (this.uiStateService.layoutState.styleMode === 'STYLE2' && to.query) { /**
let judge: boolean = true; * 新旧路由是否相同
// 新路径是否存在参数 *
if (page.query) { * @param {*} newRoute
for (const key in page.query) { * @param {*} oldRoute
* @returns {boolean}
* @memberof AppNavHistoryBase
*/
public isRouteSame(newRoute: any, oldRoute: any): boolean {
if (Object.is(newRoute.path, oldRoute.path)) {
return this.isQuerySame(newRoute.query, oldRoute.query);
}
return false;
}
/**
* 判断查询参数是否相同,会排除预定义的忽略参数
*
* @param {*} newQuery 新查询参数
* @param {*} oldQuery 旧查询参数
* @returns {boolean}
* @memberof AppNavHistoryBase
*/
public isQuerySame(newQuery: any, oldQuery: any): boolean {
if (Object.keys(newQuery).length !== Object.keys(oldQuery).length) {
return false;
}
for (const key in newQuery) {
// 忽略的参数略过 // 忽略的参数略过
if (this.navIgnoreParameters.test(`|${key}|`)) { if (this.navIgnoreParameters.test(`|${key}|`)) {
continue; continue;
} }
if (to.query[key] === undefined || to.query[key] === null) { if (!isExist(oldQuery) || !Object.is(oldQuery[key], newQuery[key])) {
judge = false; return false;
}
}
} else {
judge = false;
} }
return judge;
} }
return true; return true;
} }
return false;
});;
}
/** /**
* 添加视图缓存 * 添加视图缓存
...@@ -151,9 +194,10 @@ export class AppNavHistoryBase { ...@@ -151,9 +194,10 @@ export class AppNavHistoryBase {
} }
this.historyList.push({ this.historyList.push({
to, to,
meta: Util.deepCopy(to.meta), meta: JSON.parse(JSON.stringify(to.meta)),
tag: '', tag: '',
context: {} context: {},
title: i18n.t(to.meta.caption).toString()
}); });
} }
} }
...@@ -184,21 +228,20 @@ export class AppNavHistoryBase { ...@@ -184,21 +228,20 @@ export class AppNavHistoryBase {
/** /**
* 设置指定缓存视图标题 * 设置指定缓存视图标题
* *
* @param {({ route: any, caption: string | null, info: string | null })} { route, caption, info } * @param {({ tag: string, caption: string | null, info: string | null })} { tag, caption, info }
* @returns {boolean} * @returns {boolean}
* @memberof AppNavHistoryBase * @memberof AppNavHistoryBase
*/ */
public setCaption({ route, caption, info }: { route: any, caption?: string, info?: string }): boolean { public setCaption({ tag, caption, info }: { tag: string, caption?: string, info?: string }): boolean {
const i = this.findHistoryIndex(route); const item: HistoryItem = this.findHistoryByTag(tag);
if (i === -1) { if (item) {
return false;
}
const item = this.historyList[i];
if (caption) { if (caption) {
item.meta.caption = caption; item.meta.caption = caption;
} }
if (info) { if (isExistAndNotEmpty(info)) {
item.meta.info = info; item.meta.info = info;
item.title = `${i18n.t(item.meta.caption)} - ${info}`;
}
} }
return true; return true;
} }
...@@ -217,6 +260,9 @@ export class AppNavHistoryBase { ...@@ -217,6 +260,9 @@ export class AppNavHistoryBase {
return false; return false;
} }
const item = this.historyList[i]; const item = this.historyList[i];
if (isExistAndNotEmpty(item.tag)) {
return false;
}
item.tag = tag; item.tag = tag;
return true; return true;
} }
...@@ -225,19 +271,18 @@ export class AppNavHistoryBase { ...@@ -225,19 +271,18 @@ export class AppNavHistoryBase {
* 设置路由视图上下文 * 设置路由视图上下文
* *
* @param {*} context * @param {*} context
* @param {*} route * @param {*} tag
* @returns {boolean} * @returns {boolean}
* @memberof AppNavHistoryBase * @memberof AppNavHistoryBase
*/ */
public setViewContext(context: any, route: any): boolean { public setViewContext(context: any, tag: any): boolean {
const i = this.findHistoryIndex(route); const item = this.findHistoryByTag(tag);
if (i === -1) { if (item) {
return false;
}
const item = this.historyList[i];
item.context = context; item.context = context;
return true; return true;
} }
return false;
}
/** /**
* 删除其他缓存 * 删除其他缓存
......
...@@ -22,4 +22,28 @@ declare global { ...@@ -22,4 +22,28 @@ declare global {
*/ */
clearAll(): void; clearAll(): void;
} }
/**
* 判断对象是否存在,判断是否为undefined或null,避免数值型0误判
*
* @param {*} obj
* @returns {boolean}
*/
function isExist(obj: any): boolean;
/**
* 判断字符串是否为空
*
* @param {string | undefined | null} str
* @returns {boolean}
*/
function isEmpty(str: string | undefined | null): boolean;
/**
* 判断字符串,存在并且不为空
*
* @param {string | undefined | null} str
* @returns {boolean}
*/
function isExistAndNotEmpty(str: string | undefined | null): boolean;
} }
\ No newline at end of file
...@@ -13,3 +13,33 @@ Object.defineProperty(Object.prototype, 'clearAll', { ...@@ -13,3 +13,33 @@ Object.defineProperty(Object.prototype, 'clearAll', {
} }
} }
}); });
// 扩展window方法 Start
/**
* 判断对象是否为空,避免发生数值0误判
*
* @param obj
*/
window.isExist = function(obj: any) {
return obj !== undefined && obj !== null;
}
/**
* 判断字符串是否为空
*
* @param str
*/
window.isEmpty = function(str: string | undefined | null) {
return Object.is(str, '');
}
/**
* 字符串不为空并且
*
* @param str
*/
window.isExistAndNotEmpty = function(str: string | undefined | null) {
return isExist(str) && !isEmpty(str);
}
// 扩展window方法 End
\ No newline at end of file
...@@ -117,6 +117,13 @@ ...@@ -117,6 +117,13 @@
height: 100%; height: 100%;
} }
} }
>.studio-view.view-container.show-footer {
>.view-content {
height: calc(100% - 46px);
}
}
} }
} }
} }
\ No newline at end of file
...@@ -292,10 +292,16 @@ export class ViewBase extends Vue { ...@@ -292,10 +292,16 @@ export class ViewBase extends Vue {
if (this.viewUsage === 1 || this.viewUsage === 2) { if (this.viewUsage === 1 || this.viewUsage === 2) {
this.$appService.viewStore.push(this); this.$appService.viewStore.push(this);
} }
const secondtag = this.$util.createUUID(); const secondtag = (this as any)._uid;
this.$store.commit('viewaction/createdView', { viewtag: this.viewtag, secondtag: secondtag }); this.$store.commit('viewaction/createdView', { viewtag: this.viewtag, secondtag: secondtag });
this.viewtag = secondtag; this.viewtag = secondtag;
if (this.viewUsage === 1) {
this.$appService.navHistory.setViewTag(this.viewtag, this.$route);
}
this.parseViewParam(); this.parseViewParam();
if (this.viewUsage === 1) {
this.$appService.navHistory.setViewContext(this.context, this.viewtag);
}
this.viewCreated(); this.viewCreated();
} }
......
...@@ -80,6 +80,7 @@ export default class WebSiteChannelUIServiceBase extends UIService { ...@@ -80,6 +80,7 @@ export default class WebSiteChannelUIServiceBase extends UIService {
*/ */
public initViewMap(){ public initViewMap(){
this.allViewMap.set('MDATAVIEW:',{viewname:'gridview',srfappde:'websitechannels'}); this.allViewMap.set('MDATAVIEW:',{viewname:'gridview',srfappde:'websitechannels'});
this.allViewMap.set(':',{viewname:'contenttreeview',srfappde:'websitechannels'});
this.allViewMap.set('EDITVIEW:',{viewname:'editview',srfappde:'websitechannels'}); this.allViewMap.set('EDITVIEW:',{viewname:'editview',srfappde:'websitechannels'});
} }
......
...@@ -28,7 +28,7 @@ export class WebSiteBase extends Vue { ...@@ -28,7 +28,7 @@ export class WebSiteBase extends Vue {
judge = false; judge = false;
console.warn('未指定应用功能'); console.warn('未指定应用功能');
} }
if (judge) { if (judge && this.$uiState.isStyle2()) {
this.$appService.navHistory.reset(); this.$appService.navHistory.reset();
} }
} }
...@@ -68,8 +68,8 @@ export class WebSiteBase extends Vue { ...@@ -68,8 +68,8 @@ export class WebSiteBase extends Vue {
Object.assign(viewparam, {}); Object.assign(viewparam, {});
const deResParameters: any[] = []; const deResParameters: any[] = [];
const parameters: any[] = [ const parameters: any[] = [
{ pathName: 'websitecontents', parameterName: 'websitecontent' }, { pathName: 'websitechannels', parameterName: 'websitechannel' },
{ pathName: 'gridview', parameterName: 'gridview' }, { pathName: 'contenttreeview', parameterName: 'contenttreeview' },
]; ];
const path: string = this.$viewTool.buildUpRoutePath(this.$route, {}, deResParameters, parameters, [], viewparam); const path: string = this.$viewTool.buildUpRoutePath(this.$route, {}, deResParameters, parameters, [], viewparam);
if(Object.is(this.$route.fullPath,path)){ if(Object.is(this.$route.fullPath,path)){
......
...@@ -150,7 +150,7 @@ export default class WebSiteModel { ...@@ -150,7 +150,7 @@ export default class WebSiteModel {
textcls: '', textcls: '',
appfunctag: '_5', appfunctag: '_5',
appfuncyype: 'APPVIEW', appfuncyype: 'APPVIEW',
viewname: 'web-site-content-grid-view', viewname: 'web-site-channel-content-tree-view',
resourcetag: '', resourcetag: '',
} }
, ,
...@@ -280,12 +280,12 @@ export default class WebSiteModel { ...@@ -280,12 +280,12 @@ export default class WebSiteModel {
appfunctag: '_5', appfunctag: '_5',
appfuncyype: 'APPVIEW', appfuncyype: 'APPVIEW',
openmode: '', openmode: '',
codename: 'websitecontentgridview', codename: 'websitechannelcontenttreeview',
deResParameters: [], deResParameters: [],
routepath: '/website/:website?/websitecontents/:websitecontent?/gridview/:gridview?', routepath: '/website/:website?/websitechannels/:websitechannel?/contenttreeview/:contenttreeview?',
parameters: [ parameters: [
{ pathName: 'websitecontents', parameterName: 'websitecontent' }, { pathName: 'websitechannels', parameterName: 'websitechannel' },
{ pathName: 'gridview', parameterName: 'gridview' }, { pathName: 'contenttreeview', parameterName: 'contenttreeview' },
], ],
}, },
{ {
......
/**
* ChannelTree 部件模型
*
* @export
* @class ChannelTreeModel
*/
export default class ChannelTreeModel {
/**
* 获取数据项集合
*
* @returns {any[]}
* @memberof ChannelTreeModel
*/
public getDataItems(): any[] {
return [
{
name: 'websitechannel',
prop: 'websitechannelid',
},
{
name: 'createman',
},
{
name: 'websitechannelname',
},
{
name: 'updatedate',
},
{
name: 'createdate',
},
{
name: 'updateman',
},
{
name: 'websiteid',
},
{
name: 'pwebsitechannelid',
},
{
name: 'pwebsitechannelname',
},
{
name: 'websitename',
},
{
name: 'channeltype',
},
{
name: 'channelcode',
},
{
name: 'sn',
},
{
name: 'memo',
},
{
name: 'validflag',
},
]
}
}
\ No newline at end of file
<div class="design-tree-container">
<context-menu-container>
<el-tree
v-if="inited"
ref="treeexpbar_tree"
class="design-tree"
node-key="id"
lazy
:show-checkbox="!isSingleSelect"
:check-on-click-node="!isSingleSelect"
:default-expanded-keys="expandedKeys"
:props="{
label: 'text',
isLeaf: 'leaf',
children: 'children'
}"
:load="load.bind(_self)"
:highlight-current="true"
:expand-on-click-node="false"
@check="onCheck.apply(_self, arguments)"
@current-change="selectionChange.apply(_self, arguments)"
:filter-node-method="filterNode"
>
<template slot-scope="{ node, data }">
<context-menu :contextMenuStyle="{width: '100%'}" :data="node" :renderContent="renderContextMenu.bind(_self)">
<tooltip transfer style="width: 100%;" max-width="2000" placement="right">
<div class="tree-node" @dblclick="doDefaultAction(node)">
<span class="icon">
<i v-if=" data.iconcls && !Object.is(data.iconcls, '')" :class="data.iconcls"></i>
<img v-else-if="data.icon && !Object.is(data.icon, '')" :src="data.icon" />
<icon v-else-if="isOutputIconDefault" type="ios-paper-outline"></icon>&nbsp;
</span>
<span class="text">
<span v-if="data.html" v-html="data.html"></span>
<span v-else>{{ data.isUseLangRes ? $t(data.text) : data.text }}</span>
</span>
</div>
<template slot="content">
<span v-if="data.html" v-html="data.html"></span>
<span v-else>{{ data.isUseLangRes ? $t(data.text) : data.text }}</span>
</template>
</tooltip>
</context-menu>
</template>
</el-tree>
</context-menu-container>
</div>
\ No newline at end of file
<template src="./channel-tree-treeview.html"/>
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import { VueLifeCycleProcessing } from '@/studio-core';
import { ChannelTreeTreeBase } from './channel-tree-treeview-base';
/**
* treeexpbar_tree部件
*
* @export
* @class ChannelTreeTree
* @extends {ChannelTreeTreeBase}
*/
@Component({
components: {
}
})
@VueLifeCycleProcessing()
export default class ChannelTreeTree extends ChannelTreeTreeBase { }
</script>
/**
* ContentTreeViewtreeexpbar 部件模型
*
* @export
* @class ContentTreeViewtreeexpbarModel
*/
export default class ContentTreeViewtreeexpbarModel {
/**
* 获取数据项集合
*
* @returns {any[]}
* @memberof ContentTreeViewtreeexpbarModel
*/
public getDataItems(): any[] {
return [
{
name: 'websitechannel',
prop: 'websitechannelid',
},
{
name: 'createman',
},
{
name: 'websitechannelname',
},
{
name: 'updatedate',
},
{
name: 'createdate',
},
{
name: 'updateman',
},
{
name: 'websiteid',
},
{
name: 'pwebsitechannelid',
},
{
name: 'pwebsitechannelname',
},
{
name: 'websitename',
},
{
name: 'channeltype',
},
{
name: 'channelcode',
},
{
name: 'sn',
},
{
name: 'memo',
},
{
name: 'validflag',
},
]
}
}
\ No newline at end of file
import { Http } from '@/utils';
import ControlService from '@/widgets/control-service';
/**
* ContentTreeViewtreeexpbar 部件服务对象
*
* @export
* @class ContentTreeViewtreeexpbarService
*/
export default class ContentTreeViewtreeexpbarService extends ControlService {
}
\ No newline at end of file
<split id="contenttreeviewtreeexpbar" class='app-tree-exp-bar' v-model="split" mode="horizontal" @on-move-end="onSplitChange.apply(_self, arguments)">
<div class="app-tree-exp-bar-left show-title-bar" slot='left'>
<div class='tree-exp-bar-header'>
<div class="tree-exp-bar-title">频道内容</div>
</div>
<div class='tree-exp-content'>
<view_treeexpbar_tree
:viewState="viewState"
:viewparams="viewparams"
:context="context"
:showBusyIndicator="true"
updateAction='Update'
removeAction='Remove'
loadAction='Get'
createAction='Create'
:isSelectFirstDefault="true"
:isBranchAvailable="true"
name="treeexpbar_tree"
ref='treeexpbar_tree'
@selectionchange="treeexpbar_tree_selectionchange($event)"
@load="treeexpbar_tree_load($event)"
@closeview="closeView($event)">
</view_treeexpbar_tree>
</div>
</div>
<div class="app-tree-exp-bar-right" slot='right'>
<component
v-if="selection.view && !Object.is(this.selection.view.viewname, '')"
:is="selection.view.viewname"
class="viewcontainer2"
:viewDefaultUsage="false"
:viewdata="JSON.stringify(selection.context)"
:viewparam="JSON.stringify(selection.viewparam)"
@viewdataschange="onViewDatasChange.apply(_self, arguments)"
@viewdatasactivated="viewDatasActivated.apply(_self, arguments)"
@viewload="onViewLoad.apply(_self, arguments)">
</component>
</div>
</split>
<template src="./content-tree-viewtreeexpbar-treeexpbar.html"/>
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import { VueLifeCycleProcessing } from '@/studio-core';
import { ContentTreeViewtreeexpbarTreeExpBarBase } from './content-tree-viewtreeexpbar-treeexpbar-base';
import view_treeexpbar_tree from '@widgets/web-site-channel/channel-tree-treeview/channel-tree-treeview.vue';
/**
* treeexpbar部件
*
* @export
* @class ContentTreeViewtreeexpbarTreeExpBar
* @extends {ContentTreeViewtreeexpbarTreeExpBarBase}
*/
@Component({
components: {
view_treeexpbar_tree,
}
})
@VueLifeCycleProcessing()
export default class ContentTreeViewtreeexpbarTreeExpBar extends ContentTreeViewtreeexpbarTreeExpBarBase { }
</script>
...@@ -20,6 +20,7 @@ import com.alibaba.fastjson.JSONObject; ...@@ -20,6 +20,7 @@ import com.alibaba.fastjson.JSONObject;
public interface WebSiteChannelMapper extends BaseMapper<WebSiteChannel>{ public interface WebSiteChannelMapper extends BaseMapper<WebSiteChannel>{
Page<WebSiteChannel> searchDefault(IPage page, @Param("srf") WebSiteChannelSearchContext context, @Param("ew") Wrapper<WebSiteChannel> wrapper) ; Page<WebSiteChannel> searchDefault(IPage page, @Param("srf") WebSiteChannelSearchContext context, @Param("ew") Wrapper<WebSiteChannel> wrapper) ;
Page<WebSiteChannel> searchRoot(IPage page, @Param("srf") WebSiteChannelSearchContext context, @Param("ew") Wrapper<WebSiteChannel> wrapper) ;
@Override @Override
WebSiteChannel selectById(Serializable id); WebSiteChannel selectById(Serializable id);
@Override @Override
......
...@@ -37,6 +37,7 @@ public interface IWebSiteChannelService extends IService<WebSiteChannel>{ ...@@ -37,6 +37,7 @@ public interface IWebSiteChannelService extends IService<WebSiteChannel>{
boolean save(WebSiteChannel et) ; boolean save(WebSiteChannel et) ;
void saveBatch(List<WebSiteChannel> list) ; void saveBatch(List<WebSiteChannel> list) ;
Page<WebSiteChannel> searchDefault(WebSiteChannelSearchContext context) ; Page<WebSiteChannel> searchDefault(WebSiteChannelSearchContext context) ;
Page<WebSiteChannel> searchRoot(WebSiteChannelSearchContext context) ;
List<WebSiteChannel> selectByPwebsitechannelid(String websitechannelid) ; List<WebSiteChannel> selectByPwebsitechannelid(String websitechannelid) ;
void removeByPwebsitechannelid(String websitechannelid) ; void removeByPwebsitechannelid(String websitechannelid) ;
List<WebSiteChannel> selectByWebsiteid(String websiteid) ; List<WebSiteChannel> selectByWebsiteid(String websiteid) ;
......
...@@ -186,6 +186,15 @@ public class WebSiteChannelServiceImpl extends ServiceImpl<WebSiteChannelMapper, ...@@ -186,6 +186,15 @@ public class WebSiteChannelServiceImpl extends ServiceImpl<WebSiteChannelMapper,
return new PageImpl<WebSiteChannel>(pages.getRecords(), context.getPageable(), pages.getTotal()); return new PageImpl<WebSiteChannel>(pages.getRecords(), context.getPageable(), pages.getTotal());
} }
/**
* 查询集合 Root
*/
@Override
public Page<WebSiteChannel> searchRoot(WebSiteChannelSearchContext context) {
com.baomidou.mybatisplus.extension.plugins.pagination.Page<WebSiteChannel> pages=baseMapper.searchRoot(context.getPages(),context,context.getSelectCond());
return new PageImpl<WebSiteChannel>(pages.getRecords(), context.getPageable(), pages.getTotal());
}
/** /**
......
...@@ -2760,7 +2760,7 @@ ...@@ -2760,7 +2760,7 @@
<!--输出实体[CONTACT]数据结构 --> <!--输出实体[CONTACT]数据结构 -->
<changeSet author="a_LAB01_e85d8801c" id="tab-contact-298-37"> <changeSet author="a_LAB01_e85d8801c" id="tab-contact-300-37">
<createTable tableName="CONTACT"> <createTable tableName="CONTACT">
<column name="ADDRESS1_FREIGHTTERMSCODE" remarks="" type="VARCHAR(30)"> <column name="ADDRESS1_FREIGHTTERMSCODE" remarks="" type="VARCHAR(30)">
</column> </column>
...@@ -6456,7 +6456,7 @@ ...@@ -6456,7 +6456,7 @@
<!--输出实体[OPPORTUNITY]数据结构 --> <!--输出实体[OPPORTUNITY]数据结构 -->
<changeSet author="a_LAB01_e85d8801c" id="tab-opportunity-145-77"> <changeSet author="a_LAB01_e85d8801c" id="tab-opportunity-146-77">
<createTable tableName="OPPORTUNITY"> <createTable tableName="OPPORTUNITY">
<column name="DECISIONMAKER" remarks="" type="INT"> <column name="DECISIONMAKER" remarks="" type="INT">
</column> </column>
...@@ -10879,7 +10879,7 @@ ...@@ -10879,7 +10879,7 @@
<!--输出实体[WEBSITECHANNEL]数据结构 --> <!--输出实体[WEBSITECHANNEL]数据结构 -->
<changeSet author="a_LAB01_e85d8801c" id="tab-websitechannel-41-129"> <changeSet author="a_LAB01_e85d8801c" id="tab-websitechannel-43-129">
<createTable tableName="WEBSITECHANNEL"> <createTable tableName="WEBSITECHANNEL">
<column name="WEBSITECHANNELID" remarks="" type="VARCHAR(100)"> <column name="WEBSITECHANNELID" remarks="" type="VARCHAR(100)">
<constraints primaryKey="true" primaryKeyName="PK_WEBSITECHANNEL_WEBSITECHANN"/> <constraints primaryKey="true" primaryKeyName="PK_WEBSITECHANNEL_WEBSITECHANN"/>
...@@ -11170,25 +11170,25 @@ ...@@ -11170,25 +11170,25 @@
<addForeignKeyConstraint baseColumnNames="BUSINESSUNITID" baseTableName="CONSTRAINTBASEDGROUP" constraintName="DER1N_CONSTRAINTBASEDGROUP__BU" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="BUSINESSUNITID" referencedTableName="BUSINESSUNIT" validate="true"/> <addForeignKeyConstraint baseColumnNames="BUSINESSUNITID" baseTableName="CONSTRAINTBASEDGROUP" constraintName="DER1N_CONSTRAINTBASEDGROUP__BU" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="BUSINESSUNITID" referencedTableName="BUSINESSUNIT" validate="true"/>
</changeSet> </changeSet>
<!--输出实体[CONTACT]外键关系 --> <!--输出实体[CONTACT]外键关系 -->
<changeSet author="a_LAB01_e85d8801c" id="fk-contact-298-194"> <changeSet author="a_LAB01_e85d8801c" id="fk-contact-300-194">
<addForeignKeyConstraint baseColumnNames="CUSTOMERID" baseTableName="CONTACT" constraintName="DER1N_CONTACT_ACCOUNT_CUSTOMER" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="ACCOUNTID" referencedTableName="ACCOUNT" validate="true"/> <addForeignKeyConstraint baseColumnNames="CUSTOMERID" baseTableName="CONTACT" constraintName="DER1N_CONTACT_ACCOUNT_CUSTOMER" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="ACCOUNTID" referencedTableName="ACCOUNT" validate="true"/>
</changeSet> </changeSet>
<changeSet author="a_LAB01_e85d8801c" id="fk-contact-298-195"> <changeSet author="a_LAB01_e85d8801c" id="fk-contact-300-195">
<addForeignKeyConstraint baseColumnNames="PREFERREDEQUIPMENTID" baseTableName="CONTACT" constraintName="DER1N_CONTACT__EQUIPMENT__PREF" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="EQUIPMENTID" referencedTableName="EQUIPMENT" validate="true"/> <addForeignKeyConstraint baseColumnNames="PREFERREDEQUIPMENTID" baseTableName="CONTACT" constraintName="DER1N_CONTACT__EQUIPMENT__PREF" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="EQUIPMENTID" referencedTableName="EQUIPMENT" validate="true"/>
</changeSet> </changeSet>
<changeSet author="a_LAB01_e85d8801c" id="fk-contact-298-196"> <changeSet author="a_LAB01_e85d8801c" id="fk-contact-300-196">
<addForeignKeyConstraint baseColumnNames="ORIGINATINGLEADID" baseTableName="CONTACT" constraintName="DER1N_CONTACT__LEAD__ORIGINATI" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="LEADID" referencedTableName="LEAD" validate="true"/> <addForeignKeyConstraint baseColumnNames="ORIGINATINGLEADID" baseTableName="CONTACT" constraintName="DER1N_CONTACT__LEAD__ORIGINATI" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="LEADID" referencedTableName="LEAD" validate="true"/>
</changeSet> </changeSet>
<changeSet author="a_LAB01_e85d8801c" id="fk-contact-298-197"> <changeSet author="a_LAB01_e85d8801c" id="fk-contact-300-197">
<addForeignKeyConstraint baseColumnNames="DEFAULTPRICELEVELID" baseTableName="CONTACT" constraintName="DER1N_CONTACT__PRICELEVEL__DEF" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="PRICELEVELID" referencedTableName="PRICELEVEL" validate="true"/> <addForeignKeyConstraint baseColumnNames="DEFAULTPRICELEVELID" baseTableName="CONTACT" constraintName="DER1N_CONTACT__PRICELEVEL__DEF" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="PRICELEVELID" referencedTableName="PRICELEVEL" validate="true"/>
</changeSet> </changeSet>
<changeSet author="a_LAB01_e85d8801c" id="fk-contact-298-198"> <changeSet author="a_LAB01_e85d8801c" id="fk-contact-300-198">
<addForeignKeyConstraint baseColumnNames="PREFERREDSERVICEID" baseTableName="CONTACT" constraintName="DER1N_CONTACT__SERVICE__PREFER" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="SERVICEID" referencedTableName="SERVICE" validate="true"/> <addForeignKeyConstraint baseColumnNames="PREFERREDSERVICEID" baseTableName="CONTACT" constraintName="DER1N_CONTACT__SERVICE__PREFER" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="SERVICEID" referencedTableName="SERVICE" validate="true"/>
</changeSet> </changeSet>
<changeSet author="a_LAB01_e85d8801c" id="fk-contact-298-199"> <changeSet author="a_LAB01_e85d8801c" id="fk-contact-300-199">
<addForeignKeyConstraint baseColumnNames="SLAID" baseTableName="CONTACT" constraintName="DER1N_CONTACT__SLA__SLAID" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="SLAID" referencedTableName="SLA" validate="true"/> <addForeignKeyConstraint baseColumnNames="SLAID" baseTableName="CONTACT" constraintName="DER1N_CONTACT__SLA__SLAID" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="SLAID" referencedTableName="SLA" validate="true"/>
</changeSet> </changeSet>
<changeSet author="a_LAB01_e85d8801c" id="fk-contact-298-200"> <changeSet author="a_LAB01_e85d8801c" id="fk-contact-300-200">
<addForeignKeyConstraint baseColumnNames="TRANSACTIONCURRENCYID" baseTableName="CONTACT" constraintName="DER1N_CONTACT__TRANSACTIONCURR" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="TRANSACTIONCURRENCYID" referencedTableName="TRANSACTIONCURRENCY" validate="true"/> <addForeignKeyConstraint baseColumnNames="TRANSACTIONCURRENCYID" baseTableName="CONTACT" constraintName="DER1N_CONTACT__TRANSACTIONCURR" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="TRANSACTIONCURRENCYID" referencedTableName="TRANSACTIONCURRENCY" validate="true"/>
</changeSet> </changeSet>
<!--输出实体[CONTRACT]外键关系 --> <!--输出实体[CONTRACT]外键关系 -->
...@@ -11513,25 +11513,25 @@ ...@@ -11513,25 +11513,25 @@
<addForeignKeyConstraint baseColumnNames="TRANSACTIONCURRENCYID" baseTableName="MONTHLYFISCALCALENDAR" constraintName="DER1N_MONTHLYFISCALCALENDAR__T" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="TRANSACTIONCURRENCYID" referencedTableName="TRANSACTIONCURRENCY" validate="true"/> <addForeignKeyConstraint baseColumnNames="TRANSACTIONCURRENCYID" baseTableName="MONTHLYFISCALCALENDAR" constraintName="DER1N_MONTHLYFISCALCALENDAR__T" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="TRANSACTIONCURRENCYID" referencedTableName="TRANSACTIONCURRENCY" validate="true"/>
</changeSet> </changeSet>
<!--输出实体[OPPORTUNITY]外键关系 --> <!--输出实体[OPPORTUNITY]外键关系 -->
<changeSet author="a_LAB01_e85d8801c" id="fk-opportunity-145-310"> <changeSet author="a_LAB01_e85d8801c" id="fk-opportunity-146-310">
<addForeignKeyConstraint baseColumnNames="PARENTACCOUNTID" baseTableName="OPPORTUNITY" constraintName="DER1N_OPPORTUNITY__ACCOUNT__PA" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="ACCOUNTID" referencedTableName="ACCOUNT" validate="true"/> <addForeignKeyConstraint baseColumnNames="PARENTACCOUNTID" baseTableName="OPPORTUNITY" constraintName="DER1N_OPPORTUNITY__ACCOUNT__PA" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="ACCOUNTID" referencedTableName="ACCOUNT" validate="true"/>
</changeSet> </changeSet>
<changeSet author="a_LAB01_e85d8801c" id="fk-opportunity-145-311"> <changeSet author="a_LAB01_e85d8801c" id="fk-opportunity-146-311">
<addForeignKeyConstraint baseColumnNames="CAMPAIGNID" baseTableName="OPPORTUNITY" constraintName="DER1N_OPPORTUNITY__CAMPAIGN__C" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="CAMPAIGNID" referencedTableName="CAMPAIGN" validate="true"/> <addForeignKeyConstraint baseColumnNames="CAMPAIGNID" baseTableName="OPPORTUNITY" constraintName="DER1N_OPPORTUNITY__CAMPAIGN__C" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="CAMPAIGNID" referencedTableName="CAMPAIGN" validate="true"/>
</changeSet> </changeSet>
<changeSet author="a_LAB01_e85d8801c" id="fk-opportunity-145-312"> <changeSet author="a_LAB01_e85d8801c" id="fk-opportunity-146-312">
<addForeignKeyConstraint baseColumnNames="PARENTCONTACTID" baseTableName="OPPORTUNITY" constraintName="DER1N_OPPORTUNITY__CONTACT__PA" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="CONTACTID" referencedTableName="CONTACT" validate="true"/> <addForeignKeyConstraint baseColumnNames="PARENTCONTACTID" baseTableName="OPPORTUNITY" constraintName="DER1N_OPPORTUNITY__CONTACT__PA" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="CONTACTID" referencedTableName="CONTACT" validate="true"/>
</changeSet> </changeSet>
<changeSet author="a_LAB01_e85d8801c" id="fk-opportunity-145-313"> <changeSet author="a_LAB01_e85d8801c" id="fk-opportunity-146-313">
<addForeignKeyConstraint baseColumnNames="ORIGINATINGLEADID" baseTableName="OPPORTUNITY" constraintName="DER1N_OPPORTUNITY__LEAD__ORIGI" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="LEADID" referencedTableName="LEAD" validate="true"/> <addForeignKeyConstraint baseColumnNames="ORIGINATINGLEADID" baseTableName="OPPORTUNITY" constraintName="DER1N_OPPORTUNITY__LEAD__ORIGI" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="LEADID" referencedTableName="LEAD" validate="true"/>
</changeSet> </changeSet>
<changeSet author="a_LAB01_e85d8801c" id="fk-opportunity-145-314"> <changeSet author="a_LAB01_e85d8801c" id="fk-opportunity-146-314">
<addForeignKeyConstraint baseColumnNames="PRICELEVELID" baseTableName="OPPORTUNITY" constraintName="DER1N_OPPORTUNITY__PRICELEVEL_" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="PRICELEVELID" referencedTableName="PRICELEVEL" validate="true"/> <addForeignKeyConstraint baseColumnNames="PRICELEVELID" baseTableName="OPPORTUNITY" constraintName="DER1N_OPPORTUNITY__PRICELEVEL_" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="PRICELEVELID" referencedTableName="PRICELEVEL" validate="true"/>
</changeSet> </changeSet>
<changeSet author="a_LAB01_e85d8801c" id="fk-opportunity-145-315"> <changeSet author="a_LAB01_e85d8801c" id="fk-opportunity-146-315">
<addForeignKeyConstraint baseColumnNames="SLAID" baseTableName="OPPORTUNITY" constraintName="DER1N_OPPORTUNITY__SLA__SLAID" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="SLAID" referencedTableName="SLA" validate="true"/> <addForeignKeyConstraint baseColumnNames="SLAID" baseTableName="OPPORTUNITY" constraintName="DER1N_OPPORTUNITY__SLA__SLAID" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="SLAID" referencedTableName="SLA" validate="true"/>
</changeSet> </changeSet>
<changeSet author="a_LAB01_e85d8801c" id="fk-opportunity-145-316"> <changeSet author="a_LAB01_e85d8801c" id="fk-opportunity-146-316">
<addForeignKeyConstraint baseColumnNames="TRANSACTIONCURRENCYID" baseTableName="OPPORTUNITY" constraintName="DER1N_OPPORTUNITY__TRANSACTION" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="TRANSACTIONCURRENCYID" referencedTableName="TRANSACTIONCURRENCY" validate="true"/> <addForeignKeyConstraint baseColumnNames="TRANSACTIONCURRENCYID" baseTableName="OPPORTUNITY" constraintName="DER1N_OPPORTUNITY__TRANSACTION" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="TRANSACTIONCURRENCYID" referencedTableName="TRANSACTIONCURRENCY" validate="true"/>
</changeSet> </changeSet>
<!--输出实体[OPPORTUNITYCLOSE]外键关系 --> <!--输出实体[OPPORTUNITYCLOSE]外键关系 -->
...@@ -11904,10 +11904,10 @@ ...@@ -11904,10 +11904,10 @@
<!--输出实体[UOMSCHEDULE]外键关系 --> <!--输出实体[UOMSCHEDULE]外键关系 -->
<!--输出实体[WEBSITE]外键关系 --> <!--输出实体[WEBSITE]外键关系 -->
<!--输出实体[WEBSITECHANNEL]外键关系 --> <!--输出实体[WEBSITECHANNEL]外键关系 -->
<changeSet author="a_LAB01_e85d8801c" id="fk-websitechannel-41-427"> <changeSet author="a_LAB01_e85d8801c" id="fk-websitechannel-43-427">
<addForeignKeyConstraint baseColumnNames="PWEBSITECHANNELID" baseTableName="WEBSITECHANNEL" constraintName="DER1N_WEBSITECHANNEL_WEBSITECH" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="WEBSITECHANNELID" referencedTableName="WEBSITECHANNEL" validate="true"/> <addForeignKeyConstraint baseColumnNames="PWEBSITECHANNELID" baseTableName="WEBSITECHANNEL" constraintName="DER1N_WEBSITECHANNEL_WEBSITECH" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="WEBSITECHANNELID" referencedTableName="WEBSITECHANNEL" validate="true"/>
</changeSet> </changeSet>
<changeSet author="a_LAB01_e85d8801c" id="fk-websitechannel-41-428"> <changeSet author="a_LAB01_e85d8801c" id="fk-websitechannel-43-428">
<addForeignKeyConstraint baseColumnNames="WEBSITEID" baseTableName="WEBSITECHANNEL" constraintName="DER1N_WEBSITECHANNEL_WEBSITE_W" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="WEBSITEID" referencedTableName="WEBSITE" validate="true"/> <addForeignKeyConstraint baseColumnNames="WEBSITEID" baseTableName="WEBSITECHANNEL" constraintName="DER1N_WEBSITECHANNEL_WEBSITE_W" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="WEBSITEID" referencedTableName="WEBSITE" validate="true"/>
</changeSet> </changeSet>
<!--输出实体[WEBSITECONTENT]外键关系 --> <!--输出实体[WEBSITECONTENT]外键关系 -->
......
...@@ -45,11 +45,26 @@ ...@@ -45,11 +45,26 @@
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">${ew.sqlSegment}</if> <if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">${ew.sqlSegment}</if>
</select> </select>
<!--数据集合[Root]-->
<select id="searchRoot" parameterType="cn.ibizlab.businesscentral.core.website.filter.WebSiteChannelSearchContext" resultMap="WebSiteChannelResultMap">
select t1.* from (
<include refid="Root" />
)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]--> <!--数据查询[Default]-->
<sql id="Default" databaseId="mysql"> <sql id="Default" databaseId="mysql">
<![CDATA[ SELECT t1.`CHANNELCODE`, t1.`CHANNELTYPE`, t1.`CREATEDATE`, t1.`CREATEMAN`, t1.`MEMO`, t1.`PWEBSITECHANNELID`, t11.`WEBSITECHANNELNAME` AS `PWEBSITECHANNELNAME`, t1.`SN`, t1.`UPDATEDATE`, t1.`UPDATEMAN`, t1.`VALIDFLAG`, t1.`WEBSITECHANNELID`, t1.`WEBSITECHANNELNAME`, t1.`WEBSITEID`, t21.`WEBSITENAME` FROM `WEBSITECHANNEL` t1 LEFT JOIN WEBSITECHANNEL t11 ON t1.PWEBSITECHANNELID = t11.WEBSITECHANNELID LEFT JOIN WEBSITE t21 ON t1.WEBSITEID = t21.WEBSITEID <![CDATA[ SELECT t1.`CHANNELCODE`, t1.`CHANNELTYPE`, t1.`CREATEDATE`, t1.`CREATEMAN`, t1.`MEMO`, t1.`PWEBSITECHANNELID`, t11.`WEBSITECHANNELNAME` AS `PWEBSITECHANNELNAME`, t1.`SN`, t1.`UPDATEDATE`, t1.`UPDATEMAN`, t1.`VALIDFLAG`, t1.`WEBSITECHANNELID`, t1.`WEBSITECHANNELNAME`, t1.`WEBSITEID`, t21.`WEBSITENAME` FROM `WEBSITECHANNEL` t1 LEFT JOIN WEBSITECHANNEL t11 ON t1.PWEBSITECHANNELID = t11.WEBSITECHANNELID LEFT JOIN WEBSITE t21 ON t1.WEBSITEID = t21.WEBSITEID
]]> ]]>
</sql> </sql>
<!--数据查询[Root]-->
<sql id="Root" databaseId="mysql">
<![CDATA[ SELECT t1.`CHANNELCODE`, t1.`CHANNELTYPE`, t1.`CREATEDATE`, t1.`CREATEMAN`, t1.`MEMO`, t1.`PWEBSITECHANNELID`, t11.`WEBSITECHANNELNAME` AS `PWEBSITECHANNELNAME`, t1.`SN`, t1.`UPDATEDATE`, t1.`UPDATEMAN`, t1.`VALIDFLAG`, t1.`WEBSITECHANNELID`, t1.`WEBSITECHANNELNAME`, t1.`WEBSITEID`, t21.`WEBSITENAME` FROM `WEBSITECHANNEL` t1 LEFT JOIN WEBSITECHANNEL t11 ON t1.PWEBSITECHANNELID = t11.WEBSITECHANNELID LEFT JOIN WEBSITE t21 ON t1.WEBSITEID = t21.WEBSITEID
WHERE ( t1.`PWEBSITECHANNELID` IS NULL )
]]>
</sql>
<!--数据查询[View]--> <!--数据查询[View]-->
<sql id="View" databaseId="mysql"> <sql id="View" databaseId="mysql">
<![CDATA[ SELECT t1.`CHANNELCODE`, t1.`CHANNELTYPE`, t1.`CREATEDATE`, t1.`CREATEMAN`, t1.`MEMO`, t1.`PWEBSITECHANNELID`, t11.`WEBSITECHANNELNAME` AS `PWEBSITECHANNELNAME`, t1.`SN`, t1.`UPDATEDATE`, t1.`UPDATEMAN`, t1.`VALIDFLAG`, t1.`WEBSITECHANNELID`, t1.`WEBSITECHANNELNAME`, t1.`WEBSITEID`, t21.`WEBSITENAME` FROM `WEBSITECHANNEL` t1 LEFT JOIN WEBSITECHANNEL t11 ON t1.PWEBSITECHANNELID = t11.WEBSITECHANNELID LEFT JOIN WEBSITE t21 ON t1.WEBSITEID = t21.WEBSITEID <![CDATA[ SELECT t1.`CHANNELCODE`, t1.`CHANNELTYPE`, t1.`CREATEDATE`, t1.`CREATEMAN`, t1.`MEMO`, t1.`PWEBSITECHANNELID`, t11.`WEBSITECHANNELNAME` AS `PWEBSITECHANNELNAME`, t1.`SN`, t1.`UPDATEDATE`, t1.`UPDATEMAN`, t1.`VALIDFLAG`, t1.`WEBSITECHANNELID`, t1.`WEBSITECHANNELNAME`, t1.`WEBSITEID`, t21.`WEBSITENAME` FROM `WEBSITECHANNEL` t1 LEFT JOIN WEBSITECHANNEL t11 ON t1.PWEBSITECHANNELID = t11.WEBSITECHANNELID LEFT JOIN WEBSITE t21 ON t1.WEBSITEID = t21.WEBSITEID
......
...@@ -447,7 +447,7 @@ ...@@ -447,7 +447,7 @@
"dename":"WebSiteChannel", "dename":"WebSiteChannel",
"delogicname":"站点频道", "delogicname":"站点频道",
"sysmoudle":{"id":"WEBSITE","name":"WebSite"}, "sysmoudle":{"id":"WEBSITE","name":"WebSite"},
"dedataset":[{"id":"Default" , "name":"DEFAULT"}], "dedataset":[{"id":"Default" , "name":"DEFAULT"},{"id":"Root" , "name":"Root"}],
"deaction":[{"id":"Create" , "name":"Create" , "type":"BUILTIN" },{"id":"Update" , "name":"Update" , "type":"BUILTIN" },{"id":"Remove" , "name":"Remove" , "type":"BUILTIN" },{"id":"Get" , "name":"Get" , "type":"BUILTIN" },{"id":"GetDraft" , "name":"GetDraft" , "type":"BUILTIN" },{"id":"CheckKey" , "name":"CheckKey" , "type":"BUILTIN" },{"id":"Save" , "name":"Save" , "type":"BUILTIN" }], "deaction":[{"id":"Create" , "name":"Create" , "type":"BUILTIN" },{"id":"Update" , "name":"Update" , "type":"BUILTIN" },{"id":"Remove" , "name":"Remove" , "type":"BUILTIN" },{"id":"Get" , "name":"Get" , "type":"BUILTIN" },{"id":"GetDraft" , "name":"GetDraft" , "type":"BUILTIN" },{"id":"CheckKey" , "name":"CheckKey" , "type":"BUILTIN" },{"id":"Save" , "name":"Save" , "type":"BUILTIN" }],
"datascope":[{"id":"all","name":"全部数据"}, {"id":"createman","name":"创建人"}] "datascope":[{"id":"all","name":"全部数据"}, {"id":"createman","name":"创建人"}]
} }
......
...@@ -160,6 +160,27 @@ public class WebSiteChannelResource { ...@@ -160,6 +160,27 @@ public class WebSiteChannelResource {
return ResponseEntity.status(HttpStatus.OK) return ResponseEntity.status(HttpStatus.OK)
.body(new PageImpl(websitechannelMapping.toDto(domains.getContent()), context.getPageable(), domains.getTotalElements())); .body(new PageImpl(websitechannelMapping.toDto(domains.getContent()), context.getPageable(), domains.getTotalElements()));
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-WebSiteChannel-searchRoot-all') and hasPermission(#context,'iBizBusinessCentral-WebSiteChannel-Get')")
@ApiOperation(value = "获取Root", tags = {"站点频道" } ,notes = "获取Root")
@RequestMapping(method= RequestMethod.GET , value="/websitechannels/fetchroot")
public ResponseEntity<List<WebSiteChannelDTO>> fetchRoot(WebSiteChannelSearchContext context) {
Page<WebSiteChannel> domains = websitechannelService.searchRoot(context) ;
List<WebSiteChannelDTO> list = websitechannelMapping.toDto(domains.getContent());
return ResponseEntity.status(HttpStatus.OK)
.header("x-page", String.valueOf(context.getPageable().getPageNumber()))
.header("x-per-page", String.valueOf(context.getPageable().getPageSize()))
.header("x-total", String.valueOf(domains.getTotalElements()))
.body(list);
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-WebSiteChannel-searchRoot-all') and hasPermission(#context,'iBizBusinessCentral-WebSiteChannel-Get')")
@ApiOperation(value = "查询Root", tags = {"站点频道" } ,notes = "查询Root")
@RequestMapping(method= RequestMethod.POST , value="/websitechannels/searchroot")
public ResponseEntity<Page<WebSiteChannelDTO>> searchRoot(@RequestBody WebSiteChannelSearchContext context) {
Page<WebSiteChannel> domains = websitechannelService.searchRoot(context) ;
return ResponseEntity.status(HttpStatus.OK)
.body(new PageImpl(websitechannelMapping.toDto(domains.getContent()), context.getPageable(), domains.getTotalElements()));
}
@PreAuthorize("hasPermission(this.websitechannelMapping.toDomain(#websitechanneldto),'iBizBusinessCentral-WebSiteChannel-Create')") @PreAuthorize("hasPermission(this.websitechannelMapping.toDomain(#websitechanneldto),'iBizBusinessCentral-WebSiteChannel-Create')")
@ApiOperation(value = "根据站点建立站点频道", tags = {"站点频道" }, notes = "根据站点建立站点频道") @ApiOperation(value = "根据站点建立站点频道", tags = {"站点频道" }, notes = "根据站点建立站点频道")
@RequestMapping(method = RequestMethod.POST, value = "/websites/{website_id}/websitechannels") @RequestMapping(method = RequestMethod.POST, value = "/websites/{website_id}/websitechannels")
...@@ -293,5 +314,28 @@ public class WebSiteChannelResource { ...@@ -293,5 +314,28 @@ public class WebSiteChannelResource {
return ResponseEntity.status(HttpStatus.OK) return ResponseEntity.status(HttpStatus.OK)
.body(new PageImpl(websitechannelMapping.toDto(domains.getContent()), context.getPageable(), domains.getTotalElements())); .body(new PageImpl(websitechannelMapping.toDto(domains.getContent()), context.getPageable(), domains.getTotalElements()));
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-WebSiteChannel-searchRoot-all') and hasPermission(#context,'iBizBusinessCentral-WebSiteChannel-Get')")
@ApiOperation(value = "根据站点获取Root", tags = {"站点频道" } ,notes = "根据站点获取Root")
@RequestMapping(method= RequestMethod.GET , value="/websites/{website_id}/websitechannels/fetchroot")
public ResponseEntity<List<WebSiteChannelDTO>> fetchWebSiteChannelRootByWebSite(@PathVariable("website_id") String website_id,WebSiteChannelSearchContext context) {
context.setN_websiteid_eq(website_id);
Page<WebSiteChannel> domains = websitechannelService.searchRoot(context) ;
List<WebSiteChannelDTO> list = websitechannelMapping.toDto(domains.getContent());
return ResponseEntity.status(HttpStatus.OK)
.header("x-page", String.valueOf(context.getPageable().getPageNumber()))
.header("x-per-page", String.valueOf(context.getPageable().getPageSize()))
.header("x-total", String.valueOf(domains.getTotalElements()))
.body(list);
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-WebSiteChannel-searchRoot-all') and hasPermission(#context,'iBizBusinessCentral-WebSiteChannel-Get')")
@ApiOperation(value = "根据站点查询Root", tags = {"站点频道" } ,notes = "根据站点查询Root")
@RequestMapping(method= RequestMethod.POST , value="/websites/{website_id}/websitechannels/searchroot")
public ResponseEntity<Page<WebSiteChannelDTO>> searchWebSiteChannelRootByWebSite(@PathVariable("website_id") String website_id, @RequestBody WebSiteChannelSearchContext context) {
context.setN_websiteid_eq(website_id);
Page<WebSiteChannel> domains = websitechannelService.searchRoot(context) ;
return ResponseEntity.status(HttpStatus.OK)
.body(new PageImpl(websitechannelMapping.toDto(domains.getContent()), context.getPageable(), domains.getTotalElements()));
}
} }
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册