wangting
2024-05-15 540acddabc14a8fef98cd91035ae6653afb9b765
升版action,配置文档
已修改5个文件
已添加5个文件
539 ■■■■■ 文件已修改
Source/ProjectWeb/src/api/base/actions.js 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/ProjectWeb/src/components/actions/AddEditDialog.vue 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/ProjectWeb/src/components/actions/RevisionDialog.vue 285 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/ProjectWeb/src/components/actions/base/RevisionAction.js 102 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/ProjectWeb/src/components/actions/handlers.js 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/ProjectWeb/src/configDoc/Action.md 113 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/ProjectWeb/src/configDoc/Action/img_del.png 补丁 | 查看 | 原始文档 | blame | 历史
Source/ProjectWeb/src/configDoc/Action/img_rev.png 补丁 | 查看 | 原始文档 | blame | 历史
Source/ProjectWeb/src/configDoc/Action/img_view.png 补丁 | 查看 | 原始文档 | blame | 历史
Source/ProjectWeb/src/configDoc/UI.md 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/ProjectWeb/src/api/base/actions.js
@@ -24,3 +24,11 @@
    data
  })
}
// å‡ç‰ˆ
export const upRevision = (data,url,method) => {
  return request({
    url: url || '/api/uiDataController/upRevision',
    method: method || 'put',
    data
  })
}
Source/ProjectWeb/src/components/actions/AddEditDialog.vue
@@ -241,6 +241,16 @@
          if(that.saveCallback){
            that.saveCallback(that.type,that.form);
          }
          if (this.paramVOS.saveafterevent) {
            let urlobj = parseEventByUrl(this.paramVOS.saveafterevent,null,null,'doAction');
            import(`./${urlobj.jsPath}.js`).then(module => {
              module[urlobj.methodName]({
                paramVOS: this.paramVOS,
                dataStore: this.dataStore,
                sourceData:this.sourceData
              });
            })
          }
          that.dialogClose();
        });
      }else{
@@ -252,6 +262,16 @@
          if(that.saveCallback){
            that.saveCallback(that.type,that.form);
          }
          if (this.paramVOS.saveafterevent) {
            let urlobj = parseEventByUrl(this.paramVOS.saveafterevent,null,null,'doAction');
            import(`./${urlobj.jsPath}.js`).then(module => {
              module[urlobj.methodName]({
                paramVOS: this.paramVOS,
                dataStore: this.dataStore,
                sourceData:this.sourceData
              });
            })
          }
          that.dialogClose();
        });
      }
Source/ProjectWeb/src/components/actions/RevisionDialog.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,285 @@
<template>
  <el-dialog v-dialogDrag
             :title="title"
             :visible.sync="visible"
             :width="width"
             :fullscreen="fullscreen"
             :append-to-body="true"
             top="0"
             class="avue-dialog"
             :destroy-on-close="true"
             @close="dialogClose">
    <basic-form ref="formRef" v-if="paramVOS.form"
                :key="'dialog-'+paramVOS.form"
                :span="span"
                :style="fullscreen?'':'height:'+height"
                :isEdit="true"
                :formItems="formItems"
                :formData="form"
                :initValue="paramVOS.initvalue"
                :uploadattachment="paramVOS.uploadattachment || false"
                @getFormData="getFormData">
    </basic-form>
    <ui-view ref="uiViewRef" v-else-if="paramVOS.context"
             :key="'RevisionDialog-'+type"
             :style="fullscreen?'':'height:'+height"
             :btmType="paramVOS.type"
             :context="paramVOS.context"
             :inDialog="true"
             :canEdit="true"
             :actionType="type"
             :sourceData="sourceData"
             :dataStore="dataStore"
             :paramVOS="paramVOS"
             @getFormData="getFormData"
    ></ui-view>
    <div v-if="showSave" class="dialog-footer avue-dialog__footer">
      <el-button type="primary" plain size="small" @click="formSave" v-if="paramVOS.form">保 å­˜</el-button>
      <el-button type="primary" plain size="small" @click="contextSave" v-else>保 å­˜</el-button>
      <el-button size="small" @click="dialogClose">取 æ¶ˆ</el-button>
      <el-button size="small" @click="resetValue" v-if="paramVOS.form">重 ç½®</el-button>
    </div>
  </el-dialog>
</template>
<script>
import uiView from "@/views/base/UIContentViewerInDialog"
import {parseEventByUrl} from "@/components/actions/base/BaseAction"
import {getFormDefineById,dataForm} from "@/api/base/ui";
import {upRevision} from "@/api/base/actions"
import {validatenull} from "@/util/validate"
export default {
  name: "RevisionDialog",
  components:{uiView},
  props: {
    sourceData: {
      //所属区域的上一区域选中数据
      type: Object,
      default: {}
    },
    dataStore: {
      //弹窗时按钮所属区域选中数据
      type: Array,
      default: []
    },
    paramVOS: {
      type: Object,
      default: {}
    }
  },
  data(){
    return {
      type:"add",
      visible:false,
      showSave:this.paramVOS.customBtn || true,
      span:12,
      formItems:[],
      form:{},
      btmDefaultKeys : ['oid', 'id', 'name', 'description', 'revisionoid', 'nameoid', 'btmname', 'lastr', 'firstr', 'lastv', 'firstv', 'creator', 'createtime', 'lastModifier', 'lastmodifytime', 'revisionrule', 'revisionseq', 'revisionvalue', 'versionrule', 'versionseq', 'versionvalue', 'lcstatus', 'ts', 'owner', 'checkinby', 'checkintime', 'checkoutby', 'checkouttime', 'copyfromversion', 'secretgrade'],
      linkDefaultKeys :['oid','creator','createtime','lastmodifier','lastmodifytime','f_oid','foid','f_revisionoid','frevisionoid','f_nameoid','fnameoid','f_btmname','fbtmname','t_oid','toid','t_revisionoid','trevisionoid','t_nameoid','tnameoid','t_btmname','tbtmname','ts']
    }
  },
  computed:{
    title(){
      return this.paramVOS.title || "升版"
    },
    width() {
      if (!validatenull(this.paramVOS.width)) {
        if (this.paramVOS.width.includes("px") || this.paramVOS.width.includes("%")) {
          return this.paramVOS.width;
        } else {
          return this.paramVOS.width + "px";
        }
      } else {
        return "60%";
      }
    },
    height(){
      if (!validatenull(this.paramVOS.height)) {
        if (this.paramVOS.height.includes("px") || this.paramVOS.height.includes("%")) {
          return this.paramVOS.height;
        } else {
          return this.paramVOS.height + "px";
        }
      } else {
        return "auto"
      }
    },
    fullscreen(){
      if(this.paramVOS.width || this.paramVOS.height){
        return false;
      }else if(this.paramVOS.form){
        return false;
      }
      return true;
    }
  },
  created() {
  },
  watch: {
    paramVOS: {
      handler(val) {
        if (this.paramVOS.form) {
          this.onLoad();
        }
      },
      deep: true,
      immediate: true
    },
  },
  methods: {
    dialogClose() {
      this.visible = false;
    },
    onLoad: function () {
      if (Object.keys(this.sourceData).length > 0) {
        this.loading = true;
        getFormDefineById(this.paramVOS.type,this.paramVOS.form).then(result => {
          this.formItems=result.data.obj.items;
          this.span=result.data.obj.columnOneRow?(24/result.data.obj.columnOneRow) : 12;
          if (this.paramVOS.initvalue) {
            this.form=this.paramVOS.initvalue;
          }
          //加载表单数据
          let sourceDataMap = {};
          for (let i in this.sourceData) {
            const item = this.sourceData[i]
            if (item.constructor === Object) return;
            sourceDataMap['sourceData["' + i + '"]'] = item;
          }
          dataForm(Object.assign({
            btmname: this.paramVOS.type,
            formDefineId: this.paramVOS.form,
            oid: this.dataStore[0].oid
          }, sourceDataMap), this.paramVOS.getdataurl, this.paramVOS.getdatamethod).then(res => {
            this.form=res.data.obj;
            this.loading = false;
          }).catch(error => {
            this.$message.error(error);
            this.loading = false;
          })
        }).catch(error => {
          this.$message.error(error);
          this.loading = false;
        });
      }
    },
    contextSave(){
      const useDataType=this.paramVOS["useDataType"] || "form";//使用ui上下文中的哪个类型数据,默认form。值:form、tree、table、TreeTable
      for(let key in this.$refs.uiViewRef.data){
        if(this.$refs.uiViewRef.data[key].type== useDataType){
          this.form=this.$refs.uiViewRef.data[key].data;
          this.formDefineId=this.$refs.uiViewRef.data[key].DefineVO.id;
          if (this.paramVOS.savebeforeevent) {
            var urlobj = parseEventByUrl(this.paramVOS.savebeforeevent,null,null,'doAction');
            import(`./${urlobj.jsPath}.js`).then(module => {
              module[urlobj.methodName]({
                paramVOS: this.paramVOS,
                dataStore: this.dataStore,
                sourceData:this.sourceData
              },this.formSaveHandle);
            })
          } else {
            this.formSaveHandle();
          }
          return;
        }
      }
    },
    formSave() {
      let that=this;
      this.$refs.formRef.validate((valid, done) => {
        if (valid) {
          this.formDefineId=this.paramVOS.form;
          if (this.paramVOS.savebeforeevent) {
            var urlobj = parseEventByUrl(this.paramVOS.savebeforeevent,null,null,'doAction');
            import(`./${urlobj.jsPath}.js`).then(module => {
              module[urlobj.methodName]({
                paramVOS: this.paramVOS,
                dataStore: this.dataStore,
                sourceData:this.sourceData
              },that.formSaveHandle);
            })
          } else {
            that.formSaveHandle();
          }
        } else {
          return false;
        }
      });
    },
    formSaveHandle(){
      let that=this;
      let formValues = this.getValues();
      if(formValues.otherValue.releaseFileOids){
        formValues.otherValue.releaseFileOids=formValues.otherValue.releaseFileOids.split(',');
      }
      if (!formValues.defaultValues.btmname) {
        formValues.defaultValues.btmname = this.paramVOS.type;
      }
      let datas = {
        formDefineId: this.formDefineId,
        upVersion:paramVOS.upversion,
        preEvent: this.paramVOS.preevent,
        afterEvent: this.paramVOS.afterevent,
        beforeServerEvent: this.paramVOS.beforeserverevent,
        afterServerEvent: this.paramVOS.afterserverevent,
        releaseFileOids: formValues.otherValue.releaseFileOids||[],
        data: formValues.otherValue
      }
      Object.assign(datas, formValues.defaultValues);
      datas['copyfromversion']=formValues.defaultValues.oid;
      datas.oid=undefined;
      upRevision(datas,that.paramVOS.url,that.paramVOS.method).then(() => {
        that.$message({
          type: "success",
          message: that.paramVOS.successmsg||"升版成功!"
        });
        if(that.saveCallback){
          that.saveCallback(that.form);
        }
        if (this.paramVOS.saveafterevent) {
          let urlobj = parseEventByUrl(this.paramVOS.saveafterevent,null,null,'doAction');
          import(`./${urlobj.jsPath}.js`).then(module => {
            module[urlobj.methodName]({
              paramVOS: this.paramVOS,
              dataStore: this.dataStore,
              sourceData:this.sourceData
            });
          })
        }
        that.dialogClose();
      });
    },
    getValues(){
      let defaultValues = {}, otherValue = {};
      for (var key in this.form) {
        if (this.btmDefaultKeys.indexOf(key.toLowerCase()) > -1) {
          defaultValues[key] = this.form[key];
        } else {
          otherValue[key] = this.form[key];
        }
      }
      return {
        defaultValues:defaultValues,
        otherValue:otherValue
      }
    },
    resetValue() {
      if (this.paramVOS.form) {
        this.$refs.formRef.resetFields();
      }
    },
    getFormData(form) {
      this.form = form;
    }
  }
}
</script>
<style scoped>
</style>
Source/ProjectWeb/src/components/actions/base/RevisionAction.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,102 @@
/**
 * æŒ‰é’®å¤„理 ä¸šåŠ¡ç±»åž‹å‡çº§ç‰ˆæœ¬
 */
import {paramLow,callPreEvent,callPostEvent} from './BaseAction';
import {validatenull} from "@/util/validate";
import Vue from "vue";
import RevisionDialog from "@/components/actions/RevisionDialog";
export const doAction = (options,callback) => {
  const paramVOS = Object.assign({
    getdataurl: '/api/uiDataController/dataFormQuery',
    getdatamethod: 'post',
    url: '/api/uiDataController/upRevision',
    method: 'put',
    uploadfileurl: 'vciFileUploadController/uploadFile'
  }, options.paramVOS)
  options.paramVOS = paramVOS;
  options.sourceData = options.sourceData || {};
  options.dataStore = options.dataStore || [];
  if (!options.dataStore || options.dataStore.length < 1) {
    Vue.prototype.$message.error("请选择需要升版的数据");
    return false;
  }
  if (!paramVOS.multi && options.dataStore.length > 1) {
    Vue.prototype.$message.error("仅能选择一条数据来操作");
    return false;
  }
  if(!validatenull(paramVOS.checknotedit)) {
    let notedit = paramVOS.checknotedit.split('&');
    let checknotedit=false;
    notedit.forEach((item,i)=>{
      if (options.dataStore[0][item.split('=')[0]] == item.split('=')[1]) {
        checknotedit=true;
        return false;
      }
    })
    if (checknotedit) {
      Vue.prototype.$message.error(replaceFreeMarker(paramVOS.checknoteditmsg,options.dataStore,{}) || "当前数据不允许升版");
      return false;
    }
  }
  callPreEvent(options, doBefore, function (options) {
    doRev(options, function (formData) {
      callPostEvent(options, doAfter,'rev', callback);
    });
  });
};
/**
 * æ‰§è¡Œ
 * @param options æŒ‰é’®çš„配置信息
 * @param callback å›žè°ƒ
 */
export const doRev = (options,callback)=> {
  const paramVOS = options.paramVOS;
  if (!paramVOS['form'] && !paramVOS['context']) {
    Vue.prototype.$message.error("按钮配置不正确");
    return false;
  }
  const dialogConstructor = Vue.extend(RevisionDialog);
  let instance = new dialogConstructor();
  instance.sourceData = options.sourceData;
  instance.dataStore = options.dataStore;
  instance.paramVOS = paramVOS;
  instance.dialogClose = function () {
    vm.visible = false;
    document.body.removeChild(vm.$el);
    instance.$destroy();
    instance = null;
  };
  if (callback) {
    instance.saveCallback = callback;
  }
  let vm = instance.$mount();
  document.body.appendChild(vm.$el);
  instance.visible = true;
}
/**
 * å‰ç½®äº‹ä»¶
 * @param options æŒ‰é’®çš„配置信息
 * @param callback å›žè°ƒ
 */
export const doBefore = (options,callback)=> {
  console.log('执行升版前置事件');
  if(callback){
    callback(options);
  }
}
/**
 * åŽç½®äº‹ä»¶
 * @param options æŒ‰é’®çš„配置信息
 * @param callback å›žè°ƒ
 */
export const doAfter = (options,callback,actionType)=> {
  console.log('执行升版后置事件');
  if(callback){
    callback(actionType);
  }
}
Source/ProjectWeb/src/components/actions/handlers.js
@@ -18,10 +18,15 @@
    //删除
    delete: () =>  {import("@/components/actions/base/DeleteAction").then(module => {
      module.doAction(options,callback);
    })},  //删除
    })},
    //删除
    del: () =>  {import("@/components/actions/base/DeleteAction").then(module => {
      module.doAction(options,callback);
    })},
    //升版
    rev: () =>  {import("@/components/actions/base/RevisionAction").then(module => {
      module.doAction(options,callback);
    })},
  };
  if (handlers[type]) {
    handlers[type]()
Source/ProjectWeb/src/configDoc/Action.md
@@ -5,34 +5,123 @@
创建业务对象。编号:add,类型:业务类型
参数可在参数列表配置,也可在按钮使用时配置。参数信息:
>* type:创建界面的业务类型,必填
>* type:必填,创建界面的业务类型
>* form:添加的表单对象,必须要配置form或者context,优先使用form
>* context:创建界面的UI上下文,有form参数时该值无效。若UI上下文仅配有表单展示,则添加弹窗会默认有保存按钮
>* useDataType:使用UI上下文中的哪个类型数据,值有form、tree、table、TreeTable,不填时默认为form
>* initvalue:表单预设value,非必填。格式示例:rootoid=root.${oid}&rootname=root.${name}&name=${name}、sourceoid=sourceData.${oid}&sourcename=sourceData.${name}&oid=${oid}&name=${name}
>* needselect:是否必须选择数据,与initvalue配合使用。
>* initValue:表单预设value,非必填。格式示例:rootoid=root.${oid}&rootname=root.${name}&name=${name}、sourceoid=sourceData.${oid}&sourcename=sourceData.${name}&oid=${oid}&name=${name}
>* needSelect:是否必须选择数据,与initvalue配合使用。
  å€¼ä¸ºfalse时允许initvalue对应的属性值为空。    
  å€¼ä¸ºtrue或者未配置参数则必须有上下文的sourceData或dataStore,用以与initvalue建立映射关系
>* successMsg:添加成功后提示,默认“保存成功”
>* url: åˆ›å»ºç•Œé¢çš„保存按钮请求路径,默认'uiDataController/addSave'
>* method: åˆ›å»ºç•Œé¢çš„保存按钮请求路径类型,默认'post'
>* uploadfileurl: æœ‰æ–‡ä»¶ä¸Šä¼ æ—¶å¯é…ç½®ï¼Œé»˜è®¤'vciFileUploadController/uploadFile'
>* method: åˆ›å»ºç•Œé¢çš„保存按钮请求method,默认'post'
>* uploadFileUrl: æœ‰æ–‡ä»¶ä¸Šä¼ æ—¶å¯é…ç½®ï¼Œé»˜è®¤'vciFileUploadController/uploadFile'
>* accept:有文件上传时可配置
>* exts:有文件上传时可配置
>* uploadattachment:有附件上传时须配置,是否显示上传附件,默认false
>* preevent:弹窗前置事件,配置前置事件的js地址,如"preevent.js"、“xxx/preevent.js”,文件放在src/components/actions下>* preevent:弹窗前置事件,配置前置事件的js地址,如"preevent.js"、“xxx/preevent.js”,文件放在src/components/actions下
>* afterevent:弹窗后置事件,配置后置事件的js地址,如"afterevent.js"、“xxx/afterevent.js”,文件放在src/components/actions下
>*
>* preEvent:弹窗前置事件,配置前置事件的js地址,如"preevent.js"、“xxx/preevent.js”,文件放在src/components/actions下
>* afterEvent:弹窗后置事件,配置后置事件的js地址,如"afterevent.js"、“xxx/afterevent.js”,文件放在src/components/actions下
>* beforeServerEvent:服务端前置事件
>* afterServerEvent:服务端后置事件
>* saveBeforeEvent:执行保存前的前置事件,配置js地址,如"savebeforeevent.js"、“xxx/savebeforeevent.js”,文件放在src/components/actions下
>* saveAfterEvent:保存成功后的前置事件,配置js地址,如"saveAfterEvent.js"、“xxx/saveAfterEvent.js”,文件放在src/components/actions下
### edit,修改
![Action/img_edit.png](Action/img_edit.png)
>* type:修改界面的业务类型,必填
修改业务对象。编号:edit,类型:业务类型
>* type:必填,修改界面的业务类型
>* form:修改的表单对象,必须要配置form或者context,优先使用form
>* context:修改界面的UI上下文,有form参数时该值无效。若UI上下文仅配有表单展示,则修改弹窗会默认有保存按钮
>* useDataType:使用UI上下文中的哪个类型数据,值有form、tree、table、TreeTable,不填时默认为form
>* initvalue:表单预设value,非必填。格式示例:rootoid=root.${oid}&rootname=root.${name}&name=${name}、sourceoid=sourceData.${oid}&sourcename=sourceData.${name}&oid=${oid}&name=${name}
>* needselect:是否必须选择数据,与initvalue配合使用。
>* multi:值为true时可选择多条数据修改
>* initValue:表单预设value,非必填。格式示例:rootoid=root.${oid}&rootname=root.${name}&name=${name}、sourceoid=sourceData.${oid}&sourcename=sourceData.${name}&oid=${oid}&name=${name}
>* needSelect:是否必须选择数据,与initvalue配合使用。
   å€¼ä¸ºfalse时允许initvalue对应的属性值为空。    
   å€¼ä¸ºtrue或者未配置参数则必须有上下文的sourceData或dataStore,用以与initvalue建立映射关系
>* checkNotEdit:检查不允许修改的数据,非必填。格式示例:oid=xxx&name=yyy,解析当修改数据oid为xxx或者name为yyy时,该条数据不允许修改
>* checkNotEditMsg:出现不允许修改数据时的提示,默认“当前数据不允许修改”
>* successMsg:修改成功后提示,默认“修改成功”
>* getDataUrl:获取表单数据,默认“uiDataController/dataFormQuery”
>* getDataMethod:获取表单数据请求的method,默认“post”
>* url: ä¿®æ”¹ç•Œé¢çš„保存按钮请求路径,默认'uiDataController/editSave'
>* method: ä¿®æ”¹ç•Œé¢çš„保存按钮请求method,默认'put'
>* uploadFileUrl: æ–‡ä»¶ä¸Šä¼ åœ°å€ï¼Œé»˜è®¤'vciFileUploadController/uploadFile'
>* accept:有文件上传时可配置
>* exts:有文件上传时可配置
>* uploadattachment:有附件上传时须配置,是否显示上传附件,默认false
>* preEvent:弹窗前置事件,配置前置事件的js地址,如"preevent.js"、“xxx/preevent.js”,文件放在src/components/actions下
>* afterEvent:弹窗后置事件,配置后置事件的js地址,如"afterevent.js"、“xxx/afterevent.js”,文件放在src/components/actions下
>* beforeServerEvent:服务端前置事件
>* afterServerEvent:服务端后置事件
>* saveBeforeEvent:执行保存前的前置事件,配置js地址,如"savebeforeevent.js"、“xxx/savebeforeevent.js”,文件放在src/components/actions下
>* saveAfterEvent:保存成功后的前置事件,配置js地址,如"saveAfterEvent.js"、“xxx/saveAfterEvent.js”,文件放在src/components/actions下
### del,删除
![Action/img_del.png](Action/img_del.png)
删除业务对象。编号:del或者delete,类型:业务类型
>* multi:值为true时可选择多条数据删除
>* checkNotDelete:检查不允许删除的数据,非必填。格式示例:oid=xxx&name=yyy,解析当删除数据oid为xxx或者name为yyy时,该条数据不允许删除
>* checkNotDeleteMsg:出现不允许删除数据时的提示,默认“当前数据不允许删除”
>* cascade: å‰ç«¯éªŒè¯çº§è”删除下级数据
>* adminCascade: æœåŠ¡ç«¯éªŒè¯çº§è”åˆ é™¤ä¸‹çº§æ•°æ®
>* checkLinkedFlag
>* successMsg:删除成功后提示,默认“删除成功”
>* url: åˆ é™¤è¯·æ±‚路径,默认'uiDataController/deleteData'
>* method: åˆ é™¤è¯·æ±‚method,默认'delete'
>
### view,查看
![Action/img_view.png](Action/img_view.png)
查看业务对象。编号:view,类型:业务类型
>* type:必填,查看界面的业务类型
>* form:查看的表单对象,必须要配置form或者context,优先使用form
>* context:查看界面的UI上下文,有form参数时该值无效。
>* multi:值为true时可选择多条数据查看
>* getDataUrl:获取表单数据,默认“uiDataController/dataFormQuery”
>* getDataMethod:获取表单数据请求的method,默认“post”
### rev,升版
![Action/img_rev.png](Action/img_rev.png)
升级版本。编号:rev,类型:业务类型
>* type:必填,升版界面的业务类型
>* form:升版的表单对象,必须要配置form或者context,优先使用form
>* context:升版界面的UI上下文,有form参数时该值无效。若UI上下文仅配有表单展示,则修改弹窗会默认有保存按钮
>* multi:值为true时可选择多条数据升版
>* initValue:表单预设value,非必填。格式示例:rootoid=root.${oid}&rootname=root.${name}&name=${name}、sourceoid=sourceData.${oid}&sourcename=sourceData.${name}&oid=${oid}&name=${name}
>* needSelect:是否必须选择数据,与initvalue配合使用。
   å€¼ä¸ºfalse时允许initvalue对应的属性值为空。
   å€¼ä¸ºtrue或者未配置参数则必须有上下文的sourceData或dataStore,用以与initvalue建立映射关系
>* checkNotEdit:检查不允许升版的数据,非必填。格式示例:oid=xxx&name=yyy,解析当升版数据oid为xxx或者name为yyy时,该条数据不允许升版
>* checkNotEditMsg:出现不允许升版数据时的提示,默认“当前数据不允许升版”
>* upVersion:要升级到的版本。默认按照升版规则升版
>* successMsg:升版成功后提示,默认“升版成功”
>* getDataUrl:获取表单数据,默认“uiDataController/dataFormQuery”
>* getDataMethod:获取表单数据请求的method,默认“post”
>* url: å‡ç‰ˆç•Œé¢çš„保存按钮请求路径,默认'uiDataController/upRevision'
>* method: å‡ç‰ˆç•Œé¢çš„保存按钮请求method,默认'put'
>* uploadFileUrl: æ–‡ä»¶ä¸Šä¼ åœ°å€ï¼Œé»˜è®¤'vciFileUploadController/uploadFile'
>* accept:有文件上传时可配置
>* exts:有文件上传时可配置
>* uploadattachment:有附件上传时须配置,是否显示上传附件,默认false
>* preEvent:弹窗前置事件,配置前置事件的js地址,如"preevent.js"、“xxx/preevent.js”,文件放在src/components/actions下
>* afterEvent:弹窗后置事件,配置后置事件的js地址,如"afterevent.js"、“xxx/afterevent.js”,文件放在src/components/actions下
>* beforeServerEvent:服务端前置事件
>* afterServerEvent:服务端后置事件
>* saveBeforeEvent:执行保存前的前置事件,配置js地址,如"savebeforeevent.js"、“xxx/savebeforeevent.js”,文件放在src/components/actions下
>* saveAfterEvent:保存成功后的前置事件,配置js地址,如"saveAfterEvent.js"、“xxx/saveAfterEvent.js”,文件放在src/components/actions下
## é“¾æŽ¥ç±»åž‹Action
### linkadd
### linkedit
### linkdel
## è‡ªå®šä¹‰Action
Source/ProjectWeb/src/configDoc/Action/img_del.png
Source/ProjectWeb/src/configDoc/Action/img_rev.png
Source/ProjectWeb/src/configDoc/Action/img_view.png
Source/ProjectWeb/src/configDoc/UI.md
@@ -4,14 +4,18 @@
![UI/img.png](UI/img.png)
>1. æ˜¾ç¤ºè¡¨è¾¾å¼é…ç½®æ–¹å¼å¦‚上图
>2. é¡µç­¾é…ç½®å¤šä¸ªæ—¶ï¼Œé¡µé¢ä»¥tab展示
>
### é¡µç­¾ç•Œé¢é…ç½®
选中页签,点击下面的“添加”按钮创建页面
![UI/img_1.png](UI/img_1.png)
>1. è¡¨æ ¼ã€æ ‘表、表单、树配置方式与C/S端一致
>2. è‡ªå®šä¹‰æ¨¡æ¿å¿…须配置控制路径,可配置为UI上下文或自定义组件两种。配置格式“组件name?param=xxx”(自定义组件)或者“?type=xxx&context=yyy&pparam=zzz”(UI引擎),与菜单配置方式一致。
>3. é¡µé¢é…ç½®å¤šä¸ªæ—¶ï¼Œé¡µé¢ä»¥collapse折叠面板展示
>
### æŒ‰é’®é…ç½®
选中页面,点击下面的"按钮设计"按钮创建按钮
![UI/img_2.png](UI/img_2.png)
>1. éœ€å…ˆåˆ›å»ºAction,Action创建方式见Action配置文档
>2. Action有参数时可不配置参数信息。参数信息配置与Action参数配置一致,详见Action配置文档。
>3. æ¯ä¸ªé¡µé¢é»˜è®¤æœ‰â€œåˆ·æ–°"按钮,可不配置
>4. åˆ—表页面默认有”查看“、”导出“按钮,可不配置