陈昶聿
3 天以前 9799e992bc987425f21ad0b799e3d25d822329e3
登录问题处理
已删除1个文件
已修改6个文件
2871 ■■■■■ 文件已修改
.npmrc 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
package.json 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/followvisit/discharge/index.vue 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/followvisit/discharge/index.vue.bak 2769 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/followvisit/tasklist/index.vue 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/login.vue 55 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
vue.config.js 4 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
.npmrc
@@ -1,5 +1,5 @@
# æ³¨æ„ï¼š--openssl-legacy-provider ä¸èƒ½è¢«æ”¾åˆ° NODE_OPTIONS(node-options)里,
# Node ä¼šç›´æŽ¥æŠ¥ "not allowed in NODE_OPTIONS" å¹¶é€€å‡ºã€‚
# æœ¬é¡¹ç›®å½“前 Node 16(OpenSSL 1.1.1)不需要该参数;如换到 Node 17+ é‡åˆ°
# error:0308010C:digital envelope routines::unsupported,请把它作为 node çš„直接 CLI å‚数传入:
#   node --openssl-legacy-provider node_modules/@vue/cli-service/bin/vue-cli-service.js serve
# æœ¬é¡¹ç›®ä½¿ç”¨ Vue CLI 4 / webpack 4。在 Node 17+(OpenSSL 3)下,
# compression-webpack-plugin ä»ä¼šè°ƒç”¨ md4,导致
# error:0308010C:digital envelope routines::unsupported。
# è¯·ä½¿ç”¨ npm run dev / npm run build:prod(内部由 build/cli.js è‡ªåŠ¨è¿½åŠ 
# --openssl-legacy-provider),无需手动设置 NODE_OPTIONS。
package.json
@@ -5,10 +5,10 @@
  "author": "杭新",
  "license": "MIT",
  "scripts": {
    "dev": "vue-cli-service serve",
    "build:prod": "vue-cli-service build",
    "build:prod:legacy": "set NODE_OPTIONS=--openssl-legacy-provider&& vue-cli-service build",
    "build:stage": "vue-cli-service build --mode staging",
    "dev": "node build/cli.js serve",
    "build:prod": "node build/cli.js build",
    "build:prod:legacy": "node build/cli.js build",
    "build:stage": "node build/cli.js build --mode staging",
    "preview": "node build/index.js --preview",
    "lint": "eslint --ext .js,.vue src"
  },
@@ -104,7 +104,6 @@
    "eslint": "7.15.0",
    "eslint-plugin-vue": "7.2.0",
    "lint-staged": "10.5.3",
    "node-sass": "^8.0.0",
    "runjs": "4.4.2",
    "sass-loader": "^10.4.1",
    "script-ext-html-webpack-plugin": "2.1.5",
src/views/followvisit/discharge/index.vue
@@ -1214,12 +1214,15 @@
export default {
  name: "Discharge",
  dicts: ["sys_normal_disable", "sys_user_sex", "sys_yujing", "sys_suggest"],
  // é¡µé¢åªç”¨åˆ° sys_suggest,去掉未使用的字典可少发 3 ä¸ªè¯·æ±‚
  dicts: ["sys_suggest"],
  components: { Treeselect, StatisticsCards },
  data() {
    return {
      // é®ç½©å±‚
      loading: true,
      // é¦–次挂载时 created å·²ç»æŸ¥è¿‡ï¼Œè·³è¿‡ç´§æŽ¥ç€è§¦å‘çš„ activated,避免重复请求
      activatedOnce: false,
      // é€‰ä¸­æ•°ç»„
      ids: [],
      // éžå•个禁用
@@ -1640,6 +1643,11 @@
    this.taskQueryReady = true;
  },
  activated() {
    // é¦–次挂载时 created å·²ç»è¯·æ±‚过,避免重复请求
    if (!this.activatedOnce) {
      this.activatedOnce = true;
      return;
    }
    // ä»Žåˆ«çš„æ ‡ç­¾é¡µåˆ‡å›žæ¥æ—¶ï¼Œä»¥è¡¨å•条件为准,丢弃卡片带来的一次性筛选
    this.cardFilter = null;
    this.errtype = this.$route.query.errtype;
@@ -1738,13 +1746,10 @@
          if (item.endtime) {
            item.endDay = this.daysBetween(item.endtime);
          }
          console.log(item, "3");
          if (item.preachform) {
            item.preachformson = item.preachform;
            idArray = item.preachform.split(",");
            console.log(this.checkboxlist);
            console.log(idArray);
            item.preachform = idArray.map((value) => {
              const item = this.checkboxlist.find(
src/views/followvisit/discharge/index.vue.bak
ÎļþÒÑɾ³ý
src/views/followvisit/tasklist/index.vue
@@ -446,12 +446,15 @@
import QRCode from "qrcode";
export default {
  name: "Tasklist",
  dicts: ["sys_normal_disable", "sys_user_sex", "task_status"],
  // é¡µé¢åªç”¨åˆ° task_status,去掉未使用的字典可少发 2 ä¸ªè¯·æ±‚
  dicts: ["task_status"],
  components: { Treeselect, PatientSelection },
  data() {
    return {
      // é®ç½©å±‚
      loading: true,
      // é¦–次挂载时 created å·²ç»æŸ¥è¿‡ï¼Œè·³è¿‡ç´§æŽ¥ç€è§¦å‘çš„ activated,避免重复请求
      activatedOnce: false,
      // é€‰ä¸­æ•°ç»„
      ids: [],
      // éžå•个禁用
@@ -728,6 +731,11 @@
    this.checkboxlist = store.getters.checkboxlist;
  },
  activated() {
    // é¦–次挂载时 created å·²ç»è¯·æ±‚过,避免重复请求
    if (!this.activatedOnce) {
      this.activatedOnce = true;
      return;
    }
    this.getList();
  },
  // æœç´¢
@@ -801,7 +809,6 @@
      getTasklist(this.topqueryParams).then((response) => {
        this.userList = response.rows;
        this.total = response.total;
        this.$forceUpdate();
        this.loading = false;
      });
    },
src/views/login.vue
@@ -47,6 +47,7 @@
        >
          <el-option
            v-for="item in options"
            :key="item.value"
            :label="item.label"
            :value="item.value"
          >
@@ -184,23 +185,15 @@
    getorganization() {
      getorganization({ pageSize: 30 }).then((res) => {
        if (res.code == 200) {
          // åŒå¾·ç³»åˆ— / å—华系列 / æµ™æ±Ÿçœæ–°åŽåŒ»é™¢ï¼šç”¨ campusid(organizationID) ä½œä¸‹æ‹‰é”®å€¼ï¼›
          // å…¶ä½™ï¼ˆä¸½æ°´åŒºåŸŸ organizationID å…¨ä¸º "1" ä¸å”¯ä¸€ï¼‰ï¼šç”¨ orgid ä½œä¸‹æ‹‰é”®å€¼
          const campusidKeywords = ["同德", "南华", "浙江省新华医院"];
          this.options = (res.rows || []).map((item) => {
            console.log(item.organizationName);
            const name = item.organizationName || "";
            const useCampusid = campusidKeywords.some((kw) =>
              name.includes(kw)
            );
            return {
              value: String(useCampusid ? item.organizationID : item.orgid),
              label: name,
          // ä¸‹æ‹‰å€¼å¿…须唯一:市一 3 ä¸ªé™¢åŒºçš„ orgid éƒ½æ˜¯ 1,
          // ä¸½æ°´åŒºåŸŸå„机构的 organizationID éƒ½æ˜¯ 1,单用任一字段都会重复。
          // è¿™é‡Œç”¨ã€Œorgid + organizationID + ä¸‹æ ‡ã€ç»„成唯一键,登录时再取真实参数。
          this.options = (res.rows || []).map((item, index) => ({
            value: `${item.orgid}__${item.organizationID}__${index}`,
            label: item.organizationName || "",
              campusid: item.organizationID,
              orgid: item.orgid,
            };
          });
          }));
        }
      });
    },
@@ -245,29 +238,23 @@
            Cookies.remove("rememberMe");
          }
          // é”®å€¼è§„则:丽水区域用 orgid(organizationID/campusid å‡ä¸º "1" ä¸å”¯ä¸€ï¼‰ï¼›
          // åŒå¾·/南华/浙江省新华医院等区域用 campusid(organizationID) ä½œä¸‹æ‹‰é”®å€¼
          const selectedOrg = this.options.find(
            (item) => String(item.value) === String(this.loginForm.orgid)
            (item) => item.value === this.loginForm.orgid
          );
          if (selectedOrg) {
            this.loginForm.campusid = selectedOrg.campusid;
            this.loginForm.orgid = selectedOrg.orgid;
            this.loginForm.orgname = selectedOrg.label;
          if (!selectedOrg) {
            this.loading = false;
            this.$message.error("院区信息已失效,请重新选择院区");
            return;
          }
          // å¸‚一处理-----------------
          // if (selectedOrg) {
          //   if (selectedOrg.label.includes("湖滨")) {
          //     this.loginForm.campusid = 1;
          //   } else if (selectedOrg.label.includes("吴山")) {
          //     this.loginForm.campusid = 2;
          //   } else {
          //     this.loginForm.campusid = 1; // é»˜è®¤å€¼æˆ–其他处理
          //   }
          // }
          // --------------------------------
          // ä¸‹æ‹‰æ¡†å­˜çš„æ˜¯å”¯ä¸€é”®ï¼Œæäº¤å‰æ¢æˆåŽç«¯éœ€è¦çš„真实 orgid / campusid
          const loginInfo = {
            ...this.loginForm,
            campusid: selectedOrg.campusid,
            orgid: selectedOrg.orgid,
            orgname: selectedOrg.label,
          };
          this.$store
            .dispatch("Login", this.loginForm)
            .dispatch("Login", loginInfo)
            .then((res) => {
              if (this.loginForm.username == "admin") {
                this.$router.push({ path: "/index" }).catch(() => {});
vue.config.js
@@ -37,10 +37,10 @@
      [process.env.VUE_APP_BASE_API]: {
        // target: `https://www.health-y.cn/lssf`,
        // target: `http://192.168.100.10:8096`,
        target: `http://192.168.100.10:8094`,//省立同德
        // target: `http://192.168.100.10:8094`,//省立同德
        // target: `http://192.168.100.10:8095`,//新华
        // target: `http://192.168.100.10:8098`,//市一
        // target:`http://localhost:8095`,
        target:`http://localhost:8095`,
        // target: `http://192.168.100.168:8095`,
        // target:`http://35z1t16164.qicp.vip`,
        // target: `http://220.66.153.137:8095`,