杨磊
2024-07-04 98b44405595e9cc311ad3358af59f4ab11904c56
Merge branch 'master' of http://182.92.203.7:2001/r/TCM_CharacterLibrary
5个文件已修改
19133 ■■■■ 已修改文件
src/api/index.js 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/Login/Login.vue 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/academicGenres/chart.vue 138 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/academicGenres/detail.vue 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
yarn.lock 18958 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/index.js
@@ -287,6 +287,15 @@
  });
};
export const schoolAtlas = (id) => {
  return req1({
    url: "/person/schoolAtlas?schoolId=" + id,
    method: "post"
  });
};
export const searchSchoolPerson = (data) => {
  return req1({
    url: "/person/searchSchoolPerson",
src/pages/Login/Login.vue
@@ -45,10 +45,10 @@
          :model="loginData"
        >
          <el-form-item label="登录账号" prop="loginID">
            <el-input v-model="loginData.loginID"></el-input>
            <input v-model="loginData.loginID" @confirm="Login('formLogin1')"></input>
          </el-form-item>
          <el-form-item label="登录密码" prop="pass">
            <el-input type="password" v-model="loginData.pass"></el-input>
            <input type="password" v-model="loginData.pass" @confirm="Login('formLogin1')"></input>
          </el-form-item>
          <el-form-item class="btn">
            <el-button
@@ -566,7 +566,7 @@
  margin-left: 0 !important;
}
::v-deep .el-input__inner {
::v-deep uni-input {
  border: none;
  border-bottom: 1px solid #2d476a;
  border-radius: 0;
@@ -580,7 +580,7 @@
  border-color: #2d476a !important;
}
::v-deep .el-input__inner:invalid {
::v-deep uni-input:invalid {
  border-color: #2d476a !important;
}
@@ -726,7 +726,7 @@
  top: 85% !important;
}
::v-deep .el-input__inner {
::v-deep uni-input {
  height: 0.4rem !important;
  font-size: 0.14rem;
}
@@ -757,7 +757,7 @@
  font-size: 0.13rem !important;
}
::v-deep .el-input__inner {
::v-deep uni-input {
  height: 0.44rem !important;
}
src/pages/academicGenres/chart.vue
@@ -65,23 +65,32 @@
        </li>
      </ul>
    </view>
    <view class="contentBox" style="position: relative;">
    <view class="contentBox" style="position: relative">
      <div
          v-if="nodeData.length == 0"
          style="color: #666; text-align: center; font-size: 16px; position: absolute;top: 1rem;left: 0;right: 0;"
        >
          暂无数据
        </div>
      <view id="main" style="width: 100%; height: 100%">
      </view>
        v-if="nodeData.length == 0"
        style="
          color: #666;
          text-align: center;
          font-size: 16px;
          position: absolute;
          top: 1rem;
          left: 0;
          right: 0;
        "
      >
        暂无数据
      </div>
      <view id="main" style="width: 100%; height: 100%"> </view>
    </view>
  </view>
</template>
<script>
import { getIntroduction, searchSchoolPerson } from "@/api/index.js";
import {
  getIntroduction,
  searchSchoolPerson,
  schoolAtlas
} from "@/api/index.js";
import * as echarts from "echarts";
export default {
  data() {
@@ -149,8 +158,8 @@
                        res.object.bookList.find(
                          (citem) => citem.id == item.bookId
                        ).name +
                        "》 P" +
                        item.pageNo
                        "》 " +
                        (item.pageNo ? "P " + item.pageNo : "")
                      : ""
                };
              })
@@ -166,8 +175,8 @@
                        res.object.bookList.find(
                          (citem) => citem.id == item.bookId
                        ).name +
                        "》 P" +
                        item.pageNo
                        "》 " +
                        (item.pageNo ? "P " + item.pageNo : "")
                      : ""
                };
              })
@@ -183,8 +192,8 @@
                        res.object.bookList.find(
                          (citem) => citem.id == item.bookId
                        ).name +
                        "》 P" +
                        item.pageNo
                        "》 " +
                        (item.pageNo ? "P " + item.pageNo : "")
                      : ""
                };
              })
@@ -200,8 +209,8 @@
                        res.object.bookList.find(
                          (citem) => citem.id == item.bookId
                        ).name +
                        "》 P" +
                        item.pageNo
                        "》 " +
                        (item.pageNo ? "P " + item.pageNo : "")
                      : ""
                };
              })
@@ -229,34 +238,57 @@
          },
          symbolSize: 100
        });
        searchSchoolPerson({
          keyword: item
        }).then((res) => {
        schoolAtlas(Number(this.idIndex)).then((res) => {
          if (res.list) {
            for (let i = 0; i < res.list.length; i++) {
              const citem = res.list[i];
              // 节点
              this.nodeData.push({
                name: citem.name2,
                x: Math.random() * 1000,
                y: Math.random() * 600,
                itemStyle: {
                  color: citem.relationType == "人物著作" ? "#eee" : "#FDEFE4",
                  borderWidth: 4,
                  borderColor:
                    citem.relationType == "人物著作" ? "#9e9e9e" : "#DA7A2B",
                  borderRadius: 30
                },
                symbolSize: 100
              });
              // 关系
              this.links.push({
                source: item,
                target: citem.name2,
                label: {
                  show: false
              if (
                citem.relationType != "代表人物" &&
                citem.relationType != "人物关系"
              ) {
                // 节点
                if (citem.name1) {
                  this.nodeData.push({
                    name: citem.name1,
                    x: Math.random() * 1000,
                    y: Math.random() * 600,
                    itemStyle: {
                      color:
                        citem.relationType == "关系文献" ? "#eee" : "#FDEFE4",
                      borderWidth: 4,
                      borderColor:
                        citem.relationType == "关系文献"
                          ? "#9e9e9e"
                          : "#DA7A2B",
                      borderRadius: 30
                    },
                    symbolSize: 100
                  });
                  // 关系
                  this.links.push({
                    source: item,
                    target: citem.name1,
                    label: {
                      show: true,
                      formatter: function (params) {
                        // 使用函数动态生成标签内容
                        // return relationships.find(rel => rel.source === nodes[params.data
                        //         .source] && rel.target === nodes[params.data.target])
                        //     .relation;
                        return citem.name2;
                      }, // 设置关系标签内容为"Child-Parent"
                      color: "#2C2C2C",
                      fontSize: 14,
                      backgroundColor: "rgba(255, 255, 255, 1)",
                      padding: [3, 8],
                      borderRadius: 30,
                      position: "middle", // 设置标签文本在线的中间位置上居中显示
                      // z: -1, // 设置标签的z轴高度,使其比连接线更高
                      distance: -10 // 将标签放置在连接线上
                    }
                  });
                }
              });
              }
            }
          }
          this.init();
@@ -295,7 +327,8 @@
        series: [
          {
            type: "graph",
            layout: "none",
            layout: "force",
            roam: true,
            symbolSize: SymbolSize + 20,
            //是否允许用户拖动图片
            roam: true,
@@ -306,7 +339,12 @@
            },
            edgeSymbol: ["circle", "arrow"],
            edgeSymbolSize: [4, 10],
            emphasis: {
              focus: "adjacency",
              lineStyle: {
                width: 10
              }
            },
            edgeLabel: {
              show: true,
              fontSize: FontSize, //更改两者关系的字体
@@ -324,10 +362,14 @@
            data: this.nodeData, //关系连接
            links: this.links,
            lineStyle: {
              color: "#000000",
              opacity: 0.9,
              width: 2,
              curveness: 0
              width: 2
            },
            force: {
              // layoutAnimation: false,
              // friction: 1,
              repulsion: 800,
              edgeLength: 400
            }
          }
        ]
src/pages/academicGenres/detail.vue
@@ -209,8 +209,8 @@
                        res.object.bookList.find(
                          (citem) => citem.id == item.bookId
                        ).name +
                        "》 P" +
                        item.pageNo
                        "》 " +
                        (item.pageNo ? "P " + item.pageNo : "")
                      : ""
                };
              })
@@ -226,8 +226,8 @@
                        res.object.bookList.find(
                          (citem) => citem.id == item.bookId
                        ).name +
                        "》 P" +
                        item.pageNo
                        "》 " +
                        (item.pageNo ? "P " + item.pageNo : "")
                      : ""
                };
              })
@@ -243,8 +243,8 @@
                        res.object.bookList.find(
                          (citem) => citem.id == item.bookId
                        ).name +
                        "》 P" +
                        item.pageNo
                        "》 " +
                        (item.pageNo ? "P " + item.pageNo : "")
                      : ""
                };
              })
@@ -260,8 +260,8 @@
                        res.object.bookList.find(
                          (citem) => citem.id == item.bookId
                        ).name +
                        "》 P" +
                        item.pageNo
                        "》 " +
                        (item.pageNo ? "P " + item.pageNo : "")
                      : ""
                };
              })
yarn.lock
Diff too large