杨磊
2024-06-07 a971d0c13ab9cd5107152f6eba5e1e724a37fa0b
Merge branch 'master' of http://182.92.203.7:2001/r/TCM_CharacterLibrary
13个文件已修改
420 ■■■■ 已修改文件
src/api/index.js 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/headNav/headNav.vue 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/TcmSystem/TcmSystem.vue 25 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/character/detail.vue 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/character/index.vue 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/index/index.vue 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/inherit/index.vue 33 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/inherit/list.vue 143 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/knowledgeBase/knowledgeBase.vue 81 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/territory/territory.vue 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/uni_modules/cc-defineTable/components/cc-defineTable/cc-defineTable.vue 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/uni_modules/luanqing-search/components/luanqing-search/luanqing-search.vue 41 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/uni_modules/next-search-more/components/next-search-more/next-search-more.vue 26 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/index.js
@@ -358,3 +358,17 @@
  });
};
export const getInstitutionList = () => {
  return req1({
    url: "/medical/institutionList",
    method: "post"
  });
};
src/components/headNav/headNav.vue
@@ -33,6 +33,7 @@
            width: 2.33rem;
            margin-right: 0.3rem;
            justify-content: flex-end;
            position: relative;
          "
        >
          <input
@@ -43,6 +44,8 @@
              flex: 1;
              background-color: #fff;
              font-size: 0.13rem;
              padding-right: 30px;
              box-sizing: border-box;
            "
            @blur="InputBlur"
            @confirm="toggleSearch"
@@ -50,6 +53,30 @@
            v-model="searchInput"
            placeholder="请输入搜索内容"
          />
          <span
            class="cleanupBtn"
            v-if="searchInput"
            @click="searchInput = ''"
            style="
              position: absolute;
              top: 50%;
              margin-top: -10px;
              right: 42px;
              color: #fff;
              z-index: 2;
              display: inline-block;
              width: 20px;
              height: 20px;
              text-align: center;
              line-height: 20px;
              background-color: #a5a5a5;
              font-weight: bold;
              border-radius: 50%;
              font-size: 12px;
              cursor: pointer;
            "
            >✖</span
          >
          <view
            title="搜索"
            class="search-logo"
src/pages/TcmSystem/TcmSystem.vue
@@ -15,9 +15,10 @@
        热门搜索:
        <ul class="flex" style="margin-right: 10rpx">
          <li
            v-for="item in hot"
            v-for="(item, index) in hot"
            :key="item.id"
            @tap="HotClick(item.name)"
            @tap="HotClick(item.name, index)"
            :class="{ cursor: true, active: hotAciveIndex === index }"
            style="margin: 0 0.05rem; color: #244a7b; cursor: pointer"
          >
            {{ item.name }}
@@ -429,6 +430,7 @@
  },
  data() {
    return {
      hotAciveIndex: "",
      // 机构统计
      institution: {
        title: "机构统计",
@@ -546,7 +548,13 @@
      });
    },
    // 右侧的list数据
    getMList(key) {
    getMList(key, index) {
      if (index !== undefined) {
        this.SearchValue = "";
        this.hotAciveIndex = index;
      } else {
        this.hotAciveIndex = "";
      }
      this.pageLoading = true;
      let Obj = {
        medicalSearchType: this.searchType,
@@ -687,9 +695,9 @@
      this.getMList();
    },
    // 热门搜索
    HotClick(val) {
    HotClick(val, index) {
      // this.SearchValue = val;
      this.getMList(val);
      this.getMList(val, index);
    },
    // 按照什么排序
    selectChange(e) {
@@ -787,7 +795,7 @@
  top: -0.25rem;
  color: #2c2c2c;
  font-weight: bold;
  span{
  span {
    font-weight: initial;
  }
}
@@ -1245,4 +1253,9 @@
.nullBox {
  width: 100%;
}
.cursor.active {
  color: #027edc !important;
  font-weight: bold;
}
</style>
src/pages/character/detail.vue
@@ -645,6 +645,11 @@
            {
              name: "所处时期",
              value: obj.dynastyDesc || "-",
              valueClick: () => {
                uni.navigateTo({
                  url: "/pages/knowledgeBase/knowledgeBase?dynasty=" + obj.dynastyId
                });
              }
            },
            {
              name: "民族",
@@ -665,6 +670,11 @@
            {
              name: "职官",
              value: obj.official || "-",
              valueClick: () => {
                uni.navigateTo({
                  url: "/pages/knowledgeBase/knowledgeBase?isAdvancedSearch=1&official=" + obj.official
                });
              }
            },
            {
              name: "流派",
src/pages/character/index.vue
@@ -21,7 +21,6 @@
        <li
          @click="onSearch({ text: item }, index)"
          :class="{ cursor: true, active: hotAciveIndex === index }"
          hotAciveIndex
          v-for="(item, index) in hotKeyList"
          :key="item"
        >
src/pages/index/index.vue
@@ -742,9 +742,7 @@
  }
}
/*     .Bbottom {
        display: flex;
        justify-content: center;
    } */
::v-deep .cleanupBtn{
  right: 52px !important;
}
</style>
src/pages/inherit/index.vue
@@ -10,7 +10,37 @@
    <div class="filterBox font-family">
      <div class="searchBox">
        <input type="text" v-model="keyword" placeholder="请输入关键字" />
        <input
          type="text"
          v-model="keyword"
          @confirm="search"
          placeholder="请输入关键字"
          style="padding-right: 54px; box-sizing: border-box"
        />
        <span
          class="cleanupBtn"
          v-if="keyword"
          @click="keyword = ''"
          style="
            position: absolute;
            top: 50%;
            margin-top: -10px;
            right: 84px;
            color: #fff;
            z-index: 2;
            display: inline-block;
            width: 20px;
            height: 20px;
            text-align: center;
            line-height: 20px;
            background-color: #a5a5a5;
            font-weight: bold;
            border-radius: 50%;
            font-size: 12px;
            cursor: pointer;
          "
          >✖</span
        >
        <button @click="search">搜索</button>
      </div>
      <div class="dynasty">
@@ -411,6 +441,7 @@
  align-items: center;
  margin: 0 auto;
  margin-top: 0.2rem;
  position: relative;
}
.searchBox > input {
src/pages/inherit/list.vue
@@ -132,69 +132,71 @@
        identifier: this.idIndex,
        socialFlag: true
      }).then((res) => {
        let data = res.object;
        this.dataList = res.object;
        // 处理节点颜色
        this.links = [];
        for (let i = 0; i < data.edgeList.length; i++) {
          const linkItem = data.edgeList[i];
          const index = data.nodeList.findIndex(
            (item) =>
              item.identifier ==
              (linkItem.endId == this.idIndex
                ? linkItem.startId
                : linkItem.endId)
          );
          if (linkItem.relationType == "亲属关系") {
            data.nodeList[index].linkType = 1;
            data.nodeList[index].color = "#F8E2D7";
            data.nodeList[index].borderColor = "#F3AA78";
          }
          if (linkItem.relationType == "社会关系") {
            data.nodeList[index].linkType = 2;
            data.nodeList[index].color = "#ecf4fe";
            data.nodeList[index].borderColor = "#597aa5";
          }
          this.links.push({
            source: data.nodeList.find(
              (item) => item.identifier == linkItem.startId
            ).name,
            target: data.nodeList.find(
              (item) => item.identifier == linkItem.endId
            ).name,
            relationType: linkItem.relationType,
            label: {
              show: true,
              formatter: function (params) {
                // 使用函数动态生成标签内容
                // return relationships.find(rel => rel.source === nodes[params.data
                //         .source] && rel.target === nodes[params.data.target])
                //     .relation;
                return linkItem.relation;
              }, // 设置关系标签内容为"Child-Parent"
              color: "#2C2C2C",
              fontSize: 16,
              backgroundColor: "rgba(255, 255, 255, 1)",
              padding: [3, 8],
              borderRadius: 30,
              position: "middle", // 设置标签文本在线的中间位置上居中显示
              // z: -1, // 设置标签的z轴高度,使其比连接线更高
              distance: -10 // 将标签放置在连接线上
            }
          });
        }
        this.dataList = [];
        this.dataList = data.nodeList.map((item) => {
          return {
            ...item,
            itemStyle: {
              color: item.identifier == this.idIndex ? "#F8E2D7" : item.color,
              borderColor:
                item.identifier == this.idIndex ? "#F3AA78" : item.borderColor,
              borderWidth: "3"
            }
          };
        });
        this.initBarChart(this.dataList, this.links);
        // this.links = [];
        // for (let i = 0; i < data.edgeList.length; i++) {
        //   const linkItem = data.edgeList[i];
        //   const index = data.nodeList.findIndex(
        //     (item) =>
        //       item.identifier ==
        //       (linkItem.endId == this.idIndex
        //         ? linkItem.startId
        //         : linkItem.endId)
        //   );
        //   if (linkItem.relationType == "亲属关系") {
        //     data.nodeList[index].linkType = 1;
        //     data.nodeList[index].color = "#F8E2D7";
        //     data.nodeList[index].borderColor = "#F3AA78";
        //   }
        //   if (linkItem.relationType == "社会关系") {
        //     data.nodeList[index].linkType = 2;
        //     data.nodeList[index].color = "#ecf4fe";
        //     data.nodeList[index].borderColor = "#597aa5";
        //   }
        //   this.links.push({
        //     source: data.nodeList.find(
        //       (item) => item.identifier == linkItem.startId
        //     ).name,
        //     target: data.nodeList.find(
        //       (item) => item.identifier == linkItem.endId
        //     ).name,
        //     relationType: linkItem.relationType,
        //     label: {
        //       show: true,
        //       formatter: function (params) {
        //         // 使用函数动态生成标签内容
        //         // return relationships.find(rel => rel.source === nodes[params.data
        //         //         .source] && rel.target === nodes[params.data.target])
        //         //     .relation;
        //         return linkItem.relation;
        //       }, // 设置关系标签内容为"Child-Parent"
        //       color: "#2C2C2C",
        //       fontSize: 16,
        //       backgroundColor: "rgba(255, 255, 255, 1)",
        //       padding: [3, 8],
        //       borderRadius: 30,
        //       position: "middle", // 设置标签文本在线的中间位置上居中显示
        //       // z: -1, // 设置标签的z轴高度,使其比连接线更高
        //       distance: -10 // 将标签放置在连接线上
        //     }
        //   });
        // }
        // this.dataList = data.nodeList.map((item) => {
        //   return {
        //     ...item,
        //     itemStyle: {
        //       color: item.identifier == this.idIndex ? "#F8E2D7" : item.color,
        //       borderColor:
        //         item.identifier == this.idIndex ? "#F3AA78" : item.borderColor,
        //       borderWidth: "3"
        //     }
        //   };
        // });
        setTimeout(() => {
          this.initBarChart();
        }, 50);
      });
      // 世医文化
@@ -228,7 +230,7 @@
        }, 50);
      }
    },
    initBarChart(dataList, links) {
    initBarChart() {
      // WMBg
      //通过 $ref 进行挂载
      var barChart = document.getElementById("barChart");
@@ -268,8 +270,7 @@
        animationEasingUpdate: "quinticInOut",
        series: [
          {
            type: "graph",
            layout: "force",
            type: "tree",
            symbolSize: SymbolSize + 20,
            //是否允许用户拖动图片
            roam: true,
@@ -280,25 +281,19 @@
            },
            edgeSymbol: ["circle", "arrow"],
            edgeSymbolSize: [4, 10],
            data: dataList,
            links: links,
            data: [this.dataList],
            lineStyle: {
              opacity: 0.9,
              width: 2,
              curveness: 0.3
            },
            emphasis: {
              focus: "adjacency",
              lineStyle: {
                width: 10
              }
            },
            force: {
              initLayout: null,
              // gravity: 0
              repulsion: 600,
              edgeLength: 400
            }
            },
            expandAndCollapse: false,
          }
        ]
      };
src/pages/knowledgeBase/knowledgeBase.vue
@@ -26,11 +26,11 @@
      热门搜索:
      <ul class="flex" style="margin-right: 10rpx">
        <li
          v-for="item in hot"
          @click="hotSearchClick(item)"
          v-for="(item, index) in hot"
          @click="hotSearchClick(item, index)"
          :key="item.id"
          class="cursor"
          style="color: #5879a4"
          :class="{ cursor: true, active: hotAciveIndex === index }"
          style="color: #244a7b"
        >
          {{ item.name }}
        </li>
@@ -194,7 +194,11 @@
          <el-table-column prop="id" label="序号" width="110"></el-table-column>
          <el-table-column prop="personName" label="姓名">
            <template slot-scope="scope">
              <a style="cursor: pointer;color: #027EDC;" @click="gotoDetail(scope.row.id)">{{ scope.row.personName }}</a>
              <a
                style="cursor: pointer; color: #027edc"
                @click="gotoDetail(scope.row.id)"
                >{{ scope.row.personName }}</a
              >
            </template>
          </el-table-column>
          <el-table-column prop="personAlias" label="别名"></el-table-column>
@@ -255,7 +259,8 @@
  getPDownload,
  getPList,
  getHotSearch,
  getPersonList
  getPersonList,
  getInstitutionList
} from "@/api/index.js";
export default {
  components: {
@@ -264,6 +269,7 @@
  },
  data() {
    return {
      hotAciveIndex: "",
      // 高级搜索显示
      isAdvancedSearch: false,
      // 高级搜索
@@ -336,10 +342,10 @@
            value: ""
          },
          {
            type: "input",
            type: "select",
            label: "机构",
            name: "institution",
            value: ""
            options: []
          }
        ]
      },
@@ -395,12 +401,53 @@
    };
  },
  onLoad(options) {
    this.onSearch({ text: options.keyword });
    if (options.isAdvancedSearch && options.isAdvancedSearch == "1") {
      this.isAdvancedSearch = true;
    }
    if (options.official) {
      if (options.official) {
        this.from.from[
          this.from.from.findIndex((item) => item.name == "official")
        ].value = options.official;
      }
      const result = this.from.from.reduce((obj, item) => {
        obj[item.name] = item.value;
        return obj;
      }, {});
      // 提交逻辑
      this.onSubmit(result);
    } else {
      if (options.dynasty) {
        this.dynasty.index = Number(options.dynasty);
        this.dynasty.id = Number(options.dynasty);
      }
      this.onSearch({ text: options.keyword });
    }
  },
  mounted() {
    this.getStatistics();
    this.institutionList();
  },
  methods: {
    institutionList() {
      getInstitutionList().then((res) => {
        this.$set(
          this.from.from[
            this.from.from.findIndex((item) => item.name == "institution")
          ],
          "options",
          res.list.map((item) => {
            return {
              label: item.name,
              value: item.id
            };
          })
        );
        console.log(this.from.from);
      });
    },
    //重置搜索结果
    resetForm() {
      this.onSearch("");
@@ -559,8 +606,8 @@
      });
    },
    // 热门搜索
    hotSearchClick(item) {
      this.onSearch({ text: item.name });
    hotSearchClick(item, index) {
      this.onSearch({ text: item.name }, index);
    },
    // 左侧的机构统计等等按钮
    handInstitCLick(item, name) {
@@ -632,8 +679,14 @@
      });
    },
    // 基础搜索
    async onSearch(val) {
    async onSearch(val, index) {
      this.keywords = val.text;
      if (index !== undefined) {
        this.keywords = "";
        this.hotAciveIndex = index;
      } else {
        this.hotAciveIndex = "";
      }
      let Obj = {
        keywords: val.text, //搜索框检索
        name: "", //姓名
@@ -1209,6 +1262,10 @@
  li {
    font-size: 0.12rem;
    margin: 0 0.1rem;
    &.active {
      color: #027edc !important;
      font-weight: bold;
    }
  }
}
src/pages/territory/territory.vue
@@ -983,4 +983,12 @@
    opacity: 0;
  }
} */
::v-deep .cleanupBtn{
  right: 60px !important;
}
::v-deep .widget_input{
  min-width: 240px !important;
}
</style>
src/uni_modules/cc-defineTable/components/cc-defineTable/cc-defineTable.vue
@@ -7,7 +7,8 @@
          <view v-for="(subItem, subIndex) in item.list" :key="subIndex">
            <view class="param-item">
              <label>{{ subItem.name }}</label>
              <text class="font-family" :title="subItem.value">{{ subItem.value }}</text>
              <text v-if="subItem.valueClick" class="font-family" style="color: #027edc;cursor: pointer;" :title="subItem.value" @click="subItem.valueClick">{{ subItem.value }}</text>
              <text v-else class="font-family" :title="subItem.value">{{ subItem.value }}</text>
            </view>
          </view>
        </view>
src/uni_modules/luanqing-search/components/luanqing-search/luanqing-search.vue
@@ -1,14 +1,38 @@
<template>
  <view class="widget_style">
    <view class="ffff" style="display: flex; height: 100%">
    <view class="ffff" style="display: flex; height: 100%; position: relative">
      <input
        placeholder-class="widget_input_placehold"
        @confirm="onClickSearch"
        v-model="content"
        class="widget_input"
        :style="style1"
        style="min-width: 4rem; padding-right: 54px;box-sizing: border-box;"
        :placeholder="placehold"
      />
      <span
        class="cleanupBtn"
        v-if="content"
        @click="content = ''"
        style="
          position: absolute;
          top: 50%;
          margin-top: -10px;
          right: 84px;
          color: #fff;
          z-index: 2;
          display: inline-block;
          width: 20px;
          height: 20px;
          text-align: center;
          line-height: 20px;
          background-color: #a5a5a5;
          font-weight: bold;
          border-radius: 50%;
          font-size: 12px;
          cursor: pointer;
        "
        >✖</span
      >
      <view class="widget_button" v-if="isSearchTrue" @click="onClickSearch">{{
        buttonText
      }}</view>
@@ -22,7 +46,6 @@
  data() {
    return {
      content: "",
      style1: "",
      style2: ""
    };
  },
@@ -53,9 +76,7 @@
  },
  created() {
    // 编织设置动态宽度
    // this.style1 = 'min-width:calc('+this.width+'vw);';
    // this.style2 = 'min-width:calc('+(this.width / 5)+'vw);';
    this.style1 = "width:4.5rem";
    this.style2 = "width:.5rem";
    this.content = this.keyword || "";
  },
@@ -65,11 +86,11 @@
      this.$emit("onSearch", { text: this.content });
    }
  },
    watch: {
        keyword(value) {
            this.content = value
        }
    }
  watch: {
    keyword(value) {
      this.content = value;
    }
  }
};
</script>
src/uni_modules/next-search-more/components/next-search-more/next-search-more.vue
@@ -35,8 +35,29 @@
            @focus="focus"
            @blur="blur"
          />
          <text v-if="isDelShow" class="icon icon-del" @click="clear"
            >&#xe61c;</text
          <span
            class="cleanupBtn"
            v-if="inputVal"
            @click="inputVal = ''"
            style="
              position: absolute;
              top: 50%;
              margin-top: -10px;
              right: 10px;
              color: #fff;
              z-index: 2;
              display: inline-block;
              width: 20px;
              height: 20px;
              text-align: center;
              line-height: 20px;
              background-color: #a5a5a5;
              font-weight: bold;
              border-radius: 50%;
              font-size: 12px;
              cursor: pointer;
            "
            >✖</span
          >
        </view>
        <view
@@ -246,6 +267,7 @@
        width: 100%;
        display: flex;
        align-items: center;
        position: relative;
        &.center {
          justify-content: center;