wangting
2024-05-14 51636e9cd814bddba7a9b4ff21b5bc94e95fb6cb
配置文档
已修改4个文件
已重命名1个文件
已添加8个文件
115 ■■■■ 文件已修改
Source/ProjectWeb/src/components/actions/ViewDialog.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/ProjectWeb/src/components/actions/base/TabViewAction.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/ProjectWeb/src/components/dynamic-components/dynamic-button.vue 34 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/ProjectWeb/src/components/dynamic-components/dynamic-custom.vue 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/ProjectWeb/src/configDoc/UI/img.png 补丁 | 查看 | 原始文档 | blame | 历史
Source/ProjectWeb/src/configDoc/UI/img_1.png 补丁 | 查看 | 原始文档 | blame | 历史
Source/ProjectWeb/src/configDoc/UI/img_2.png 补丁 | 查看 | 原始文档 | blame | 历史
Source/ProjectWeb/src/configDoc/menu.md 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/ProjectWeb/src/configDoc/menu/img.png 补丁 | 查看 | 原始文档 | blame | 历史
Source/ProjectWeb/src/configDoc/menu/img_custom.png 补丁 | 查看 | 原始文档 | blame | 历史
Source/ProjectWeb/src/configDoc/menu/img_ui.png 补丁 | 查看 | 原始文档 | blame | 历史
Source/ProjectWeb/src/router/avue-router.js 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/ProjectWeb/src/views/preview/readMD.vue 42 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/ProjectWeb/src/components/actions/ViewDialog.vue
ÎļþÃû´Ó Source/ProjectWeb/src/components/actions/base/ViewDialog.vue ÐÞ¸Ä
@@ -114,7 +114,7 @@
        this.currentComponent = module.default;
      }).catch((error) => {
        // å¤„理导入失败的情况
        console.error('组件加载失败:', error);
        console.log('组件加载失败:', error);
      });
    },
    dialogClose() {
Source/ProjectWeb/src/components/actions/base/TabViewAction.js
@@ -4,7 +4,7 @@
import {paramLow,callPreEvent,callPostEvent,replaceFreeMarker} from './BaseAction';
import {validatenull} from "@/util/validate";
import Vue from "vue";
import ViewDialog from "@/components/actions/base/ViewDialog";
import ViewDialog from "@/components/actions/ViewDialog";
export const doAction = (options,callback) => {
  const paramVOS = Object.assign({
Source/ProjectWeb/src/components/dynamic-components/dynamic-button.vue
@@ -3,35 +3,35 @@
    <!--表格基础按钮-->
    <div v-if="type === 'table' || type === 'TreeTable'">
      <!--top展示表格上方区域 menu展示表格操作栏区域 æ— å°±æ˜¯é»˜è®¤ -->
      <el-button v-for="item in basicButtonList.top"
                 v-if="LocationType === 'top'"
                 :key="item.oid" :icon="item.paramVOS.icon"
      <el-tooltip v-if="LocationType === 'top'" v-for="item in basicButtonList.top" :content="item.description || item.name" placement="top">
        <el-button :key="item.oid" :icon="item.paramVOS.icon"
                 :type="item.paramVOS.btnType || 'primary'" plain
                 size="small"
                 @click="buttonClick(item)">
        {{ item.name }}
      </el-button>
      </el-tooltip>
      <el-button type="text" @click="handleDefaultAddChildren(scope.row)" v-if="(LocationType === 'menu' && type === 'TreeTable')">新增子级</el-button>
      <el-button type="text" icon="el-icon-view" size="small" plain @click="$emit('rowView',scope.row,scope.index)" v-if="LocationType === 'menu'">查看</el-button>
      <el-button v-for="item in basicButtonList.menu"
                 v-if="LocationType === 'menu'"
                 :key="item.oid"
      <el-tooltip v-if="LocationType === 'menu'" v-for="item in basicButtonList.menu" :content="item.description || item.name" placement="top">
        <el-button :key="item.oid"
                 :icon="item.paramVOS.icon ? item.paramVOS.icon : (item.id === 'edit' ? 'el-icon-edit' : (item.id === 'delete'  ||item.id === 'del' ? 'el-icon-delete' : ''))"
                 :type="item.paramVOS.btnType || 'text'" plain
                 size="small"
                 @click="buttonClick(item,scope.row)">
        {{ item.name }}
      </el-button>
      </el-tooltip>
      <!-- è¡¨æ ¼å†…按钮操作对话框表单   -->
      <dynamic-table-form ref="dynamicForm" :formList="formList" :title="formName" :visible.sync="visible"
                          style="display: none"></dynamic-table-form>
    </div>
    <div v-else-if="type === 'form'">
      <el-button v-for="item in basicButtonList"
                 :key="item.oid"
      <el-tooltip v-for="item in basicButtonList" :content="item.description || item.name" placement="top">
        <el-button :key="item.oid"
                 :icon="item.paramVOS.icon"
                 :type="item.paramVOS.btnType || 'primary'"
                 plain
@@ -39,10 +39,11 @@
                 @click="buttonClick(item)">
        {{ item.name }}
      </el-button>
      </el-tooltip>
    </div>
    <div v-else-if="type === 'tree'" class="tree-buttons">
      <el-button v-for="item in basicButtonList"
                 :key="item.oid"
      <el-tooltip v-for="item in basicButtonList" :content="item.description || item.name" placement="top">
        <el-button :key="item.oid"
                 :icon="item.paramVOS.icon"
                 :type="item.paramVOS.btnType || 'primary'"
                 plain
@@ -50,6 +51,7 @@
                 @click="buttonClick(item)">
        {{ item.name }}
      </el-button>
      </el-tooltip>
      <el-button type="primary"
                 plain
                 size="small"
@@ -111,8 +113,16 @@
        return []; // å¦‚æžœ basicColumn æœªå®šä¹‰æˆ–者不是数组,返回空数组
      }
      if (this.type === 'form' || this.type === 'tree') {
      if (this.type === 'form') {
        return basicColumn;
      }else if (this.type === 'tree') {
        const treeBtn = basicColumn.filter(item => {
          if (item.id != "refresh") {
            return true;
          }
          return false
        });
        return treeBtn;
      } else if (this.type === 'table' || this.type === 'TreeTable') {
        const top = basicColumn.filter(item => {
          if (item.paramVOS && item.paramVOS.showLocation && item.paramVOS.showLocation !== 'menu') {
Source/ProjectWeb/src/components/dynamic-components/dynamic-custom.vue
@@ -112,11 +112,12 @@
    } else {
      this.ComponentUrl = this.customClass; // ä¸å­˜åœ¨ '?' æ•´æ¡è·¯å¾„就是 parts
    }
    if(validatenull(this.ComponentUrl) || ['UI', 'ui'].includes(this.ComponentUrl)){
      this.ComponentUrl='base/UIContentViewerInDialog';
    }else {
      this.ComponentUrl='custom-ui/'+this.ComponentUrl;
    if(validatenull(this.ComponentUrl) || ['ui', 'UI', 'base','bs'].includes(this.ComponentUrl)){
      this.ComponentUrl='views/base/UIContentViewerInDialog';
    }else if(this.ComponentUrl.indexOf('views/')===-1){
      this.ComponentUrl='views/custom-ui/'+this.ComponentUrl;
    }
    if (this.ComponentUrl=='base/UIContentViewerInDialog' && (!urlParams.type || !urlParams.context)) {
      this.isError = true;
      return;
@@ -133,7 +134,7 @@
  methods: {
    loadCompoent(){
      // åŠ¨æ€å¯¼å…¥ç»„ä»¶
      import(`@/views/${this.ComponentUrl}.vue`).then((module) => {
      import(`@/${this.ComponentUrl}.vue`).then((module) => {
        // æˆåŠŸå¯¼å…¥åŽï¼Œå°†ç»„ä»¶æ³¨å†Œåˆ°Vue实例中
        this.currentComponent = module.default;
      }).catch((error) => {
Source/ProjectWeb/src/configDoc/UI/img.png
Source/ProjectWeb/src/configDoc/UI/img_1.png
Source/ProjectWeb/src/configDoc/UI/img_2.png
Source/ProjectWeb/src/configDoc/menu.md
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,13 @@
系统模块配置 > ä¸šåŠ¡åŠŸèƒ½æ¨¡å—,展示在B/S端的页面需配置"B/S"项内容
### çˆ¶èœå•配置
![menu/img.png](menu/img.png)
> å€¼ä¸èƒ½ä¸ºç©ºï¼Œå¯ä¸ºä»»æ„è‹±æ–‡å­—符
### é…ç½®UI引擎菜单
![menu/img_ui.png](menu/img_ui.png)
>1. â€œ?”前不设置值
>2. â€œ?”后为参数,必须包含type和context参数,可与".NET"一致
>3. å¦‚æžœcontext对应的UI第一个区域为树,则还必须有querytemplate参数,值为树对应的查询模板
### é…ç½®è‡ªå®šä¹‰ç»„件菜单
![menu/img_custom.png](menu/img_custom.png)
>1. ç›´æŽ¥é…ç½®æ–‡ä»¶åï¼Œå¯¹åº”文件在src/views/custom-ui内。可配置参数在?后,参数值在组件中通过$route.query获取
>2. é…ç½®åŠ è·¯å¾„views,如配置成:“views/custom-ui/test”或者“views/xxx”
Source/ProjectWeb/src/configDoc/menu/img.png
Source/ProjectWeb/src/configDoc/menu/img_custom.png
Source/ProjectWeb/src/configDoc/menu/img_ui.png
Source/ProjectWeb/src/router/avue-router.js
@@ -137,14 +137,15 @@
          parts='UI';
        }
        // å¦‚果问号前面部分不在 ['ui', 'UI', 'base'] ä¸­ï¼Œåˆ™æ˜¯è‡ªå®šä¹‰ç»„ä»¶
        if (!['ui', 'UI', 'base','bs'].includes(parts)) {
        if (!['ui', 'UI', 'base','bs'].includes(parts) && parts.indexOf('views/')==-1) {
          component = `views/custom-ui/${parts}`;
        }else if (['UI', 'ui', 'base','bs'].includes(parts)) {
          // å¦‚果问号前面等于 UI、ui åˆ™ä¸ºUI引擎
          component = 'views/base/UIContentViewer';
        }else{
          component = `${parts}`;
        }
        // å¦‚果问号前面等于 UI、ui åˆ™ä¸ºUI引擎
        if (['UI', 'ui'].includes(parts)) {
          component = 'views/base/UIContentViewer';
        }
        let name = oMenu[propsDefault.label],
          icon = oMenu[propsDefault.icon],
          children = oMenu[propsDefault.children],
Source/ProjectWeb/src/views/preview/readMD.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,42 @@
<template>
  <div class="md-content">
    <mark-down-it-vue class="md-body" :content="htmlMD"></mark-down-it-vue>
  </div>
</template>
<script>
import MarkDownItVue from "markdown-it-vue"
import "markdown-it-vue/dist/markdown-it-vue.css"
import {verifyNull} from "@/util/validate";
export default {
  name: "readMD",
  components: {MarkDownItVue},
  data() {
    return {
      htmlMD: "",
      type:''
    }
  },
  created() {
    if (verifyNull(this.$route.query.type)) {
      this.$message.error("配置的信息错误,请配置type参数");
      return false;
    }
    this.type=this.$route.query.type;
    axios.get(`./src/configDoc/${this.type}.md`).then((response) => {
      this.htmlMD = response.data;
    });
    /*require(`@/configDoc/${this.type}.md`).then((markdown) => {
      debugger;
      this.htmlMD = markdown;
    }).catch((error) => {
      console.log('配置文档读取失败:', error);
    });*/
  }
}
</script>
<style scoped>
</style>