Просмотр исходного кода

Merge branch 'master' of http://118.190.145.217:3000/xiaojincai/xybpkadmin

xjc 2 лет назад
Родитель
Сommit
011fb390e2
7 измененных файлов с 361 добавлено и 280 удалено
  1. 3 0
      src/api.js
  2. 1 2
      src/views/Home.vue
  3. 1 2
      src/views/Login.vue
  4. 248 184
      src/views/comments/stockNBComments.vue
  5. 90 67
      src/views/doctor/Index.vue
  6. 17 24
      src/views/patient/Index.vue
  7. 1 1
      vue.config.js

+ 3 - 0
src/api.js

@@ -69,6 +69,9 @@ export default {
     getDoctorsList: params => {
         return axios.get(`${baseURL}/api/admin/doctor/list`, { params: params })
     },
+    getDoctorsSearchList: params => {
+        return axios.get(`${baseURL}/api/admin/doctor/search/list`, { params: params })
+    },
     getDoctorInfo: params => {
         return axios.get(`${baseURL}/api/admin/doctor`, { params: params })
     },

+ 1 - 2
src/views/Home.vue

@@ -19,8 +19,7 @@
 						<el-dropdown-item @click.native="changePsw">修改密码</el-dropdown-item>
 					</el-dropdown-menu>
 				</el-dropdown>
-				<!-- <div class="siteTitle">贝安欣PK检测管理后台</div> -->
-				<div class="siteTitle">测试管理后台</div>
+				<div class="siteTitle">贝安欣PK检测管理后台</div>
 			</div>	
 		</el-header>
 		<el-container class="main">

+ 1 - 2
src/views/Login.vue

@@ -90,8 +90,7 @@
   <div class="login">
       <div class="login-div">
         <!-- <h1><img width="345" src="../assets/title.png" alt=""></h1> -->
-        <!-- <h1>贝安欣PK检测管理后台</h1> -->
-        <h1>测试后台</h1>
+        <h1>贝安欣PK检测管理后台</h1>
         <form>
             <div class="input_div">
               <label>用户名</label>

+ 248 - 184
src/views/comments/stockNBComments.vue

@@ -1,30 +1,30 @@
 <style lang="scss">
-  .avatar-uploader .el-upload {
-    border: 1px dashed #d9d9d9;
-    border-radius: 6px;
-    cursor: pointer;
-    position: relative;
-    overflow: hidden;
-  }
+.avatar-uploader .el-upload {
+  border: 1px dashed #d9d9d9;
+  border-radius: 6px;
+  cursor: pointer;
+  position: relative;
+  overflow: hidden;
+}
 
-  .avatar-uploader .el-upload:hover {
-    border-color: #409eff;
-  }
+.avatar-uploader .el-upload:hover {
+  border-color: #409eff;
+}
 
-  .avatar-uploader-icon {
-    font-size: 28px;
-    color: #8c939d;
-    width: 178px;
-    height: 178px;
-    line-height: 178px;
-    text-align: center;
-  }
+.avatar-uploader-icon {
+  font-size: 28px;
+  color: #8c939d;
+  width: 178px;
+  height: 178px;
+  line-height: 178px;
+  text-align: center;
+}
 
-  .avatar {
-    width: 178px;
-    height: 178px;
-    display: block;
-  }
+.avatar {
+  width: 178px;
+  height: 178px;
+  display: block;
+}
 </style>
 <template>
   <section class="content">
@@ -34,14 +34,28 @@
       <el-row>
         <el-col :span="6">
           <el-form-item label="股票名称">
-            <el-input clearable @clear="getData()" v-model="queryParams.stock_name" placeholder="请输入股票名称/代码"
-              size="mini"></el-input>
+            <el-input
+              clearable
+              @clear="getData()"
+              v-model="queryParams.stock_name"
+              placeholder="请输入股票名称/代码"
+              size="mini"
+            ></el-input>
           </el-form-item>
         </el-col>
         <el-col :span="6">
           <el-form-item label-width="10" style="margin-left: 10px">
-            <el-button type="primary" @click="getData" size="mini">筛选</el-button>
-            <el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd">新增点评</el-button>
+            <el-button type="primary" @click="getData" size="mini"
+              >筛选</el-button
+            >
+            <el-button
+              type="primary"
+              plain
+              icon="el-icon-plus"
+              size="mini"
+              @click="handleAdd"
+              >新增点评</el-button
+            >
             <!-- <el-button
               type="primary"
               icon="el-icon-plus"
@@ -53,48 +67,90 @@
         </el-col>
       </el-row>
     </el-form>
-    <el-table v-loading="loading" :data="list" style="width: 100%; margin-top: 10px" height="50vh">
+    <el-table
+      v-loading="loading"
+      :data="list"
+      style="width: 100%; margin-top: 10px"
+      height="50vh"
+    >
       <el-table-column align="center" prop="stock_name" label="股票名称" />
       <el-table-column align="center" prop="stock_code" label="股票代码" />
       <el-table-column label="图片">
         <template slot-scope="scope">
-          <el-image style="width: 80px; height: 60px" :src="scope.row.img" :preview-src-list="[scope.row.img]">
+          <el-image
+            style="width: 80px; height: 60px"
+            :src="scope.row.img"
+            :preview-src-list="[scope.row.img]"
+          >
           </el-image>
         </template>
       </el-table-column>
       <el-table-column align="center" prop="content" label="点评内容">
         <template slot-scope="scope">
-          {{scope.row.content.substring(0,20)}}...
+          {{ scope.row.content.substring(0, 20) }}...
         </template>
       </el-table-column>
       <el-table-column align="center" prop="ctime" label="创建时间" />
       <el-table-column align="center" prop="date" label="操作" width="320">
         <template slot-scope="scope">
-          <el-button @click="edit(scope.row.id)" size="mini" type="warning">编辑</el-button>
-          <el-button @click="del(scope.row.id)" size="mini" type="danger">删除</el-button>
+          <el-button @click="edit(scope.row.id)" size="mini" type="warning"
+            >编辑</el-button
+          >
+          <el-button @click="del(scope.row.id)" size="mini" type="danger"
+            >删除</el-button
+          >
         </template>
       </el-table-column>
     </el-table>
-    <Page ref="pageButton" :current="form.page" :page_size="form.page_size" :total="total" @pageChange="gopage" />
+    <Page
+      ref="pageButton"
+      :current="form.page"
+      :page_size="form.page_size"
+      :total="total"
+      @pageChange="gopage"
+    />
     <!-- 新增用户 -->
     <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
       <el-form ref="form" :model="form" :rules="rules" label-width="80px">
         <el-form-item label="股票" prop="stock_id">
-          <el-select @change="changeStock" v-model="form.stock_id" placeholder="请输入股票名称" filterable remote
-            :remote-method="remoteMethod">
-            <el-option v-for="item in stockList" :key="item.value" :label="item.label" :value="item.id">
+          <el-select
+            @change="changeStock"
+            v-model="form.stock_id"
+            placeholder="请输入股票名称"
+            filterable
+            remote
+            :remote-method="remoteMethod"
+          >
+            <el-option
+              v-for="item in stockList"
+              :key="item.value"
+              :label="item.label"
+              :value="item.id"
+            >
             </el-option>
           </el-select>
         </el-form-item>
         <el-form-item label="图片" prop="">
-          <el-upload class="avatar-uploader" action="/api/admin/uploadfile" :data="{watermark:0}"
-            :show-file-list="false" :on-success="handleAvatarSuccess" :before-upload="beforeAvatarUpload">
+          <el-upload
+            class="avatar-uploader"
+            action="/api/admin/uploadfile"
+            :data="{ watermark: 0 }"
+            :show-file-list="false"
+            :on-success="handleAvatarSuccess"
+            :before-upload="beforeAvatarUpload"
+          >
             <img v-if="form.img" :src="form.img" class="avatar" />
             <i v-else class="el-icon-plus avatar-uploader-icon"></i>
           </el-upload>
         </el-form-item>
         <el-form-item label="点评内容" prop="content">
-          <el-input clearable v-model="form.content" placeholder="请输入点评内容" type="textarea" rows=10></el-input>
+          <el-input
+            clearable
+            v-model="form.content"
+            placeholder="请输入点评内容"
+            type="textarea"
+            rows="10"
+          ></el-input>
         </el-form-item>
       </el-form>
       <div slot="footer" class="dialog-footer">
@@ -105,171 +161,179 @@
   </section>
 </template>
 <script>
-  import Page from "../../components/Page";
-  export default {
-    components: {
-      Page,
-    },
-    data() {
-      return {
-        loading: false,
-        queryParams: {
-          page: 1,
-        },
-        form: {},
-        form1: {},
-        form2: {},
-        list: [{}, {}],
-        total: 0,
-        title: "新增用户",
-        open: false,
-        stockList: [],
-        rules: {
-          username: [{
+import Page from "../../components/Page";
+export default {
+  components: {
+    Page,
+  },
+  data() {
+    return {
+      loading: false,
+      queryParams: {
+        page: 1,
+      },
+      form: {},
+      form1: {},
+      form2: {},
+      list: [{}, {}],
+      total: 0,
+      title: "新增用户",
+      open: false,
+      stockList: [],
+      rules: {
+        username: [
+          {
             required: true,
             message: "请输入用户名",
-            trigger: "blur"
-          }, ],
-          player_type: [{
+            trigger: "blur",
+          },
+        ],
+        player_type: [
+          {
             required: true,
             message: "请选择用户类型",
-            trigger: "change"
-          }, ],
-          phone: [{
+            trigger: "change",
+          },
+        ],
+        phone: [
+          {
             required: true,
             message: "请输入用户手机号",
-            trigger: "blur"
-          }, ],
-          avatar: [{
+            trigger: "blur",
+          },
+        ],
+        avatar: [
+          {
             required: true,
             message: "请输入用户手机号",
-            trigger: "change"
-          }, ],
-        }
-      };
-    },
-    methods: {
-      del(id) {
-        this.$confirm("删除用户会删除相关数据,确定删除吗?", "提示", {
-          type: "warning",
-        }).then(() => {
-          this.$api.delStockNBComments({
-            id: id
-          }).then((res) => {
+            trigger: "change",
+          },
+        ],
+      },
+    };
+  },
+  methods: {
+    del(id) {
+      this.$confirm("删除用户会删除相关数据,确定删除吗?", "提示", {
+        type: "warning",
+      }).then(() => {
+        this.$api
+          .delStockNBComments({
+            id: id,
+          })
+          .then((res) => {
             this.$message({
               message: "删除成功",
               type: "success",
             });
             this.getData();
           });
-        });
-      },
-      gopage(size) {
-        if (size) {
-          this.queryParams.page_size = size;
-        }
-        this.queryParams.page = this.$refs.pageButton.page;
-        this.getData();
-      },
-      getData() {
-        this.loading = true;
-        this.$api.getStockNBCommentsList(this.queryParams).then((res) => {
-          this.list = res.data.data.list;
-          this.total = res.data.data.total;
-          this.loading = false;
-        });
-      },
-      handleAdd() {
-        this.open = true;
-        this.title = "新增牛人点评";
-        this.form = {};
-      },
-      edit(id) {
-        this.title = "编辑牛人点评";
-        this.$api.getStockNBCommentsInfo({
-          id: id
-        }).then((res) => {
+      });
+    },
+    gopage(size) {
+      if (size) {
+        this.queryParams.page_size = size;
+      }
+      this.queryParams.page = this.$refs.pageButton.page;
+      this.getData();
+    },
+    getData() {
+      this.loading = true;
+      this.$api.getStockNBCommentsList(this.queryParams).then((res) => {
+        this.list = res.data.data.list;
+        this.total = res.data.data.total;
+        this.loading = false;
+      });
+    },
+    handleAdd() {
+      this.open = true;
+      this.title = "新增牛人点评";
+      this.form = {};
+    },
+    edit(id) {
+      this.title = "编辑牛人点评";
+      this.$api
+        .getStockNBCommentsInfo({
+          id: id,
+        })
+        .then((res) => {
           this.form = res.data.data;
           this.open = true;
         });
-      },
-      black(row) {
-        this.$api.commentsBlack({
-          id: row.id
-        }).then(res => {
-          this.getData()
+    },
+    black(row) {
+      this.$api
+        .commentsBlack({
+          id: row.id,
         })
-      },
-      handleAvatarSuccess(res, file) {
-        this.form.img = res.data.url;
-        console.log(this.form.img)
-      },
-      beforeAvatarUpload(file) {
-        return;
-        const isJPG = file.type === "image/jpeg";
-        const isLt2M = file.size / 1024 / 1024 < 2;
+        .then((res) => {
+          this.getData();
+        });
+    },
+    handleAvatarSuccess(res, file) {
+      this.form.img = res.data.url;
+      console.log(this.form.img);
+    },
+    beforeAvatarUpload(file) {
+      return;
+      const isJPG = file.type === "image/jpeg";
+      const isLt2M = file.size / 1024 / 1024 < 2;
 
-        if (!isJPG) {
-          this.$message.error("上传头像图片只能是 JPG 格式!");
-        }
-        if (!isLt2M) {
-          this.$message.error("上传头像图片大小不能超过 2MB!");
-        }
-        return isJPG && isLt2M;
-      },
-      /** 提交按钮 */
-      submitForm() {
-        this.$refs["form"].validate((valid) => {
-          if (valid) {
-            if (this.form.id != null) {
-              this.$api.editStockNBComments(this.form).then((res) => {
-                if (res.data.code == 0) {
-                  this.msgSuccess("成功!");
-                  this.open = false;
-                  this.getData();
-                } else {
-                  this.msgError(res.data.message);
-                }
-              });
-            } else {
-              this.$api.addStockNBComments(this.form).then((res) => {
-                if (res.data.code == 0) {
-                  this.msgSuccess("成功!");
-                  this.open = false;
-                  this.getData();
-                } else {
-                  this.msgError(res.data.message);
-                }
-              });
-            }
+      if (!isJPG) {
+        this.$message.error("上传头像图片只能是 JPG 格式!");
+      }
+      if (!isLt2M) {
+        this.$message.error("上传头像图片大小不能超过 2MB!");
+      }
+      return isJPG && isLt2M;
+    },
+    /** 提交按钮 */
+    submitForm() {
+      this.$refs["form"].validate((valid) => {
+        if (valid) {
+          if (this.form.id != null) {
+            this.$api.editStockNBComments(this.form).then((res) => {
+              if (res.data.code == 0) {
+                this.msgSuccess("成功!");
+                this.open = false;
+                this.getData();
+              } else {
+                this.msgError(res.data.message);
+              }
+            });
+          } else {
+            this.$api.addStockNBComments(this.form).then((res) => {
+              if (res.data.code == 0) {
+                this.msgSuccess("成功!");
+                this.open = false;
+                this.getData();
+              } else {
+                this.msgError(res.data.message);
+              }
+            });
           }
-        });
-      },
-      remoteMethod(query) {
-        if (query !== '') {
-          this.loading = true;
-          this.$api.getStockSearchList({
-            name: query
-          }).then(res => {
-            this.stockList = res.data.data
-            this.$set(this.stockList, res.data.data)
-            this.loading = false;
-          })
-        } else {
-          this.stockList = [];
-        }
-      },
-      changeStock(val) {
-        var obj = {}
-        obj = this.stockList.find(function(item){
-            return item.id === val;
-          })
-          this.form.stock_name = obj.name
-          this.form.stock_code = obj.code
         }
+      });
     },
-    created() {
-      this.getData();
-    },
-  };
+    remoteMethod(query) {
+      if (query !== "") {
+        this.loading = true;
+        this.$api
+          .getStockSearchList({
+            name: query,
+          })
+          .then((res) => {
+            this.stockList = res.data.data;
+            this.$set(this.stockList, res.data.data);
+            this.loading = false;
+          });
+      } else {
+        this.stockList = [];
+      }
+    }
+  },
+  created() {
+    this.getData();
+  },
+};
 </script>

+ 90 - 67
src/views/doctor/Index.vue

@@ -56,13 +56,27 @@
         </el-col>
         <el-col :span="4">
           <el-form-item label-width="10" style="margin-left: 10px">
-            <el-button type="primary" @click="getData" size="mini">筛选</el-button>
-            <el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd">新增医生</el-button>
+            <el-button type="primary" @click="getData" size="mini"
+              >筛选</el-button
+            >
+            <el-button
+              type="primary"
+              plain
+              icon="el-icon-plus"
+              size="mini"
+              @click="handleAdd"
+              >新增医生</el-button
+            >
           </el-form-item>
         </el-col>
       </el-row>
     </el-form>
-    <el-table v-loading="loading" :data="list" style="width: 100%; margin-top: 10px" height="50vh">
+    <el-table
+      v-loading="loading"
+      :data="list"
+      style="width: 100%; margin-top: 10px"
+      height="50vh"
+    >
       <el-table-column align="center" prop="name" label="名称" />
       <!-- <el-table-column label="图片">
         <template slot-scope="scope">
@@ -72,18 +86,23 @@
       </el-table-column>-->
       <el-table-column align="center" prop="phone" label="手机号" />
       <el-table-column label="医生类型">
-          <template slot-scope="scope">
-            <span v-if="scope.row.role==1">大医生</span>
-            <span v-if="scope.row.role==2">中医生</span>
-            <span v-if="scope.row.role==3">小医生</span>
-          </template>
+        <template slot-scope="scope">
+          <span v-if="scope.row.role == 1">大医生</span>
+          <span v-if="scope.row.role == 2">中医生</span>
+          <span v-if="scope.row.role == 3">小医生</span>
+        </template>
       </el-table-column>
+      <el-table-column align="center" prop="parent_name" label="带教医生" />
       <el-table-column align="center" prop="hospital_name" label="医院" />
       <el-table-column align="center" prop="ctime" label="创建时间" />
       <el-table-column align="center" prop="date" label="操作" width="320">
         <template slot-scope="scope">
-          <el-button @click="edit(scope.row.id)" size="mini" type="warning">编辑</el-button>
-          <el-button @click="del(scope.row.id)" size="mini" type="danger">删除</el-button>
+          <el-button @click="edit(scope.row.id)" size="mini" type="warning"
+            >编辑</el-button
+          >
+          <el-button @click="del(scope.row.id)" size="mini" type="danger"
+            >删除</el-button
+          >
         </template>
       </el-table-column>
     </el-table>
@@ -97,20 +116,6 @@
     <!-- 新增医生 -->
     <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
       <el-form ref="form" :model="form" :rules="rules" label-width="80px">
-        <el-form-item label="名称" prop="name">
-          <el-input
-            clearable
-            v-model="form.name"
-            placeholder="请输入名称"
-          ></el-input>
-        </el-form-item>
-        <el-form-item label="手机号" prop="phone">
-          <el-input
-            clearable
-            v-model="form.phone"
-            placeholder="请输入手机号"
-          ></el-input>
-        </el-form-item>
         <el-form-item label="医生类型" prop="role">
           <el-select
             v-model="form.role"
@@ -125,6 +130,40 @@
             ></el-option>
           </el-select>
         </el-form-item>
+        <el-form-item label="带教医生" prop="parent_id" v-if="form.role == 3">
+          <el-select
+            v-model="form.parent_id"
+            placeholder="请输入医生姓名"
+            clearable
+            filterable
+            remote
+            :remote-method="remoteMethod"
+            size="mini"
+          >
+            <el-option
+              v-for="item in doctorList"
+              :key="item.value"
+              :label="item.name"
+              :value="item.id"
+            >
+            </el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="名称" prop="name">
+          <el-input
+            clearable
+            v-model="form.name"
+            placeholder="请输入名称"
+          ></el-input>
+        </el-form-item>
+        <el-form-item label="手机号" prop="phone">
+          <el-input
+            clearable
+            v-model="form.phone"
+            placeholder="请输入手机号"
+          ></el-input>
+        </el-form-item>
+
         <el-form-item label="医院" prop="hospital_name">
           <el-input
             clearable
@@ -157,13 +196,13 @@
 import Page from "../../components/Page";
 export default {
   components: {
-    Page
+    Page,
   },
   data() {
     return {
       loading: false,
       queryParams: {
-        page: 1
+        page: 1,
       },
       form: {},
       form1: {},
@@ -172,25 +211,25 @@ export default {
       total: 0,
       title: "新增用户",
       open: false,
-      stockList: [],
-      rules: {}
+      doctorList: [],
+      rules: {},
     };
   },
   methods: {
     del(id) {
       this.$confirm("确认删除?", "提示", {
-        type: "warning"
+        type: "warning",
       }).then(() => {
         this.$api
           .delDoctorInfo({
-            id: id
+            id: id,
           })
-          .then(res => {
-            if(!res.data.code){
-              this.$msgSuccess("删除成功")
+          .then((res) => {
+            if (!res.data.code) {
+              this.$msgSuccess("删除成功");
               this.getData();
-            }else{
-              this.$msgError(res.data.message)
+            } else {
+              this.$msgError(res.data.message);
             }
           });
       });
@@ -204,7 +243,7 @@ export default {
     },
     getData() {
       this.loading = true;
-      this.$api.getDoctorsList(this.queryParams).then(res => {
+      this.$api.getDoctorsList(this.queryParams).then((res) => {
         this.list = res.data.data.list;
         this.total = res.data.data.total;
         this.loading = false;
@@ -219,35 +258,19 @@ export default {
       this.title = "编辑医生";
       this.$api
         .getDoctorInfo({
-          id: id
+          id: id,
         })
-        .then(res => {
+        .then((res) => {
           this.form = res.data.data;
           this.open = true;
         });
     },
-    handleAvatarSuccess(res, file) {
-      this.form.img = res.data.url;
-    },
-    beforeAvatarUpload(file) {
-      return;
-      const isJPG = file.type === "image/jpeg";
-      const isLt2M = file.size / 1024 / 1024 < 2;
-
-      if (!isJPG) {
-        this.$message.error("上传头像图片只能是 JPG 格式!");
-      }
-      if (!isLt2M) {
-        this.$message.error("上传头像图片大小不能超过 2MB!");
-      }
-      return isJPG && isLt2M;
-    },
     /** 提交按钮 */
     submitForm() {
-      this.$refs["form"].validate(valid => {
+      this.$refs["form"].validate((valid) => {
         if (valid) {
           if (this.form.id != null) {
-            this.$api.editDoctorInfo(this.form).then(res => {
+            this.$api.editDoctorInfo(this.form).then((res) => {
               if (res.data.code == 0) {
                 this.msgSuccess("成功!");
                 this.open = false;
@@ -257,7 +280,7 @@ export default {
               }
             });
           } else {
-            this.$api.addDoctorInfo(this.form).then(res => {
+            this.$api.addDoctorInfo(this.form).then((res) => {
               if (res.data.code == 0) {
                 this.msgSuccess("成功!");
                 this.open = false;
@@ -272,23 +295,23 @@ export default {
     },
     remoteMethod(query) {
       if (query !== "") {
-        this.loading = true;
+        // this.loading = true;
         this.$api
-          .getStockSearchList({
-            name: query
+          .getDoctorsSearchList({
+            name: query,
           })
-          .then(res => {
-            this.stockList = res.data.data;
-            this.$set(this.stockList, res.data.data);
-            this.loading = false;
+          .then((res) => {
+            this.doctorList = res.data.data;
+            this.$set(this.doctorList, res.data.data);
+            // this.loading = false;
           });
       } else {
-        this.stockList = [];
+        this.doctorList = [];
       }
-    }
+    },
   },
   created() {
     this.getData();
-  }
+  },
 };
 </script>

+ 17 - 24
src/views/patient/Index.vue

@@ -54,6 +54,15 @@
             ></el-input>
           </el-form-item>
         </el-col>
+        <el-col :span="4">
+          <el-form-item label="录入医生" prop="doctor_id">
+          <el-select @change="getData" v-model="queryParams.doctor_id" placeholder="请输入医生姓名" @clear="getData" clearable filterable remote
+            :remote-method="remoteMethod" size="mini">
+            <el-option v-for="item in doctorList" :key="item.value" :label="item.name" :value="item.id">
+            </el-option>
+          </el-select>
+        </el-form-item>
+        </el-col>
         <el-col :span="4">
           <el-form-item label-width="10" style="margin-left: 10px">
             <el-button type="primary" @click="getData" size="mini">筛选</el-button>
@@ -90,7 +99,7 @@
       <el-table-column align="center" prop="ctime" label="录入时间" />
       <el-table-column align="center" prop="date" label="操作" width="160" fixed="right">
         <template slot-scope="scope">
-          <el-button @click="edit(scope.row.id)" size="mini" type="warning">编辑</el-button>
+          <!-- <el-button @click="edit(scope.row.id)" size="mini" type="warning">编辑</el-button> -->
           <el-button @click="del(scope.row.id)" size="mini" type="danger">删除</el-button>
         </template>
       </el-table-column>
@@ -180,7 +189,7 @@ export default {
       total: 0,
       title: "新增用户",
       open: false,
-      stockList: [],
+      doctorList: [],
       rules: {}
     };
   },
@@ -234,22 +243,6 @@ export default {
           this.open = true;
         });
     },
-    handleAvatarSuccess(res, file) {
-      this.form.img = res.data.url;
-    },
-    beforeAvatarUpload(file) {
-      return;
-      const isJPG = file.type === "image/jpeg";
-      const isLt2M = file.size / 1024 / 1024 < 2;
-
-      if (!isJPG) {
-        this.$message.error("上传头像图片只能是 JPG 格式!");
-      }
-      if (!isLt2M) {
-        this.$message.error("上传头像图片大小不能超过 2MB!");
-      }
-      return isJPG && isLt2M;
-    },
     /** 提交按钮 */
     submitForm() {
       this.$refs["form"].validate(valid => {
@@ -280,18 +273,18 @@ export default {
     },
     remoteMethod(query) {
       if (query !== "") {
-        this.loading = true;
+        // this.loading = true;
         this.$api
-          .getStockSearchList({
+          .getDoctorsSearchList({
             name: query
           })
           .then(res => {
-            this.stockList = res.data.data;
-            this.$set(this.stockList, res.data.data);
-            this.loading = false;
+            this.doctorList = res.data.data;
+            this.$set(this.doctorList, res.data.data);
+            // this.loading = false;
           });
       } else {
-        this.stockList = [];
+        this.doctorList = [];
       }
     }
   },

+ 1 - 1
vue.config.js

@@ -13,5 +13,5 @@ module.exports = {
             }
         }
     },
-    publicPath: '/'
+    publicPath: '/admin'
 }