wangting
2024-12-17 b9686c7739bf131922005e86128ba9232c0313ac
图标管理
已修改8个文件
已添加1个文件
367 ■■■■■ 文件已修改
Source/plt-web/plt-web-ui/src/components/PLT-basic-component/input-icon.vue 42 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-ui/src/components/dynamic-components/dynamic-uiParse.vue 134 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-ui/src/components/dynamic-components/index.vue 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/businessType/index.vue 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/lifeCycle/index.vue 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/statusPool/index.vue 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/versioning/index.vue 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-ui/src/views/modelingMenu/ui/Icons/index.vue 141 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-ui/src/views/systemModel/operateType/index.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-ui/src/components/PLT-basic-component/input-icon.vue
@@ -23,7 +23,7 @@
            {{ item }}
          </el-tag>
        </div>
        <avue-input v-model="searchText" placeholder="查询" size="mini" prefixIcon="el-icon-search" style="width: 300px;max-width: 30%"></avue-input>
        <avue-input v-model="searchText" @change="handleSearch" placeholder="查询" size="mini" prefixIcon="el-icon-search" style="width: 300px;max-width: 30%"></avue-input>
      </div>
      <div style="height: 60vh">
        <el-tabs v-model="activeName" @tab-click="handleTabClick">
@@ -84,6 +84,7 @@
      searchText:'',
      activeName:'',
      svgHtml:'',
      allIconList:[],
      iconList:[]
    }
  },
@@ -100,23 +101,25 @@
    } else {
      this.iconList = getStore({ name:'icons'});
    }
    this.allIconList=this.iconList;
    if(this.iconList && this.iconList.length>0){
      this.activeName=this.iconList[0].label;
    }else {
      getIcons().then(res => {
      /*getIcons().then(res => {
        this.iconList=res.data.data;
        this.allIconList=this.iconList;
        store.dispatch("setIcons", this.iconList);
        if(this.iconList&&this.iconList.length>0) {
          this.activeName=this.iconList[0].label;
        }
      })
      })*/
    }
  },
  methods:{
    dialogClose() {
      this.visible = false;
    },
    handleFocus() {debugger;
    handleFocus() {
      if (!this.disabled) {
        if(this.iconList&&this.iconList.length>0) {
          this.activeName=this.iconList[0].label;
@@ -126,16 +129,18 @@
          } else {
            this.iconList = getStore({ name:'icons'});
          }
          this.allIconList=this.iconList;
          if(this.iconList && this.iconList.length>0){
            this.activeName=this.iconList[0].label;
          }else {
            getIcons().then(res => {
            /*getIcons().then(res => {
              this.iconList=res.data.data;
                 this.allIconList=this.iconList;
              store.dispatch("setIcons", this.iconList);
              if(this.iconList&&this.iconList.length>0) {
                this.activeName=this.iconList[0].label;
              }
            })
            })*/
          }
        }
        this.visible = true;
@@ -148,10 +153,35 @@
      }else {
        this.checkedTypes.push(type)
      }
      //按照分类过滤图标
      if(this.checkedTypes.length==0){
        this.iconList=this.allIconList
      }else{
        this.iconList=this.allIconList.filter(item=> {
          return this.checkedTypes.includes(item.type);
        })
      }
      this.activeName=this.iconList[0].label;
    },
    handleTabClick(tab, event){
    },
    handleSearch(data){
      if(data.value==''){
        this.iconList=this.allIconList;
      }
      let iconList=[]
      this.allIconList.forEach(item=> {
        iconList.push({
          label:item.label,
          type:item.type,
          list: item.list.filter(iconItem=>{
            return iconItem.name.replace(item.label,'').indexOf(data.value)!=-1;
          })
        })
      })
      this.iconList=iconList;
    },
    clearValue(){
      this.svgHtml='';
      this.$emit('input','')
Source/plt-web/plt-web-ui/src/components/dynamic-components/dynamic-uiParse.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,134 @@
<template>
  <div class="UI-dynamic" :id="'UI-dynamic-'+areasName+componentVO.oid">
    <u-i-content-viewer-in-dialog
      :btmType="btmType"
      :context="context"
      :inDialog="true"
      :key="areasName+'customCom-'+componentVO.oid"
      :componentVO="componentVO"
      :sourceData="sourceData"
      :dataStore="dataStore"
      :areasName="areasName"
      :paramVOS="urlParams"
      @setData="setData"
      @setDataStore="setDataStore">
    </u-i-content-viewer-in-dialog>
  </div>
</template>
<script>
import {queryStringToObject} from '@/util/util'
import UIContentViewerInDialog from "@/views/base/UIContentViewerInDialog";
export default {
  name: "dynamic-uiParse",
  components: {UIContentViewerInDialog},
  props: {
    //ui上下文的业务类型(或链接类型)
    uiBtmType: {
      type: String
    },
    //ui上下文
    uiContext:{
      type: String
    },
    componentVO: {
      type: Object,
      default: {}
    },
    inDialog: {
      type: Boolean,
      default: false
    },
    canEdit:{
      //内容是否可编辑
      type:Boolean,
      default:false
    },
    areasName: {
      type: String,
      default: ''
    },
    sourceData: {
      //所属区域的上一区域选中数据
      type: Object,
      default: {}
    },
    dataStore: {
      //弹窗时按钮所属区域选中数据
      type: Array,
      default: []
    },
    paramVOS: {
      type: Object,
      default: {}
    },
    isShow: {
      //所在区域是否已显示,针对tab和collapse
      type: Boolean,
      default: true
    },
  },
  data() {
    return {
      btmType: '',
      context: '',
      urlParams: {},
      height: '300px',
      uiParseClass: '', //?type=xxx&context=yyy&param=zzz
      isError: false, //路径解析失败
      ComponentUrl:'base/UIContentViewerInDialog',
      currentComponent: null
    }
  },
  watch: {
    sourceData:{
      handler(newval) {
        //源数据有变化时变更当前区域数据
        this.sourceDataMap();
      },
      deep: true,
      immediate: true
    }
  },
  computed: {},
  created() {
    this.sourceDataMap();
  },
  mounted() {
    //this.getHeight(this.$parent);
  },
  methods: {
    sourceDataMap: function () {
      this.uiParseClass=this.componentVO.uiParseClass;
      let urlParams = {};
      // å¦‚果路径中存在 '?'
      if (this.uiParseClass.includes('?')) {
        urlParams = queryStringToObject(this.customClass);
      }
      this.btmType = urlParams.type;
      this.context = urlParams.context;
      this.urlParams = Object.assign({},this.paramVOS, urlParams)
    },
    getHeight(el) {
      if (el.$el.clientHeight > 50) {
        this.height = el.$el.clientHeight + 'px';
      } else {
        this.getHeight(el.$parent);
      }
    },
    setDataStore(value) {
      this.$emit("setDataStore", value);
      this.dataStore = value.dataStore;
    },
    setData(value) {
      this.$emit("setData", value);
    }
  }
}
</script>
<style scoped lang="scss">
</style>
Source/plt-web/plt-web-ui/src/components/dynamic-components/index.vue
@@ -70,6 +70,23 @@
                  :isShow="isShow">
  </dynamic-custom>
  <dynamic-ui-parse v-else-if="componentVO.uiComponentType=='uiParse'"
                    :uiBtmType="uiBtmType"
                    :uiContext="uiContext"
                    :inDialog="inDialog"
                    :canEdit="canEdit"
                    :actionType="actionType"
                    :key="areasName+'uiParse-'+componentVO.oid"
                    :componentVO="componentVO"
                    :sourceData="sourceData"
                    :sourceBtmType="sourceBtmType"
                    :dataStore="dataStore"
                    :areasName="areasName"
                    :paramVOS="paramVOS"
                    @setData="setData"
                    @setDataStore="setDataStore"
                    :isShow="isShow">
  </dynamic-ui-parse>
</template>
<script>
@@ -77,9 +94,10 @@
import dynamicForm from "@/components/dynamic-components/dynamic-form"
import dynamicTree from "@/components/dynamic-components/dynamic-tree"
import dynamicCustom from "@/components/dynamic-components/dynamic-custom"
import DynamicUiParse from "@/components/dynamic-components/dynamic-uiParse";
export default {
  name: "dynamicIndex",
  components:{dynamicCustom, dynamicTree, dynamicForm, dynamicTable  },
  components:{DynamicUiParse, dynamicCustom, dynamicTree, dynamicForm, dynamicTable  },
  props:{
    //ui上下文的业务类型(或链接类型)
    uiBtmType: {
Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/businessType/index.vue
@@ -56,10 +56,7 @@
                  å›¾æ ‡
                </template>
                <span class="avue-icon avue-icon--small" style="display: block">
                  <svg v-if="nodeRow.imageName && nodeRow.imageName.indexOf('#')==0" aria-hidden="true">
                    <use :xlink:href="nodeRow.imageName"></use>
                  </svg>
                  <i v-else :class="nodeRow.imageName"></i>
                  <span v-html="svgHtml(nodeRow.imageName )"></span>
                </span>
              </el-descriptions-item>
              <el-descriptions-item :span="12" :contentStyle="descriptionOption.contentStyle"
@@ -832,6 +829,9 @@
    }
  },
  methods: {
    svgHtml(svgName){
      return func.getSVGByName(svgName);
    },
    //树表查询
    getTreeList() {
      this.treeLoading = true;
Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/lifeCycle/index.vue
@@ -328,7 +328,6 @@
        this.checkViewData = this.checkViewDataSearch;
        return done();
      }
      ;
      this.checkViewData = this.checkViewData.filter(item => {
        return item.source && item.source.includes(source);
Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/statusPool/index.vue
@@ -33,12 +33,7 @@
      </template>
      <template #icon="{ row }">
          <span class="avue-icon avue-icon--small" style="display: block">
            <svg v-if="row.imagePath && row.imagePath.indexOf('#')==0" aria-hidden="true">
              <use :xlink:href="row.imagePath"></use>
            </svg>
            <i v-else :class="row.imagePath"></i>
          </span>
        <span v-html="svgHtml(row.imagePath )"></span>
      </template>
    </avue-crud>
@@ -66,8 +61,8 @@
          </el-col>
          <el-col :span="24">
            <el-form-item label="图标:" prop="imagePath">
              <avue-input-icon v-model="form.imagePath" :icon-list="iconList" placeholder="请选择图标">
              </avue-input-icon>
              <input-icon v-model="form.imagePath" placeholder="请选择图标">
              </input-icon>
            </el-form-item>
          </el-col>
          <el-col :span="24">
@@ -78,8 +73,8 @@
        </el-row>
      </el-form>
      <span slot="footer" class="dialog-footer">
         <el-button type="primary" @click="addSaveHandler">ç¡® å®š</el-button>
         <el-button @click="visibleCloseHandler">取 æ¶ˆ</el-button>
         <el-button size="small" type="primary" @click="addSaveHandler">ç¡® å®š</el-button>
         <el-button size="small" @click="visibleCloseHandler">取 æ¶ˆ</el-button>
        </span>
    </el-dialog>
@@ -224,6 +219,9 @@
    this.getList();
  },
  methods: {
    svgHtml(svgName){
      return func.getSVGByName(svgName);
    },
    getList() {
      gridStatus(this.page.currentPage, this.page.pageSize).then(res => {
        const data = res.data.data;
Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/versioning/index.vue
@@ -431,7 +431,6 @@
        this.checkViewData = this.checkViewDataSearch;
        return done();
      }
      ;
      this.checkViewData = this.checkViewDataSearch.filter(item => {
        return item.source && item.source.includes(source);
Source/plt-web/plt-web-ui/src/views/modelingMenu/ui/Icons/index.vue
@@ -13,10 +13,12 @@
              {{ item }}
            </el-tag>
          </div>
          <avue-input v-model="form" placeholder="查询" size="mini" prefixIcon="el-icon-search" style="width: 300px;max-width: 30%"></avue-input>
          <avue-input v-model="searchText" @change="handleSearch" placeholder="查询" size="mini" prefixIcon="el-icon-search" style="width: 300px;max-width: 30%"></avue-input>
        </div>
        <div style="height: calc(100vh - 190px)">
          <input-icon v-model="iconValue"></input-icon>
          <div>
            <el-button icon="el-icon-upload" type="primary" size="mini" @click="uploadHandler">上传</el-button>
          </div>
          <el-tabs v-model="activeName" @tab-click="handleClick">
            <el-tab-pane v-for="item in iconList" :label="item.label" :name="item.label">
              <div class="iconList">
@@ -28,6 +30,22 @@
            </el-tab-pane>
          </el-tabs>
        </div>
        <!-- ä¸Šä¼  -->
        <el-dialog
          v-dialogDrag
          title="图标上传"
          :visible.sync="visible"
          append-to-body="true"
          class="avue-dialog"
          width="500px"
          @close="visibleCloseHandler"
        >
          <avue-form ref="form" :option="option" v-model="form"> </avue-form>
          <span slot="footer" class="dialog-footer">
           <el-button size="small" type="primary" @click="uploadSaveHandler">ç¡® å®š</el-button>
           <el-button size="small" @click="visibleCloseHandler">取 æ¶ˆ</el-button>
          </span>
        </el-dialog>
      </basic-container>
    </el-main>
  </el-container>
@@ -38,6 +56,8 @@
import {validatenull} from "@/util/validate";
import {getStore} from "@/util/store";
import store from "@/store";
import {addSave, editSave} from "@/api/modeling/statusPool/api";
import {getToken} from "@/util/auth";
export default {
name: "index",
@@ -45,18 +65,71 @@
    return {
      types: ['标签一' , '标签二' ,  '标签三' , '标签四','标签五'  ],
      checkedTypes:[],
      form:'',
      searchText:'',
      activeName:'',
      iconValue:'iconoir2:adobe-illustrator',
      iconList:[]
      allIconList:[],
      iconList:[],
      visible: false,
      option: {
        labelWidth: 80,
        submitBtn:false,
        emptyBtn:false,
        column: [{
          label: '分类',
          prop: 'type',
          type: 'select',
          span: 24,
          multiple:true,
          dicData:[{
            label:'标签一',
            value:0
          },{
            label:'标签二',
            value:1
          },{
            label:'标签三',
            value:2
          }]
        }, {
            label: "附件上传",
            prop: "file",
            dataType: "object",
            type: "upload",
            accept:'.json',
            data:{},
            headers:this.uploadHeaders,
            propsHttp: {
              res: "data",
            },
            span: 24,
            action: "",
          }
        ]
      },
      form:{
        type:[]
      }
    }
  },
  created() {debugger;
  computed: {
    uploadHeaders() {
      return {
        "Authorizationtoken":getToken(),
      };
    },
  },
  created() {
    this.initList();
  },
  methods:{
    initList(){
    if (!validatenull(this.$store.state.icons)) {
      this.iconList = this.$store.state.icons;
    } else {
      this.iconList = getStore({ name:'icons'});
    }
      this.allIconList=this.iconList;
    if(this.iconList && this.iconList.length>0){
      this.activeName=this.iconList[0].label;
    }else {
@@ -161,6 +234,7 @@
              "svg": "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"1em\" height=\"1em\" viewBox=\"0 0 24 24\"><g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-miterlimit=\"1.5\" stroke-width=\"1.5\"><path d=\"M12 15a3 3 0 1 0 0-6a3 3 0 0 0 0 6\"/><path d=\"M12 9s-1.988-1.975-2-4c.001-1.993-.05-4.001 2-4c1.948.001 1.997 1.976 2 4c.003 1.985-2 4-2 4m3 3s1.975-1.988 4-2c1.993.001 4.001-.05 4 2c-.001 1.948-1.976 1.997-4 2c-1.985.003-4-2-4-2m-6 0s-1.975 1.988-4 2c-1.993-.001-4.001.05-4-2c.001-1.948 1.976-1.997 4-2c1.985-.003 4 2 4 2m3 3s1.988 1.975 2 4c-.001 1.993.05 4.001-2 4c-1.948-.001-1.997-1.976-2-4c-.003-1.985 2-4 2-4\" clip-rule=\"evenodd\"/></g></svg>"
            }]
        }]
          this.allIconList=this.iconList;
        store.dispatch("setIcons", this.iconList);
        if(this.iconList.length>0) {
          this.activeName=this.iconList[0].label;
@@ -168,17 +242,72 @@
      })
    }
  },
  methods:{
    changeType(type){
      if(this.checkedTypes.includes(type)){
        this.checkedTypes=this.checkedTypes.filter(item=> item!=type)
      }else {
        this.checkedTypes.push(type)
      }
      //按照分类过滤图标
      if(this.checkedTypes.length==0){
        this.iconList=this.allIconList
      }else{
        this.iconList=this.allIconList.filter(item=> {
          return this.checkedTypes.includes(item.type);
        })
      }
      this.activeName=this.iconList[0].label;
    },
    handleSearch(data){
      if(data.value==''){
        this.iconList=this.allIconList;
      }
      let iconList=[]
      this.allIconList.forEach(item=> {
        iconList.push({
          label:item.label,
          type:item.type,
          list: item.list.filter(iconItem=>{
            return iconItem.name.replace(item.label,'').indexOf(data.value)!=-1;
          })
        })
      })
      this.iconList=iconList;
    },
    handleClick(tab, event){
    },
    uploadHandler(){
      this.visible = true;
    },
    // å…³é—­å¯¹è¯æ¡†
    visibleCloseHandler() {
      const form = {}
      this.form = form;
      this.visible = false;
      this.$refs.form.clearValidate();
    },
    // ä¸Šä¼ ä¿å­˜
    uploadSaveHandler() {debugger;
      this.$refs.form.validate((valid,done) => {
        if (valid) {
          done()
          saveFunction(this.form).then(res => {
            if (res.data.code === 200) {
              this.$message.success(res.data.obj);
              this.initList();
              done();
              this.visibleCloseHandler();
            } else {
              this.$message.error(res.data.obj);
    }
          })
        } else {
          return false;
        }
      });
    },
  }
}
</script>
Source/plt-web/plt-web-ui/src/views/systemModel/operateType/index.vue
@@ -224,7 +224,7 @@
        this.$message.error('别名长度不能超过255!');
        return
      }
      ;
      const params = {
        id: this.form.id,
        name: this.form.name,