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

chitanda 发布系统代码

上级 23b9452e
......@@ -6,7 +6,7 @@
export const getAppView = (state: any) => (viewtag: string) => {
const createdview = state.createdviews.find((appview: any) => Object.is(appview.secondtag, viewtag));
if (!createdview) {
console.log(`----视图 ${viewtag} 不存在-----`)
console.warn(`获取应用视图实例,,视图「${viewtag}」不存在`)
return null;
}
return createdview;
......@@ -20,7 +20,7 @@ export const getAppView = (state: any) => (viewtag: string) => {
export const getViewDataChangeState = (state:any) => (viewtag: string) => {
const createdview = state.createdviews.find((appview: any) => Object.is(appview.secondtag, viewtag));
if (!createdview) {
console.log(`----视图 ${viewtag} 不存在-----`)
console.warn(`获取视图数据状态,,视图「${viewtag}」不存在`)
return false;
}
return createdview.viewdatachange;
......@@ -34,7 +34,7 @@ export const getViewDataChangeState = (state:any) => (viewtag: string) => {
export const getRefreshData = (state: any) => (viewtag: string) => {
const createdview = state.createdviews.find((appview: any) => Object.is(appview.secondtag, viewtag));
if (!createdview) {
console.log(`----视图 ${viewtag} 不存在-----`)
console.warn(`获取数据刷新状态,视图「${viewtag}」不存在`)
return null;
}
return createdview.refreshdata;
......
......@@ -6,15 +6,10 @@
* @param param1
*/
export const createdView = (state: any, { viewtag, secondtag }: { viewtag: string, secondtag: string }) => {
// 该视图是否被创建
// const index = state.createdviews.findIndex((view: any) => Object.is(view.secondtag, viewtag));
// if (index !== -1) {
// return;
// }
// 原始数据中是否存在
const appview = state.appviews.find((appview: any) => Object.is(appview.viewtag, viewtag));
if (!appview) {
console.log(`----视图标识 ${viewtag} 不存在-----`)
console.warn(`视图「${viewtag}」原始数据不存在`);
return;
}
const _appview: any = JSON.parse(JSON.stringify(appview));
......@@ -48,7 +43,7 @@ export const removeView = (state: any, viewtag: string) => {
export const setViewDataChange = (state: any, { viewtag, viewdatachange }: { viewtag: string, viewdatachange: boolean }) => {
const createdview = state.createdviews.find((appview: any) => Object.is(appview.secondtag, viewtag));
if (!createdview) {
console.log(`----视图标识 ${viewtag} 不存在-----`)
console.warn(`设置数据状态变更,视图「${viewtag}」不存在`)
return;
}
createdview.viewdatachange = viewdatachange;
......@@ -63,7 +58,7 @@ export const setViewDataChange = (state: any, { viewtag, viewdatachange }: { vie
export const refreshViewData = (state: any, { viewtag }: { viewtag: string }) => {
const createdview = state.createdviews.find((appview: any) => Object.is(appview.secondtag, viewtag));
if (!createdview) {
console.log(`----视图标识 ${viewtag} 不存在-----`)
console.warn(`刷新视图数据,视图「${viewtag}」不存在`)
return;
}
createdview.refreshdata += 1;
......
......@@ -59,7 +59,6 @@ export class SearchFormControlBase extends EditFormControlBase {
this.fillForm(data, action);
this.oldData = {};
Object.assign(this.oldData, JSON.parse(JSON.stringify(this.data)));
this.$store.commit('viewaction/setViewDataChange', { viewtag: this.viewtag, viewdatachange: false });
this.formLogic({ name: '', newVal: null, oldVal: null });
}
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册