wangting
2024-04-29 208548501db7256ab364f904196f614c4f1a0b40
添加action
已修改9个文件
127 ■■■■ 文件已修改
Source/ProjectWeb/src/components/actions/AddEditDialog.vue 33 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/ProjectWeb/src/components/dynamic-components/dynamic-button.vue 46 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/ProjectWeb/src/components/dynamic-components/dynamic-custom.vue 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/ProjectWeb/src/components/dynamic-components/dynamic-form.vue 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/ProjectWeb/src/components/dynamic-components/dynamic-table.vue 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/ProjectWeb/src/components/dynamic-components/dynamic-tree.vue 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/ProjectWeb/src/components/dynamic-components/index.vue 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/ProjectWeb/src/views/base/UIContentArea.vue 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/ProjectWeb/src/views/base/UIContentViewerInDialog.vue 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/ProjectWeb/src/components/actions/AddEditDialog.vue
@@ -12,19 +12,23 @@
    <basic-form ref="formRef" v-if="paramVOS.form"
                :key="'dialog-'+paramVOS.form"
                :span="span"
                :style="fullscreen?'':'height:'+height"
                :isEdit="true"
                :formItems="formItems"
                :formData="form">
    </basic-form>
    <ui-view ref="uiViewRef" v-else-if="paramVOS.context"
             :key="'AddEditDialog-'+type"
             :style="fullscreen?'':'height:'+height"
             :btmType="paramVOS.type"
             :context="paramVOS.context"
             :inDialog="true"
             :canEdit="true"
             :sourceData="sourceData"
             :dataStore="dataStore"
             :paramVOS="paramVOS"
    ></ui-view>
    <div class="dialog-footer avue-dialog__footer">
    <div v-if="showSave" class="dialog-footer avue-dialog__footer">
      <el-button type="primary" plain size="small" @click="saveHandler">保 存</el-button>
      <el-button size="small" @click="dialogClose">取 消</el-button>
      <el-button size="small" @click="resetValue" v-if="paramVOS.form">重 置</el-button>
@@ -36,6 +40,7 @@
import uiView from "@/views/base/UIContentViewerInDialog"
import {getFormDefineById,dataForm} from "@/api/base/ui";
import {addSave,editSave} from "@/api/base/actions"
import {validatenull} from "@/util/validate"
export default {
  name: "AddEditDialog",
@@ -60,6 +65,7 @@
    return {
      type:"add",
      visible:false,
      showSave:this.paramVOS.customBtn || true,
      span:12,
      formItems:[],
      form:{}
@@ -69,11 +75,27 @@
    title(){
      return this.paramVOS.title || (this.type=='add'?'添加':'修改')
    },
    width(){
      return this.paramVOS.width || "60%"
    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(){
      return this.paramVOS.height || "500px"
      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){
@@ -81,7 +103,7 @@
      }else if(this.paramVOS.form){
        return false;
      }
      return false;
      return true;
    }
  },
  created() {
@@ -139,6 +161,7 @@
        });
      }else{
        //this.$refs.uiViewRef.
        debugger;
        if(this.saveCallback){
          this.saveCallback({});
        }
Source/ProjectWeb/src/components/dynamic-components/dynamic-button.vue
@@ -134,7 +134,7 @@
      const paramVOS=buttonitem.paramVOS;
      const DefineVO = this.componentVO.treeDefineVO || this.componentVO.tableDefineVO || this.componentVO.treeTableDefineVO || this.componentVO.formDefineVO;
      if (!paramVOS['title']) {
        paramVOS['title'] = buttonitem.name + (DefineVO.title || DefineVO.componentTitle || '');
        paramVOS['title'] = buttonitem.name + (DefineVO.title || this.componentVO.description || '');
      }
      if (!paramVOS['type']) {
@@ -146,29 +146,33 @@
        let values = paramVOS['initvalue'].split(';');
        let initValues = {}
        values.forEach((item,i) => {
          item = item.replace(':', '=');
          if (item.indexOf('${') > -1) {
            if (item.split('=')[1].indexOf('.') > -1) {
              if (this.sourceData.length < 1 || !this.sourceData.oid) {
                isShow = false;
                this.$message.error("请先选择一条来源数据");
                return false;
              }
              let name = item.split('=')[1].split('.')[1].replace('${', '').replace('}', '');
              initValues[item.split('=')[0]] = this.sourceData[name]
            } else {
              if (this.dataStore.length < 1) {
                isShow = false;
                this.$message.error("请先选择一条数据");
                return false;
              }
              let name = item.split('=')[1].replace('${', '').replace('}', '');
              initValues[item.split('=')[0]] = this.dataStore[0][name];
          if(isShow){
            item = item.replace(':', '=');
            if (item.indexOf('${') > -1) {
              if (item.split('=')[1].indexOf('.') > -1) {
                if (this.sourceData.length < 1 || !this.sourceData.oid) {
                  isShow = false;
                  this.$message.error("请先选择一条来源数据")
                  return false;
                }
                let name = item.split('=')[1].split('.')[1].replace('${', '').replace('}', '');
                initValues[item.split('=')[0]] = this.sourceData[name]
              } else {
                if (this.dataStore.length < 1) {
                  isShow = false;
                  this.$message.error("请先选择一条数据");
                  return false;
                }
                let name = item.split('=')[1].replace('${', '').replace('}', '');
                initValues[item.split('=')[0]] = this.dataStore[0][name];
              }
            }
          }
        })
        paramVOS['initvalue'] = initValues
        if(isShow){
          paramVOS['initvalue'] = initValues
        }
      }
      if(paramVOS['BSContent'] || paramVOS['BSContext']){
        paramVOS['context']=paramVOS['BSContext'] || paramVOS['BSContent']
@@ -177,6 +181,8 @@
      const that=this;
      if(isShow) {
        //paramVOS.customBtn //弹窗默认有保存按钮,customBtn为true时内容展示自定义按钮
        //paramVOS.form="editknowledgefolderall"
        doAction(buttonitem, {
          paramVOS: paramVOS,
          dataStore: this.dataStore || [],
Source/ProjectWeb/src/components/dynamic-components/dynamic-custom.vue
@@ -49,6 +49,11 @@
      type: Boolean,
      default: false
    },
    canEdit:{
      //内容是否可编辑
      type:Boolean,
      default:false
    },
    areasName: {
      type: String,
      default: ''
Source/ProjectWeb/src/components/dynamic-components/dynamic-form.vue
@@ -6,7 +6,7 @@
                :span="this.componentVO.formDefineVO.columnOneRow?(24/this.componentVO.formDefineVO.columnOneRow) : 12"
                :formItems="this.componentVO.formDefineVO && this.componentVO.formDefineVO.items"
                :disabled="!inDialog"
                :isEdit="inDialog"
                :isEdit="canEdit"
                :formData="form">
    </basic-form>
  </div>
@@ -34,6 +34,11 @@
      type: Boolean,
      default: false
    },
    canEdit:{
      //内容是否可编辑
      type:Boolean,
      default:false
    },
    areasName: {
      type: String,
      default: ''
Source/ProjectWeb/src/components/dynamic-components/dynamic-table.vue
@@ -54,6 +54,11 @@
      type: Boolean,
      default: false
    },
    canEdit:{
      //内容是否可编辑
      type:Boolean,
      default:false
    },
    areasName: {
      type: String,
      default: ''//westArea导航区
Source/ProjectWeb/src/components/dynamic-components/dynamic-tree.vue
@@ -50,6 +50,11 @@
      type: Boolean,
      default: false
    },
    canEdit:{
      //内容是否可编辑
      type:Boolean,
      default:false
    },
    areasName:{
      type:String,
      default:''
Source/ProjectWeb/src/components/dynamic-components/index.vue
@@ -4,6 +4,7 @@
                 :uiContext="uiContext"
                 :key="areasName+'table-'+componentVO.oid"
                 :inDialog="inDialog"
                 :canEdit="canEdit"
                 :componentVO="componentVO"
                 :sourceData="sourceData"
                 :sourceBtmType="sourceBtmType"
@@ -19,6 +20,7 @@
                :uiContext="uiContext"
                :key="areasName+'form-'+componentVO.oid"
                :inDialog="inDialog"
                :canEdit="canEdit"
                :componentVO="componentVO"
                :sourceData="sourceData"
                :sourceBtmType="sourceBtmType"
@@ -34,6 +36,7 @@
                :uiContext="uiContext"
                :key="areasName+'tree-'+componentVO.oid"
                :inDialog="inDialog"
                :canEdit="canEdit"
                :componentVO="componentVO"
                :sourceData="sourceData"
                :sourceBtmType="sourceBtmType"
@@ -47,6 +50,7 @@
                  :uiBtmType="uiBtmType"
                  :uiContext="uiContext"
                  :inDialog="inDialog"
                  :canEdit="canEdit"
                  :key="areasName+'custom-'+componentVO.oid"
                  :componentVO="componentVO"
                  :sourceData="sourceData"
@@ -86,6 +90,11 @@
      type: Boolean,
      default: false
    },
    canEdit:{
      //内容是否可编辑
      type:Boolean,
      default:false
    },
    areasName:{
      type:String,
      default:''
Source/ProjectWeb/src/views/base/UIContentArea.vue
@@ -25,6 +25,7 @@
                          :uiBtmType="uiBtmType"
                          :uiContext="uiContext"
                          :inDialog="inDialog"
                          :canEdit="canEdit"
                          :componentVO="areaItem.componentVOs[0]"
                          :sourceData="newSourceData"
                          :sourceBtmType="sourceBtmType"
@@ -47,6 +48,7 @@
                            :uiBtmType="uiBtmType"
                            :uiContext="uiContext"
                            :inDialog="inDialog"
                            :canEdit="canEdit"
                            :componentVO="componentVO"
                            :sourceData="newSourceData"
                            :sourceBtmType="sourceBtmType"
@@ -63,6 +65,7 @@
                        :uiBtmType="uiBtmType"
                        :uiContext="uiContext"
                        :inDialog="inDialog"
                        :canEdit="canEdit"
                        :componentVO="newAreasData[0].componentVOs[0]"
                        :sourceData="newSourceData"
                        :sourceBtmType="sourceBtmType"
@@ -122,6 +125,11 @@
      type: Boolean,
      default: false
    },
    canEdit:{
      //内容是否可编辑
      type:Boolean,
      default:false
    },
    areasName:{
      type:String,
      default:''
Source/ProjectWeb/src/views/base/UIContentViewerInDialog.vue
@@ -9,6 +9,7 @@
                     :dataStore="checkedData.northAreaInDialog.data"
                     :paramVOS="paramVOS"
                     :inDialog="inDialog"
                     :canEdit="canEdit"
                     :sourceData="sourceData"
                     :sourceBtmType="btmType"
                     areas-name="northArea"
@@ -27,6 +28,7 @@
                       :dataStore="checkedData.westAreaInDialog.data"
                       :paramVOS="paramVOS"
                       :inDialog="inDialog"
                       :canEdit="canEdit"
                       :sourceData="sourceData"
                       :sourceBtmType="btmType"
                       areas-name="westArea"
@@ -43,6 +45,7 @@
                         :dataStore="checkedData.centerAreaInDialog.data"
                         :paramVOS="paramVOS"
                         :inDialog="inDialog"
                         :canEdit="canEdit"
                         :sourceData="checkedData.westAreaInDialog.data[checkedData.westAreaInDialog.data.length-1]"
                         :sourceBtmType="checkedData.westAreaInDialog.DefineVOBtmType"
                         areas-name="centerArea"
@@ -59,6 +62,7 @@
                         :dataStore="checkedData.southAreaInDialog.data"
                         :paramVOS="paramVOS"
                         :inDialog="inDialog"
                         :canEdit="canEdit"
                         :sourceData="checkedData.centerAreaInDialog.data[checkedData.centerAreaInDialog.data.length-1]"
                         :sourceBtmType="checkedData.centerAreaInDialog.DefineVOBtmType"
                         areas-name="southArea"
@@ -90,6 +94,11 @@
      type: Boolean,
      default: false
    },
    canEdit:{
      //内容是否可编辑
      type:Boolean,
      default:false
    },
    sourceData:{
      //所属区域的上一区域选中数据
      type:Object,