ludc
2023-10-31 608ba76865266795b4b43bc7d9c8ab68ac0bb83d
Merge remote-tracking branch 'origin/master'
已修改3个文件
49 ■■■■ 文件已修改
Source/UBCS-WEB/src/components/Master/MasterTree.vue 31 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/components/Theme/ThemeClassifyTreeform.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/views/integration/applicationForm.vue 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/components/Master/MasterTree.vue
@@ -1,8 +1,9 @@
<template>
  <div class="app" style="display: flex;">
    <avue-tree ref="tree" v-model="CloneTreeAvueform" v-loading="loading" :data="Treedata" :defaultExpandAll="false" :option="Treeoption" @node-click="nodeClick" style="width: fit-content;">
    <avue-tree ref="tree" v-model="CloneTreeAvueform" v-loading="loading" :data="Treedata" :defaultExpandAll="false"
               :option="Treeoption" style="width: fit-content;" @node-click="nodeClick">
      <template slot-scope="{ node }">
        <span style="display: inline-block;">{{ node.label }}</span>
        <span v-html="node.label"></span>
      </template>
    </avue-tree>
    <div style="display: inline-block;"><i class="el-icon-refresh refresh-icon" @click="getTreeLists"></i></div>
@@ -63,7 +64,8 @@
              resolve(res.data.map(item => {
                return {
                  ...item,
                  label: item.text
                  label: `<span style="color:#409EFF">${item.count}</span> ${item.text}`,
                  count: item.count
                }
              }))
            })
@@ -75,7 +77,19 @@
  created() {
    this.getTreeLists()
  },
  computed: {},
  mounted() {
  },
  computed: {
    formatCount() {
      return (label) => {
        const countIndex = label.indexOf('</span>') + '</span>'.length;
        const count = label.slice(countIndex);
        const coloredCount = `<span class="count">${count}</span>`;
        return `${label.slice(0, countIndex)}${coloredCount}`;
      };
    },
  },
  methods: {
    //获取数据
    getTreeLists() {
@@ -95,6 +109,12 @@
            this.coderuleoid = firstProperty.attributes.coderuleoid;
            this.$emit("coderuleoid", this.coderuleoid)
            this.$emit('Treedata', this.Treedata)
            this.Treedata.forEach((item, index) => {
              item.label = `<span style="color:#409EFF">${item.count}</span> ${item.label}`;
            });
            this.$emit("coderuleoid", this.coderuleoid)
            this.$emit('Treedata', this.Treedata)
            console.log(this.Treedata)
          }
        }
      }).catch(res => {
@@ -194,6 +214,7 @@
  overflow: auto;
  height: calc(100vh - 150px);
}
 .app::-webkit-scrollbar {
  height: 15px ; // 纵向滚动条 必写
  background: white;
@@ -201,12 +222,14 @@
  width: 10px;
}
// 滚动条的滑块
 .app::-webkit-scrollbar-thumb {
  background-color: #ececec;
  border-radius: 20px;
  border: #ececec;
}
.refresh-icon {
  color: #409EFF;
  margin-top: 8px;
Source/UBCS-WEB/src/components/Theme/ThemeClassifyTreeform.vue
@@ -401,7 +401,7 @@
  watch:{
    TreeFlag:{
      handler(newval,oldval){
        console.log(newval)
        // console.log(newval)
      }
    }
  },
Source/UBCS-WEB/src/views/integration/applicationForm.vue
@@ -124,10 +124,10 @@
                    message: "请至少选择一条数据!"
                })
            } else {
                console.log(this.stateParam)
                // console.log(this.stateParam)
                const response = await queryApplyStat(this.stateParam)
                if (response.status === 200) {
                    console.log(response)
                    // console.log(response)
                }
            }
        },
@@ -135,15 +135,15 @@
            this.loading = true
            const { pageSize, currentPage, total } = this.page
            let param = { size: pageSize, current: currentPage }
            console.log(this.searchParam)
            // console.log(this.searchParam)
            this.searchParam = Object.keys(this.searchParam)
                .filter((key) => this.searchParam[key] !== null && this.searchParam[key] !== undefined && this.searchParam[key] !== "")
                .reduce((acc, key) => ({ ...acc, [key]: this.searchParam[key] }), {});
            console.log(this.searchParam)
            // console.log(this.searchParam)
            const response = await getList({ ...param, ...this.searchParam })
            if (response.status === 200) {
                this.loading = false
                console.log(response)
                // console.log(response)
                const data = response.data.data
                this.data = data.records
                this.page.total = data.total
@@ -160,7 +160,7 @@
            this.getDataList()
        },
        handleSearch(form, done) {
            console.log(form)
            // console.log(form)
            const { id, groupCode, operationType } = form
            let dataTime = { id, groupCode, operationType }
            if (form.hasOwnProperty('createTime')) {
@@ -175,13 +175,13 @@
            done()
        },
        selectionChange(list) {
            console.log(list)
            // console.log(list)
            let newData = list.map(item => {
                const { dataOid } = item
                return dataOid
            })
            this.stateParam = { oids: newData.toString() }
            console.log(newData)
            // console.log(newData)
        },
        handleRowClick(row) {
            this.$refs.crud.toggleRowSelection(row, true)