qx
qx
20 小时以前 a3350d3b221f68b00d7476b481455406cb6ddcc5
src/views/hosp/commonAdvice/index.vue
@@ -1,113 +1,52 @@
<template>
  <div class="app-container">
    <el-form
      :model="queryParams"
      ref="queryForm"
      size="small"
      :inline="true"
      v-show="showSearch"
      label-width="68px"
    >
    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
      <el-form-item label="标题" prop="bt">
        <el-input
          v-model="queryParams.bt"
          placeholder="请输入标题"
          clearable
          @keyup.enter.native="handleQuery"
        />
        <el-input v-model="queryParams.bt" placeholder="请输入标题" clearable @keyup.enter.native="handleQuery" />
      </el-form-item>
      <el-form-item label="建议" prop="nr">
        <el-input
          v-model="queryParams.nr"
          placeholder="请输入检查项目"
          clearable
          @keyup.enter.native="handleQuery"
        />
        <el-input v-model="queryParams.nr" placeholder="请输入检查项目" clearable @keyup.enter.native="handleQuery" />
      </el-form-item>
      <el-form-item>
        <el-button
          type="primary"
          icon="el-icon-search"
          size="mini"
          @click="handleQuery"
          >搜索</el-button
        >
        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
          >重置</el-button
        >
        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
      </el-form-item>
    </el-form>
    <el-table
      :data="dataList"
      ref="elTable"
      v-loading="loading"
      @selection-change="handleSelectionChange"
      border
      height="580px"
    >
    <el-row :gutter="10" class="mb8">
      <el-col :span="1.5">
        <el-button type="primary" size="mini" @click="proposalChange">新增</el-button>
      </el-col>
    </el-row>
    <el-table :data="dataList" ref="elTable" v-loading="loading" @selection-change="handleSelectionChange" border
      height="580px">
      <el-table-column type="selection" width="40" align="center" />
      <el-table-column label="序号" width="70" align="center" prop="newID" />
      <el-table-column label="标题" width="120" align="center" prop="title" />
      <el-table-column label="建议内容" align="left" prop="advice" />
      <el-table-column
        label="操作"
        align="center"
        fixed="right"
        class-name="small-padding fixed-width"
        width="100px"
      >
      <el-table-column label="操作" align="center" fixed="right" class-name="small-padding fixed-width" width="100px">
        <template slot-scope="scope">
          <el-button
            size="mini"
            type="text"
            icon="el-icon-edit"
            @click="handleEdit(scope.row)"
            title="修改"
          ></el-button>
          <el-button
            size="mini"
            type="text"
            icon="el-icon-delete"
            @click="handleDelete(scope.row)"
            title="删除"
          ></el-button>
          <el-button size="mini" type="text" icon="el-icon-edit" @click="handleEdit(scope.row)" title="修改"></el-button>
          <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
            title="删除"></el-button>
        </template>
      </el-table-column>
    </el-table>
    <pagination
      v-show="total > 0"
      :total="total"
      :page.sync="queryParams.page"
      :limit.sync="queryParams.pageSize"
      @pagination="getList"
    />
    <pagination v-show="total > 0" :total="total" :page.sync="queryParams.page" :limit.sync="queryParams.pageSize"
      @pagination="getList" />
    <!-- 修改快速建议标题和内容 -->
    <el-dialog
      :title="title"
      :visible.sync="open"
      width="1000px"
      append-to-body
      :close-on-click-modal="false"
    >
    <el-dialog :title="title" :visible.sync="open" width="1000px" append-to-body :close-on-click-modal="false">
      <el-form ref="form" :model="form" label-width="80px" :inline="true">
        <el-form-item label="标题" prop="title">
          <el-input
            v-model="form.title"
            placeholder="请输入标题"
            style="width: 200px"
          />
          <el-input v-model="form.title" placeholder="请输入标题" style="width: 200px" />
        </el-form-item>
        <el-form-item label="内容" prop="advice">
          <el-input
            v-model="form.advice"
            type="textarea"
            placeholder="请输入主要内容"
            style="width: 780px"
          />
          <el-input v-model="form.advice" type="textarea" placeholder="请输入主要内容" style="width: 780px" />
        </el-form-item>
      </el-form>
      <div slot="footer" class="dialog-footer">
@@ -125,6 +64,9 @@
  getAdvice,
  delAdvice
} from "@/api/advice/advice";
import {
  addCyTjAdvice,
} from "@/api/system/biaoqianzidian";
import {
  getKjTjAdviceKjbqBySex,
  getCyTjAdviceKjbqBySex,
@@ -198,6 +140,9 @@
      this.open = false;
      this.reset();
    },
    proposalChange() {
      this.open = true;
    },
    // 表单重置
    reset() {
      this.form = {
@@ -238,7 +183,12 @@
              this.getList();
            });
          } else {
            addAdvice(this.form).then((response) => {
            // addAdvice(this.form).then((response) => {
            //   this.$modal.msgSuccess("新增成功");
            //   this.open = false;
            //   this.getList();
            // });
            addCyTjAdvice(this.form).then((response) => {
              this.$modal.msgSuccess("新增成功");
              this.open = false;
              this.getList();
@@ -277,5 +227,3 @@
  },
};
</script>