qinxianzhangyao
2024-04-26 47a7c6d2458ebd3c4722cbd1938d3f28a99e78ad
qxtj
2个文件已修改
131 ■■■■ 已修改文件
src/views/advice/advice/index.vue 129 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/doctor/checkAll/index.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/advice/advice/index.vue
@@ -33,7 +33,7 @@
    <el-row :gutter="10" class="mb8">
      <el-col :span="1.5">
        <el-button
        type="primary"
          type="primary"
          icon="el-icon-plus"
          size="mini"
          @click="handleAdd"
@@ -43,7 +43,7 @@
      </el-col>
      <el-col :span="1.5">
        <el-button
        type="primary"
          type="primary"
          icon="el-icon-edit"
          size="mini"
          :disabled="single"
@@ -54,7 +54,7 @@
      </el-col>
      <el-col :span="1.5">
        <el-button
        type="primary"
          type="primary"
          icon="el-icon-delete"
          size="mini"
          :disabled="multiple"
@@ -65,7 +65,7 @@
      </el-col>
      <el-col :span="1.5">
        <el-button
        type="primary"
          type="primary"
          icon="el-icon-download"
          size="mini"
          @click="handleExport"
@@ -84,12 +84,29 @@
      :data="adviceList"
      @selection-change="handleSelectionChange"
      border
    >
      <el-table-column type="selection" width="55" align="center" fixed />
      <el-table-column label="序号" align="center" prop="newID" width="55px" fixed  />
      <el-table-column label="所选项目" align="center" prop="proName" width="120px" :show-overflow-tooltip="true" />
      <el-table-column label="标题" align="center" prop="title" width="120px" :show-overflow-tooltip="true" />
      <el-table-column
        label="序号"
        align="center"
        prop="newID"
        width="55px"
        fixed
      />
      <el-table-column
        label="所选项目"
        align="center"
        prop="proName"
        width="120px"
        :show-overflow-tooltip="true"
      />
      <el-table-column
        label="标题"
        align="center"
        prop="title"
        width="120px"
        :show-overflow-tooltip="true"
      />
      <el-table-column
        label="建议"
        align="center"
@@ -159,7 +176,23 @@
        <el-form-item label="建议标题" prop="title">
          <el-input v-model="form.title" placeholder="请输入名称标题" />
        </el-form-item>
        <el-form-item label="快捷标签" prop="kjbq">
          <span
            slot="label"
            style="display: inline-block; border-bottom: 2px solid blue"
            @click="handlekjbq"
          >
            快捷标签
          </span>
          <el-checkbox-group v-model="form.kjbq">
            <el-checkbox
              v-for="(item, index) in dataList"
              :key="index"
              :label="item.id"
              >{{ item.kjbq }}</el-checkbox
            >
          </el-checkbox-group>
        </el-form-item>
        <el-form-item label="建议内容" prop="advice">
          <el-input
            type="textarea"
@@ -171,6 +204,17 @@
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button type="primary" @click="submitForm">确 定</el-button>
        <el-button @click="cancel">取 消</el-button>
      </div>
    </el-dialog>
    <el-dialog title="添加快捷标签" :visible.sync="kjbqopen" width="500px" append-to-body>
      <el-form ref="form" :model="form"  label-width="80px">
        <el-form-item label="名称" prop="kjbq">
          <el-input v-model="form.kjbq" placeholder="请输入名称" />
        </el-form-item>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button type="primary" @click="submitFormbgq">确 定</el-button>
        <el-button @click="cancel">取 消</el-button>
      </div>
    </el-dialog>
@@ -186,19 +230,21 @@
  updateAdvice,
} from "@/api/advice/advice";
import { listProject } from "@/api/hosp/project";
import { getTjAdviceKjbqByFl,addTjAdviceKjbq } from "@/api/system/biaoqianzidian";
import { getInfo } from "@/api/login";
export default {
  name: "Advice",
  data() {
    let checkPhoneNum = (rule, value, callback) => {
         console.log( value)
      console.log(value);
      let patter = new RegExp(/^1\s*[3456789]\s*(\d\s*){9}$/);
      if (value == "" && value == undefined && !value) {
        return callback('');
      }  else if(value != undefined && value != ""){
        return callback("");
      } else if (value != undefined && value != "") {
        return callback();
      }else if (!patter.test(value)) {
        return callback('');
      } else if (!patter.test(value)) {
        return callback("");
      }
    };
    return {
@@ -217,10 +263,12 @@
      total: 0,
      // advice表格数据
      adviceList: [],
      dataList: [],
      // 弹出层标题
      title: "",
      // 是否显示弹出层
      open: false,
      kjbqopen: false,
      // 查询参数
      queryParams: {
        page: 1,
@@ -228,10 +276,12 @@
        proName: null,
      },
      // 表单参数
      form: {},
      form: {
        kjbq:[],
      },
      // 表单校验
      rules: {
        proId: [{ required: true, validator: checkPhoneNum,  trigger: "blur" }],
        proId: [{ required: true, validator: checkPhoneNum, trigger: "blur" }],
      },
    };
  },
@@ -249,15 +299,16 @@
      //   pageSize:this.queryParams.pageSize,
      // }
      listAdvice(this.queryParams).then((response) => {
        response.data.list.forEach((item, index) => {item.newID =(this.queryParams.page - 1) * this.queryParams.pageSize +index +1;
        response.data.list.forEach((item, index) => {
          item.newID =
            (this.queryParams.page - 1) * this.queryParams.pageSize + index + 1;
        });
        this.adviceList = response.data.list;
        this.total = response.data.total;
        this.loading = false;
      });
    },
    getlistProject(){
    getlistProject() {
      listProject(this.queryParams).then((response) => {
        this.projectList = response.data;
      });
@@ -265,6 +316,7 @@
    // 取消按钮
    cancel() {
      this.open = false;
      this.kjbqopen = false;
      this.reset();
    },
    // 表单重置
@@ -301,8 +353,22 @@
    /** 新增按钮操作 */
    handleAdd() {
      this.reset();
      this.open = true;
      this.title = "体检建议信息维护";
      getInfo().then((res) => {
        let data = {
          pageNum: 1,
          pageSize: 10,
          userId: res.user.userId,
          qyzt: 0,
        };
        getTjAdviceKjbqByFl(data).then((res) => {
          if (res.data) {
            this.dataList = res.data.records;
            this.open = true;
            console.log(this.dataList )
          }
        });
      });
    },
    /** 修改按钮操作 */
    handleUpdate(row) {
@@ -312,6 +378,25 @@
        this.form = response.data;
        this.open = true;
        this.title = "体检建议信息维护";
      });
    },
    submitFormbgq() {
      this.$refs["form"].validate((valid) => {
        if (valid) {
          if (this.form.id != null) {
            updateTjAdviceKjbq(this.form).then((response) => {
              this.$modal.msgSuccess("修改成功");
              this.kjbqopen = false;
              this.getList();
            });
          } else {
            addTjAdviceKjbq(this.form).then((response) => {
              this.$modal.msgSuccess("新增成功");
              this.kjbqopen = false;
              this.getList();
            });
          }
        }
      });
    },
    /** 提交按钮 */
@@ -334,6 +419,10 @@
        }
      });
    },
    handlekjbq(){
      this.kjbqopen = true;
    },
    /** 删除按钮操作 */
    handleDelete(row) {
      const ids = row.id || this.ids;
src/views/doctor/checkAll/index.vue
@@ -1483,7 +1483,7 @@
      });
    },
    propoChange() {
      this.cusobj = { sex: this.tableAll.cusSex, isZj: 1 };
      this.cusobj = { sex: this.tableAll.cusSex, isZj: 0 };
      this.$refs.proposal.open = true;
      this.$refs.proposal.title = "建议方案";
      // this.$refs.proposal.getList();