qx
qx
2025-03-14 99c73e4855442b10dd8cd22233166fc427166a5c
qx
3个文件已修改
67 ■■■■ 已修改文件
src/layout/components/Sidebar/index.vue 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/doctor/check/index.vue 40 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/system/tijian/index.vue 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/layout/components/Sidebar/index.vue
@@ -4,7 +4,7 @@
        <el-scrollbar :class="settings.sideTheme" wrap-class="scrollbar-wrapper">
            <!--  :default-openeds="['/tijian']" -->
            <el-menu
           :default-openeds="defaultOpeneds"
                :default-active="activeMenu"
                :collapse="isCollapse"
                :background-color="settings.sideTheme === 'theme-dark' ? variables.menuBackground : variables.menuLightBackground"
@@ -26,6 +26,7 @@
</template>
<script>
import { getRouters } from '@/api/menu'
import { mapGetters, mapState } from "vuex";
import Logo from "./Logo";
import SidebarItem from "./SidebarItem";
@@ -33,9 +34,16 @@
export default {
    components: { SidebarItem, Logo },
    data() {
    return {
      defaultActive: '',
      defaultOpeneds: []
    };
  },
    computed: {
        ...mapState(["settings"]),
        ...mapGetters(["sidebarRouters", "sidebar"]),
        activeMenu() {
            const route = this.$route;
            const { meta, path } = route;
@@ -54,6 +62,16 @@
        isCollapse() {
            return !this.sidebar.opened;
        }
    }
    },
    created() {
    this.route();
  },
    methods: {
        route(){
        getRouters().then(res => {
          this.defaultOpeneds = [res.data[0].path]
        })
       },
    },
};
</script>
src/views/doctor/check/index.vue
@@ -280,10 +280,16 @@
                  <el-table-column prop="project.proName" label="检测项目" width="150">
                  </el-table-column>
                  <el-table-column prop="proResult" label="检测结果" width="150">
                    <template slot-scope="scope">
                    <!-- <template slot-scope="scope">
                      <el-input type="textarea" autosize size="mini" v-model="scope.row.proResult" autocomplete="off"
                        placeholder="请输入检测结果" @focus="handleFocus(scope.row)" @blur="handleInputConfirm(scope.row)"
                        @input="vale($event, scope.row)" :disabled="scope.row.project.proName === 'BMI'"
                        ></el-input> -->
                        <template slot-scope="{ row, $index }">
                      <el-input type="textarea" autosize size="mini" v-model="row.proResult" :ref="`input-${$index}`"
                        @keyup.enter.native="keyInputConfirm($event, $index)" @focus="handleFocus(row)"
                        @blur="handleInputConfirm(row)" @input="vale($event, row)"
                        :disabled="row.project.proName === 'BMI'"
                        ></el-input>
                    </template>
                  </el-table-column>
@@ -420,10 +426,16 @@
                  <el-table-column prop="project.proName" label="检测项目" width="100">
                  </el-table-column>
                  <el-table-column prop="proResult" label="检测结果" width="150">
                    <template slot-scope="scope">
                    <!-- <template slot-scope="scope">
                      <el-input type="textarea" autosize size="mini" v-model="scope.row.proResult" autocomplete="off"
                        placeholder="请输入检测结果" @focus="handleFocus(scope.row)" @blur="handleInputConfirm(scope.row)"
                        @input="vale"></el-input>
                        @input="vale"></el-input> -->
                        <template slot-scope="{ row, $index }">
                      <el-input type="textarea" autosize size="mini" v-model="row.proResult" :ref="`input-${$index}`"
                        @keyup.enter.native="keyInputConfirm($event, $index)" @focus="handleFocus(row)"
                        @blur="handleInputConfirm(row)" @input="vale($event, row)"
                        :disabled="row.project.proName === 'BMI'"
                        ></el-input>
                    </template>
                  </el-table-column>
                  <el-table-column label="规则" width="70">
@@ -1388,6 +1400,28 @@
      this.row.rulesList = param2;
    },
    keyInputConfirm(event, currentRowIndex) {
      // 阻止默认回车行为,比如提交表单
      event.preventDefault();
      const nextRowIndex = currentRowIndex + 1; // 计算下一行索引
      // 如果下一行存在,则聚焦该行的输入框
      if (nextRowIndex < this.proParentList.sons.length) {
        this.$nextTick(() => {
          const nextInputRef = `input-${nextRowIndex}`;
          const nextInput = this.$refs[nextInputRef];
          if (nextInput) {
            // 处理 ref 可能为数组的情况(如动态渲染)
            const target = Array.isArray(nextInput) ? nextInput[0] : nextInput;
            target.focus(); // 聚焦输入框
            target.select(); // 可选:选中文本
          }
        });
      }
    },
    getList() {
      this.loading = true;
      this.queryParams.type = this.tjStatus;
src/views/system/tijian/index.vue
@@ -1240,7 +1240,7 @@
          this.form.firmId = "";
        }
        if (this.form.firmId) {
          this.form.tjType = "1";
          this.form.tjType = this.dict.type.dict_team[2].value;
        }
      }
    },
@@ -1727,6 +1727,7 @@
      addCustomer(formData).then((response) => {
        this.responseList = response.data;
        this.form.tjType = this.dict.type.dict_team[0].value;
        this.$modal.msgSuccess("新增成功");
        _this.tcShow = true;
        _this.isDisabled = true;
@@ -1772,7 +1773,7 @@
            if (this.form.reservationId != null) {
              if (this.form.groupingId) {
                this.form.firmName = this.form.compName;
                this.form.tjType = "1";
                this.form.tjType = this.dict.type.dict_team[2].value;
                this.CompanyList.forEach((item) => {
                  if (item.cnName == this.form.firmName) {
                    this.form.firmId = item.drugManufacturerId;