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

SYSTEM 发布系统代码

上级 54fe96cf
......@@ -15,67 +15,67 @@
</a-menu-item>
<a-menu-item key="2">
<a-icon type="upload" />
<span>表单4</span>
<span>表单9</span>
</a-menu-item>
<a-menu-item key="3">
<a-icon type="user" />
<span>表单9</span>
<span>表单7</span>
</a-menu-item>
<a-menu-item key="4">
<a-icon type="video-camera" />
<span>表单7</span>
<span>实体编辑视图</span>
</a-menu-item>
<a-menu-item key="5">
<a-icon type="upload" />
<span>实体编辑视图</span>
<span>表单6</span>
</a-menu-item>
<a-menu-item key="6">
<a-icon type="user" />
<span>表单6</span>
<span>基础编辑器</span>
</a-menu-item>
<a-menu-item key="7">
<a-icon type="video-camera" />
<span>基础编辑器</span>
<span>基础表单项</span>
</a-menu-item>
<a-menu-item key="8">
<a-icon type="upload" />
<span>基础表单项</span>
<span>实体3编辑视图</span>
</a-menu-item>
<a-menu-item key="9">
<a-icon type="user" />
<span>实体3编辑视图</span>
<span>表单5</span>
</a-menu-item>
<a-menu-item key="10">
<a-icon type="video-camera" />
<span>表单5</span>
<span>songtest</span>
</a-menu-item>
<a-menu-item key="11">
<a-icon type="upload" />
<span>songtest</span>
<span>实体4编辑视图</span>
</a-menu-item>
<a-menu-item key="12">
<a-icon type="user" />
<span>实体4编辑视图</span>
<span>实体5编辑视图</span>
</a-menu-item>
<a-menu-item key="13">
<a-icon type="video-camera" />
<span>实体5编辑视图</span>
<span>表单项动态逻辑示例</span>
</a-menu-item>
<a-menu-item key="14">
<a-icon type="upload" />
<span>表单项动态逻辑示例</span>
<span>表单9</span>
</a-menu-item>
<a-menu-item key="15">
<a-icon type="user" />
<span>表单9</span>
<span>实体2编辑视图</span>
</a-menu-item>
<a-menu-item key="16">
<a-icon type="video-camera" />
<span>实体2编辑视图</span>
<span>表单8</span>
</a-menu-item>
<a-menu-item key="17">
<a-icon type="upload" />
<span>表单8</span>
<span>表单12</span>
</a-menu-item>
<a-menu-item key="18">
<a-icon type="user" />
......@@ -95,22 +95,22 @@
<a-layout-content :style="{ margin: '24px 16px', padding: '24px', background: '#fff', minHeight: '280px' }">
<EntityMain2EditView v-show="curSelected == '0'"/>
<Entity4Main9EditView v-show="curSelected == '1'"/>
<ExampleMain4EditView v-show="curSelected == '2'"/>
<ExampleMain9EditView v-show="curSelected == '3'"/>
<ExampleMain7EditView v-show="curSelected == '4'"/>
<EntityEditView v-show="curSelected == '5'"/>
<ExampleMain6EditView v-show="curSelected == '6'"/>
<ExampleEditorType v-show="curSelected == '7'"/>
<ExampleEditView v-show="curSelected == '8'"/>
<Entity3EditView v-show="curSelected == '9'"/>
<ExampleMain5EditView v-show="curSelected == '10'"/>
<ExampleMain10EditView v-show="curSelected == '11'"/>
<Entity4EditView v-show="curSelected == '12'"/>
<Entity5EditView v-show="curSelected == '13'"/>
<ExampleDLFEditView v-show="curSelected == '14'"/>
<Entity3Main9EditView v-show="curSelected == '15'"/>
<Entity2EditView v-show="curSelected == '16'"/>
<ExampleMain8EditView v-show="curSelected == '17'"/>
<ExampleMain9EditView v-show="curSelected == '2'"/>
<ExampleMain7EditView v-show="curSelected == '3'"/>
<EntityEditView v-show="curSelected == '4'"/>
<ExampleMain6EditView v-show="curSelected == '5'"/>
<ExampleEditorType v-show="curSelected == '6'"/>
<ExampleEditView v-show="curSelected == '7'"/>
<Entity3EditView v-show="curSelected == '8'"/>
<ExampleMain5EditView v-show="curSelected == '9'"/>
<ExampleMain10EditView v-show="curSelected == '10'"/>
<Entity4EditView v-show="curSelected == '11'"/>
<Entity5EditView v-show="curSelected == '12'"/>
<ExampleDLFEditView v-show="curSelected == '13'"/>
<Entity3Main9EditView v-show="curSelected == '14'"/>
<Entity2EditView v-show="curSelected == '15'"/>
<ExampleMain8EditView v-show="curSelected == '16'"/>
<ExampleMain12EditView v-show="curSelected == '17'"/>
<ExampleMain2EditView v-show="curSelected == '18'"/>
<ExampleMain11EditView v-show="curSelected == '19'"/>
<ExampleMain3EditView v-show="curSelected == '20'"/>
......@@ -128,7 +128,6 @@ import AppService from "@service/AppService";
import EntityMain2EditView from '@pages/module/entity-main2-edit-view/entity-main2-edit-view.vue';
import Entity4Main9EditView from '@pages/module4/entity4-main9-edit-view/entity4-main9-edit-view.vue';
import ExampleMain4EditView from '@pages/exapmple/example-main4-edit-view/example-main4-edit-view.vue';
import ExampleMain9EditView from '@pages/exapmple/example-main9-edit-view/example-main9-edit-view.vue';
import ExampleMain7EditView from '@pages/exapmple/example-main7-edit-view/example-main7-edit-view.vue';
import EntityEditView from '@pages/module/entity-edit-view/entity-edit-view.vue';
......@@ -144,6 +143,7 @@ import ExampleDLFEditView from '@pages/exapmple/example-dlfedit-view/example-dlf
import Entity3Main9EditView from '@pages/module3/entity3-main9-edit-view/entity3-main9-edit-view.vue';
import Entity2EditView from '@pages/module2/entity2-edit-view/entity2-edit-view.vue';
import ExampleMain8EditView from '@pages/exapmple/example-main8-edit-view/example-main8-edit-view.vue';
import ExampleMain12EditView from '@pages/exapmple/example-main12-edit-view/example-main12-edit-view.vue';
import ExampleMain2EditView from '@pages/exapmple/example-main2-edit-view/example-main2-edit-view.vue';
import ExampleMain11EditView from '@pages/exapmple/example-main11-edit-view/example-main11-edit-view.vue';
import ExampleMain3EditView from '@pages/exapmple/example-main3-edit-view/example-main3-edit-view.vue';
......@@ -153,7 +153,6 @@ export default {
components: {
EntityMain2EditView,
Entity4Main9EditView,
ExampleMain4EditView,
ExampleMain9EditView,
ExampleMain7EditView,
EntityEditView,
......@@ -169,6 +168,7 @@ export default {
Entity3Main9EditView,
Entity2EditView,
ExampleMain8EditView,
ExampleMain12EditView,
ExampleMain2EditView,
ExampleMain11EditView,
ExampleMain3EditView
......
<template>
<div class="app-form">
<a-form class="" style="">
<a-row>
<a-tabs @change="formPageSelected">
</a-tabs>
</a-row>
</a-form>
</div>
</template>
<script>
import { FormButtonModel,FormDetailModel,FormItemModel,FormDRUIPartModel,FormGroupPanelModel,FormIFrameModel,FormPageModel,FormPartModel,FormRowItemModel,FormTabPageModel,FormTabPanelModel,FormUserControlModel} from "@models/index.js";
import Schema from "async-validator";
import ComUtil from '@utils/ComUtil';
import AppService from "@service/AppService";
export default {
name: "Main12form",
props:{
formData:Object
},
watch: {
'formData': {
handler: 'onFormDataChanged',
immediate: true,
deep: true
}
},
data() {
return {
/**
* 当前语言
*
*/
local:"",
/**
* 激活分组
*
*/
activeGroup:[],
/**
* 激活分组
*
*/
data:{
srfupdatedate: null,
srforikey: null,
srfkey: null,
srfmajortext: null,
srftempmode: null,
srfuf: null,
srfdeid: null,
srfsourcekey: null,
exampleid: null,
},
/**
* 表单模型
*
*/
detailsModel:{
srfupdatedate: new FormItemModel({ caption: '更新时间', detailType: 'FORMITEM', name: 'srfupdatedate', visible: true, isShowCaption: true, form: this, disabled: false,validateStatus:"",error:"",required:false,enableCond: 3 })
,
srforikey: new FormItemModel({ caption: '', detailType: 'FORMITEM', name: 'srforikey', visible: true, isShowCaption: true, form: this, disabled: false,validateStatus:"",error:"",required:false,enableCond: 3 })
,
srfkey: new FormItemModel({ caption: '示例标识', detailType: 'FORMITEM', name: 'srfkey', visible: true, isShowCaption: true, form: this, disabled: false,validateStatus:"",error:"",required:false,enableCond: 3 })
,
srfmajortext: new FormItemModel({ caption: '示例名称', detailType: 'FORMITEM', name: 'srfmajortext', visible: true, isShowCaption: true, form: this, disabled: false,validateStatus:"",error:"",required:false,enableCond: 3 })
,
srftempmode: new FormItemModel({ caption: '', detailType: 'FORMITEM', name: 'srftempmode', visible: true, isShowCaption: true, form: this, disabled: false,validateStatus:"",error:"",required:false,enableCond: 3 })
,
srfuf: new FormItemModel({ caption: '', detailType: 'FORMITEM', name: 'srfuf', visible: true, isShowCaption: true, form: this, disabled: false,validateStatus:"",error:"",required:false,enableCond: 3 })
,
srfdeid: new FormItemModel({ caption: '', detailType: 'FORMITEM', name: 'srfdeid', visible: true, isShowCaption: true, form: this, disabled: false,validateStatus:"",error:"",required:false,enableCond: 3 })
,
srfsourcekey: new FormItemModel({ caption: '', detailType: 'FORMITEM', name: 'srfsourcekey', visible: true, isShowCaption: true, form: this, disabled: false,validateStatus:"",error:"",required:false,enableCond: 3 })
,
exampleid: new FormItemModel({ caption: '示例标识', detailType: 'FORMITEM', name: 'exampleid', visible: true, isShowCaption: true, form: this, disabled: false,validateStatus:"",error:"",required:false,enableCond: 3 })
,
form: new FormTabPanelModel({ caption: 'form', detailType: 'TABPANEL', name: 'form', visible: true, isShowCaption: true, form: this, tabPages: [] }),
},
/**
* 代码表模型
*
*/
codelistModel:{
},
/**
* 表单值规则
*
*/
formRules:{
},
/**
* 默认值规则
*
*/
rules:{
srfupdatedate: [
{ type: 'string', message: '更新时间 值必须为字符串类型', trigger: 'change' },
{ required: false, type: 'string', message: '更新时间 值不能为空', trigger: 'change' },
{ required: false, type: 'string', message: '更新时间 值不能为空', trigger: 'blur' },
],
srforikey: [
{ type: 'string', message: ' 值必须为字符串类型', trigger: 'change' },
{ required: false, type: 'string', message: ' 值不能为空', trigger: 'change' },
{ required: false, type: 'string', message: ' 值不能为空', trigger: 'blur' },
],
srfkey: [
{ type: 'string', message: '示例标识 值必须为字符串类型', trigger: 'change' },
{ required: false, type: 'string', message: '示例标识 值不能为空', trigger: 'change' },
{ required: false, type: 'string', message: '示例标识 值不能为空', trigger: 'blur' },
],
srfmajortext: [
{ type: 'string', message: '示例名称 值必须为字符串类型', trigger: 'change' },
{ required: false, type: 'string', message: '示例名称 值不能为空', trigger: 'change' },
{ required: false, type: 'string', message: '示例名称 值不能为空', trigger: 'blur' },
],
srftempmode: [
{ type: 'string', message: ' 值必须为字符串类型', trigger: 'change' },
{ required: false, type: 'string', message: ' 值不能为空', trigger: 'change' },
{ required: false, type: 'string', message: ' 值不能为空', trigger: 'blur' },
],
srfuf: [
{ type: 'string', message: ' 值必须为字符串类型', trigger: 'change' },
{ required: false, type: 'string', message: ' 值不能为空', trigger: 'change' },
{ required: false, type: 'string', message: ' 值不能为空', trigger: 'blur' },
],
srfdeid: [
{ type: 'string', message: ' 值必须为字符串类型', trigger: 'change' },
{ required: false, type: 'string', message: ' 值不能为空', trigger: 'change' },
{ required: false, type: 'string', message: ' 值不能为空', trigger: 'blur' },
],
srfsourcekey: [
{ type: 'string', message: ' 值必须为字符串类型', trigger: 'change' },
{ required: false, type: 'string', message: ' 值不能为空', trigger: 'change' },
{ required: false, type: 'string', message: ' 值不能为空', trigger: 'blur' },
],
exampleid: [
{ type: 'string', message: '示例标识 值必须为字符串类型', trigger: 'change' },
{ required: false, type: 'string', message: '示例标识 值不能为空', trigger: 'change' },
{ required: false, type: 'string', message: '示例标识 值不能为空', trigger: 'blur' },
],
}
};
},
created(){
this.initForm();
this.initlangu();
},
methods: {
/**
* 初始化表单
*
*/
initForm(){
if(Object.keys(this.data).length >0){
Object.keys(this.data).forEach((item) =>{
this.formItemChange(item,this.data[item],true);
})
}
},
/**
* 初始化语言
*
*/
initlangu(){
if (Object.is(window.localStorage.getItem("curLang"), "zh")) {
this.local ="zh_CN";
} else {
this.local ="en_GB";
}
AppService.getInstance().subject.subscribe(res => {
if (Object.is(res, "zh")) {
this.local ="zh_CN";
} else {
this.local ="en_GB";
}
});
},
/**
* 分页选中
*
*/
formPageSelected(key){
console.log("表单选中了"+key);
},
/**
* 按钮点击事件
*
*/
button_click($event,caption){
this.$message.success("点击了"+caption);
},
/**
* 表单项值变化
*
*/
formItemChange(name,value,isFirst){
this.formLogic(name,value);
if(!isFirst){
this.validateItem(name, value);
this.$emit('formItemChange',{name:name,value:value});
}
},
/**
* 校验单个表单项
* @param item
* @param value
*/
validateItem(item, value) {
// 做校验
// 1.获取数值和规则
const rule = this.rules[item];
// 2.创建校验规则
const schema = new Schema({ [item]: rule })
// 校验返回Promise
return schema.validate({ [item]: value },undefined,errors => {
if (errors) {
// 有错
this.detailsModel[item].setError(errors[0].message);
} else {
this.detailsModel[item].setError('');
}
})
},
/**
* 校验表单
*
* @memberof Main
*/
validateForm(callback) {
let tasks;
if (Object.keys(this.data).length > 0) {
tasks = Object.keys(this.data).map((item) => {
this.validateItem(item, this.data[item]);
})
}
Promise.all(tasks)
.then(() => callback(true))
.catch(() => callback(false))
},
/**
* 表单逻辑
*
*/
formLogic( name, newVal, oldVal) {
},
onFormDataChanged(val,oldVal){
if(val && val !== oldVal){
Object.keys(this.data).forEach(item =>{
this.data[item] = null;
})
Object.assign(this.data,val);
}
}
}
}
</script>
<style scoped>
</style>
<template>
<div>
<Main12form :formData="formData" @formItemChange="formItemChange"></Main12form></div>
</template>
<script>
import Main12form from '@forms/example/main12/main12.vue';
export default {
name: "ExampleMain12EditView",
components: {
Main12form
},
data(){
return {
formData:{
"bookname":"test1",
"input":"文本test",
"label":"标签test",
"group1":"书籍基本信息test",
"formpage1":"基本信息test",
"createman":"建立人test",
"createdate":"建立时间test",
"updateman":"更新人test",
"updatedate":"更新时间test",
"group2":"操作信息test",
"formpage2":"其它test"
}
}
},
methods:{
formItemChange(value){
console.log(value);
}
}
}
</script>
<style scoped>
</style>
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册