Your Name 2 lat temu
rodzic
commit
f62a043b87
42 zmienionych plików z 7200 dodań i 736 usunięć
  1. 1 1
      .gitignore
  2. 5 0
      package-lock.json
  3. 1 0
      package.json
  4. BIN
      public/favicon.ico
  5. 7 3
      public/index.html
  6. 30 1
      src/api.js
  7. BIN
      src/assets/demo.png
  8. BIN
      src/assets/stdBarCode.png
  9. 40 1
      src/constant.js
  10. 61 19
      src/router.js
  11. 14 9
      src/style/home.scss
  12. 109 101
      src/views/Home.vue
  13. 4 4
      src/views/Login.vue
  14. 291 0
      src/views/anscard/Index.vue
  15. 252 0
      src/views/anscard/agreementIndex.vue
  16. 204 0
      src/views/anscard/phcodeList.vue
  17. 431 0
      src/views/barcode/Index.vue
  18. 24 58
      src/views/doctor/Index.vue
  19. 291 0
      src/views/grade/Index.vue
  20. 252 0
      src/views/grade/agreementIndex.vue
  21. 204 0
      src/views/grade/phcodeList.vue
  22. 291 0
      src/views/papers.1/Index.vue
  23. 252 0
      src/views/papers.1/agreementIndex.vue
  24. 204 0
      src/views/papers.1/phcodeList.vue
  25. 266 0
      src/views/papers/Index.vue
  26. 400 0
      src/views/papers/cutPaper.vue
  27. 6 6
      src/views/patient/Records.vue
  28. 291 0
      src/views/score/Index.vue
  29. 252 0
      src/views/score/agreementIndex.vue
  30. 204 0
      src/views/score/phcodeList.vue
  31. 291 0
      src/views/student/Index.vue
  32. 252 0
      src/views/student/agreementIndex.vue
  33. 204 0
      src/views/student/phcodeList.vue
  34. 298 0
      src/views/tasks/Index.vue
  35. 252 0
      src/views/tasks/agreementIndex.vue
  36. 204 0
      src/views/tasks/phcodeList.vue
  37. 291 0
      src/views/teacher/Index.vue
  38. 252 0
      src/views/teacher/agreementIndex.vue
  39. 204 0
      src/views/teacher/phcodeList.vue
  40. 272 525
      src/views/user/index.vue
  41. 290 0
      src/views/user/role.vue
  42. 3 8
      vue.config.js

+ 1 - 1
.gitignore

@@ -1,4 +1,4 @@
-node_modules
+node_modules/
 .DS_Store
 dist/
 # Editor directories and files

+ 5 - 0
package-lock.json

@@ -7543,6 +7543,11 @@
         "xmldom": "^0.1.27"
       }
     },
+    "cropperjs": {
+      "version": "1.5.12",
+      "resolved": "https://registry.npmmirror.com/cropperjs/-/cropperjs-1.5.12.tgz",
+      "integrity": "sha512-re7UdjE5UnwdrovyhNzZ6gathI4Rs3KGCBSc8HCIjUo5hO42CtzyblmWLj6QWVw7huHyDMfpKxhiO2II77nhDw=="
+    },
     "css-loader": {
       "version": "1.0.1",
       "resolved": "https://registry.npmmirror.com/css-loader/download/css-loader-1.0.1.tgz?cache=0&sync_timestamp=1635967924209&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Fcss-loader%2Fdownload%2Fcss-loader-1.0.1.tgz",

+ 1 - 0
package.json

@@ -12,6 +12,7 @@
     "ali-oss": "^6.2.1",
     "ansi-styles": "^6.2.1",
     "cos-js-sdk-v5": "^0.5.20",
+    "cropperjs": "^1.5.12",
     "echarts": "^4.9.0",
     "element-ui": "^2.7.2",
     "font-awesome": "^4.7.0",

BIN
public/favicon.ico


+ 7 - 3
public/index.html

@@ -6,9 +6,11 @@
     <meta http-equiv="X-UA-Compatible" content="IE=edge">
     <meta name="viewport" content="width=device-width,initial-scale=1.0">
     <link rel="icon" href="<%= BASE_URL %>favicon.ico">
-    <title>贝安欣PK检测管理后台</title>
+    <title>阅卷系统</title>
     <!-- <script src="https://api.map.baidu.com/api?v=1.0&type=webgl&ak=uscumpiG2CkippMbzaC7njksj7OuL7hj"></script> -->
-</head>
+    <script src="https://printjs-4de6.kxcdn.com/print.min.js"></script>
+    <link rel="stylesheet" href="https://printjs-4de6.kxcdn.com/print.min.css">
+  </head>
 
 <body>
     <noscript>
@@ -17,5 +19,7 @@
     <div id="app"></div>
     <!-- built files will be auto injected -->
 </body>
-
+<script>
+    
+  </script>
 </html>

+ 30 - 1
src/api.js

@@ -51,7 +51,7 @@ export default {
     },
     //退出登录
     logout: params => {
-        return axios.post(`${baseURL}/api/account/logout`, params);
+        return axios.post(`${baseURL}/api/account/admin/logout`, params);
     },
     //重置密码
     reset: params => {
@@ -123,4 +123,33 @@ export default {
     downloadRecords: params => {
         return axios.get(`${baseURL}/api/admin/patient/records/download`, { params: params, responseType: "blob" })
     },
+    delPatientRecord: params => {
+        return axios.delete(`${baseURL}/api/admin/patient/records`, { params: params })
+    },
+    
+
+    // 阅卷
+    getPapersList: params => {
+        return axios.get(`${baseURL}/api/admin/papers/list`, { params: params })
+    },
+    // 识别测试
+    tryRecPaper: params => {
+        return axios.post(`${baseURL}/api/admin/papers/rec/try`, params)
+    },
+    // 试卷管理
+    getDoctorsSearchList: params => {
+        return axios.get(`${baseURL}/api/admin/doctor/search/list`, { params: params })
+    },
+    getPaperInfo: params => {
+        return axios.get(`${baseURL}/api/admin/doctor`, { params: params })
+    },
+    addPaperInfo: params => {
+        return axios.post(`${baseURL}/api/admin/papers`, params)
+    },
+    editPaperInfo: params => {
+        return axios.put(`${baseURL}/api/admin/papers`, params)
+    },
+    delPaperInfo: params => {
+        return axios.delete(`${baseURL}/api/admin/papers`, { params: params })
+    },
 }

BIN
src/assets/demo.png


BIN
src/assets/stdBarCode.png


+ 40 - 1
src/constant.js

@@ -3,5 +3,44 @@ export default{
         {label:"大医生",value:1},
         {label:"中医生",value:2},
         {label:"小医生",value:3}
-    ]
+    ],
+    barCodePreList:[
+        {label:"考号:",value:"考号:"},
+        {label:"姓名:",value:"姓名:"},
+        {label:"考场:",value:"考场:"},
+        {label:"座位:",value:"座位:"},
+        {label:"年级:",value:"年级:"},
+        {label:"班级:",value:"班级:"}
+    ],
+    barCodeBackList:[
+        {label:"场",value:"场"},
+        {label:"号",value:"号"},
+        {label:"班",value:"班"},
+        {label:"级",value:"级"}
+    ],
+    barCodePosList:[
+        {label:"考号",value:"2023011208"},
+        {label:"姓名",value:"李满分"},
+        {label:"考场",value:"01"},
+        {label:"座位",value:"08"},
+        {label:"年级",value:"高三"},
+        {label:"班级",value:"19"}
+    ],
+    subjectList:[
+        {label:"语文",value:"语文"},
+        {label:"数学",value:"数学"}
+    ],
+    paperSizeList:[
+        {label:"A3",value:"A3"},
+        {label:"A4",value:"A4"}
+    ],
+    ansOptionList:[
+        {label:"A",value:"A"},
+        {label:"B",value:"B"},
+        {label:"C",value:"C"},
+        {label:"D",value:"D"},
+        {label:"E",value:"E"},
+        {label:"F",value:"F"},
+        {label:"G",value:"G"}
+    ],
 }

+ 61 - 19
src/router.js

@@ -18,25 +18,37 @@ export default new Router({
             show: 0,
         },
         {
-            path: '/doctor',
-            name: '生管理',
-            icon: 'el-icon-tickets',
+            path: '/school',
+            name: '生管理',
+            icon: 'el-icon-user-solid',
             component: () =>
                 import ('./views/Home.vue'),
             show: 1,
             isLeaf: 0,
             children: [
                 {
-                    path: '/doctor/list',
+                    path: 'class/list',
+                    component: () =>
+                        import ('./views/grade/Index.vue'),
+                    name: '班级管理'
+                },
+                {
+                    path: 'teacher/list',
+                    component: () =>
+                        import ('./views/teacher/Index.vue'),
+                    name: '教师管理'
+                },
+                {
+                    path: 'student/list',
                     component: () =>
-                        import ('./views/doctor/Index.vue'),
-                    name: '医生列表'
+                        import ('./views/student/Index.vue'),
+                    name: '学生管理'
                 },
             ]
         },
         {
-            path: '/patient',
-            name: '患者管理',
+            path: '/paper',
+            name: '试卷管理',
             icon: 'el-icon-tickets',
             component: () =>
                 import ('./views/Home.vue'),
@@ -44,23 +56,53 @@ export default new Router({
             isLeaf: 0,
             children: [
                 {
-                    path: '/patient/list',
+                    path: '/barcode/list',
+                    component: () =>
+                        import ('./views/barcode/Index.vue'),
+                    name: '条形码制作'
+                },
+                {
+                    path: '/anscard/list',
+                    component: () =>
+                        import ('./views/anscard/Index.vue'),
+                    name: '答题卡制作'
+                },
+                {
+                    path: '/papertpl/list',
                     component: () =>
-                        import ('./views/patient/Index.vue'),
-                    name: '病例列表'
+                        import ('./views/papers/Index.vue'),
+                    name: '试卷模板'
                 },
                 {
-                    path: '/patient/records/list',
+                    path: '/papertpl/cutpaper',
                     component: () =>
-                        import ('./views/patient/Records.vue'),
-                    name: '注射打卡'
+                        import ('./views/papers/cutPaper.vue'),
+                    name: '试卷切割'
+                }
+                
+            ]
+        },
+        {
+            path: '/mark',
+            name: '阅卷管理',
+            icon: 'el-icon-s-check',
+            component: () =>
+                import ('./views/Home.vue'),
+            show: 1,
+            isLeaf: 0,
+            children: [
+                {
+                    path: '/task/list',
+                    component: () =>
+                        import ('./views/tasks/Index.vue'),
+                    name: '阅卷任务'
                 }
             ]
         },
         {
             path: '/agreement',
             name: '系统管理',
-            icon: 'el-icon-tickets',
+            icon: 'el-icon-s-tools',
             component: () =>
                 import ('./views/Home.vue'),
             show: 1,
@@ -69,14 +111,14 @@ export default new Router({
                 {
                     path: '/agreement/list',
                     component: () =>
-                        import ('./views/doctor/agreementIndex.vue'),
-                    name: '用户协议'
+                        import ('./views/user/index.vue'),
+                    name: '用户管理'
                 },
                 {
                     path: '/phocode/list',
                     component: () =>
-                        import ('./views/doctor/phcodeList.vue'),
-                    name: '短信记录'
+                        import ('./views/user/role.vue'),
+                    name: '角色管理'
                 }
             ]
         }

+ 14 - 9
src/style/home.scss

@@ -13,6 +13,7 @@ $height: 50px;
     line-height: 60px;
     font-weight: bolder;
     padding: 0 24px;
+    border-bottom:1px solid #fff;
     .logout {
         float: right;
     }
@@ -96,8 +97,9 @@ $height: 50px;
         }
     }
     .content {
-        background: #ccc;
-        padding: 20px !important;
+        // background: #ccc;
+        // padding: 20px !important;
+        height: 100vh;
         margin: 0 !important;
         height: calc(100vh - 100px);
         box-shadow: 0px 4px 12px 0px rgba(0, 0, 0, 0.12);
@@ -106,6 +108,12 @@ $height: 50px;
             font-size: 24px;
             color: #222;
         }
+        .el-form-item{
+            margin-bottom:20px!important;
+        }
+        .breadcrumb{
+            padding:20px;
+        }
     }
     .title_top {
         .add_btn {
@@ -255,10 +263,7 @@ tbody {
     }
 }
 
-.el-table .el-table__cell {
-    background: #ccc;
-}
-
-// .el-form-item.is-required:not(.is-no-asterisk) .el-form-item__label-wrap>.el-form-item__label:before, .el-form-item.is-required:not(.is-no-asterisk)>.el-form-item__label:before{
-// 	content: '';
-// }
+.clear{
+    clear: both;
+    height: 0px;
+}

+ 109 - 101
src/views/Home.vue

@@ -1,9 +1,10 @@
 <style lang="scss">
-@import '../style/home.scss';
-.siteTitle{
-	font-size: 20px;
-	font-weight: 400;
-}
+	@import '../style/home.scss';
+
+	.siteTitle {
+		font-size: 20px;
+		font-weight: 400;
+	}
 </style>
 
 <template>
@@ -19,39 +20,42 @@
 						<el-dropdown-item @click.native="changePsw">修改密码</el-dropdown-item>
 					</el-dropdown-menu>
 				</el-dropdown>
-				<div class="siteTitle">贝安欣PK检测管理后台</div>
-			</div>	
+				<div class="siteTitle">阅卷系统管理后台</div>
+			</div>
 		</el-header>
 		<el-container class="main">
 			<!-- 左侧菜单 -->
 			<el-aside class="left-aside" width="210px">
-				<el-menu background-color='#151932'	text-color='#ffffff' :unique-opened='false'  :default-active="'/'+ $route.path.split('/')[1]" router class="left-menue" active-text-color="#ffffff">
-					<template v-for="(item, index) in $router.options.routes"  >
-							<el-menu-item  v-if='item.show&&item.isLeaf' :index="item.path"  :key='index'>
-								<i :class="item.icon"></i>
-								<span slot="title">{{item.name}}</span>
-							</el-menu-item>
-							<el-submenu   v-if='item.show&&!item.isLeaf' :index="'index_'+index"  :key='index'>
-								<template slot="title" >
+				<el-menu background-color='#151932' text-color='#ffffff' :unique-opened='false'
+					:default-active="0" router class="left-menue"
+					active-text-color="#ffffff">
+					<template v-for="(item, index) in $router.options.routes">
+						<el-menu-item v-if='item.show&&item.isLeaf' :index="item.path" :key='index'>
+							<i :class="item.icon"></i>
+							<span slot="title">{{item.name}}</span>
+						</el-menu-item>
+						<el-submenu v-if='item.show&&!item.isLeaf' :index="'index_'+index" :key='index'>
+							<template slot="title">
 								<i :class="item.icon"></i>
 								<span>{{item.name}}</span>
-								</template>
-								<el-menu-item-group>
-									<el-menu-item class="child" v-for="(child,idx) in item.children"   :key="index+'_'+idx" :index="child.path" v-show='!child.hide'>
+							</template>
+							<el-menu-item-group>
+								<el-menu-item class="child" v-for="(child,idx) in item.children" :key="index+'_'+idx"
+									:index="child.path" v-show='!child.hide'>
 									{{child.name}}
-									</el-menu-item>
-								</el-menu-item-group>
-							</el-submenu>
+								</el-menu-item>
+							</el-menu-item-group>
+						</el-submenu>
 					</template>
 				</el-menu>
 			</el-aside>
 			<!-- 右侧内容 -->
 			<el-container>
-				<el-main>			
-					
-						<transition name="fade" mode="out-in">
-							<router-view  ></router-view>
-						</transition>
+				<el-main>
+
+					<transition name="fade" mode="out-in">
+						<router-view></router-view>
+					</transition>
 				</el-main>
 				<!-- <el-footer>Footer</el-footer> -->
 			</el-container>
@@ -59,90 +63,94 @@
 
 
 		<el-dialog title="修改密码" :visible.sync="open" width="500px" append-to-body>
-            <el-form ref="form" :model="form"  label-width="80px">
-                <!-- <el-form-item label="旧密码">
+			<el-form ref="form" :model="form" label-width="80px">
+				<!-- <el-form-item label="旧密码">
                     <el-input clearable v-model="form.password" placeholder=""></el-input>
                 </el-form-item> -->
-                <el-form-item label="新密码">
-                    <el-input type="password" v-model="form.password" placeholder=""></el-input>
-                </el-form-item>
+				<el-form-item label="新密码">
+					<el-input type="password" v-model="form.password" placeholder=""></el-input>
+				</el-form-item>
 				<el-form-item label="确认密码">
-                    <el-input type="password" v-model="form.repassword" placeholder=""></el-input>
-                </el-form-item>
-            </el-form>
-            <div slot="footer" class="dialog-footer">
-                <el-button type="primary" @click="submitForm">确 定</el-button>
-                <el-button @click="open=false">取 消</el-button>
-            </div>
-        </el-dialog>
+					<el-input type="password" v-model="form.repassword" placeholder=""></el-input>
+				</el-form-item>
+			</el-form>
+			<div slot="footer" class="dialog-footer">
+				<el-button type="primary" @click="submitForm">确 定</el-button>
+				<el-button @click="open=false">取 消</el-button>
+			</div>
+		</el-dialog>
 	</el-container>
 </template>
 
 <script>
-import Router from 'vue-router'
-export default {
-	name: 'home',
-
-	data() {
-		return {
-			info:{},
-			open:false,
-			form:{}
-		};
-	},
-	methods: {
-		changePsw(){
-			this.open=true;
+	import Router from 'vue-router'
+	export default {
+		name: 'home',
 
+		data() {
+			return {
+				info: {},
+				open: false,
+				form: {}
+			};
 		},
-		submitForm(){
-			if(!this.form.password){
-				this.msgError('请输入新密码');
-				return
-			}
-			if(!this.form.repassword){
-				this.msgError('请确认密码');
-				return
-			}
-			this.$api.reset(this.form).then(res=>{
-				if(res.data.code == 0){
-					this.$router.push({path:'/'})
-				}else{
-					this.msgError(res.data.message);
+		methods: {
+			changePsw() {
+				this.open = true;
+
+			},
+			submitForm() {
+				if (!this.form.password) {
+					this.msgError('请输入新密码');
+					return
 				}
-				
-			})
-		},
-		logout(){
-			this.$api.logout().then(res=>{
-				// this.$router.push({path:'/login'})
-				this.$router.push({path:'/'})
-			})
-		},
-		// permission(name){
-		// 	let permissions=this.info.permissions||[];
-		// 	let list=[];
-		// 	for(let i=0;i<permissions.length;i++){
-		// 		list.push(permissions[i].name)
-		// 	}
-		// 	if(list.indexOf(name)<0){
-		// 		return false;
-		// 	}else{
-		// 		return true;
-		// 	}	
-		// },
-		getData(){
-			this.$api.getAccountInfo().then(res=>{
-				if(!res.code){
-					this.info = res.data.data
+				if (!this.form.repassword) {
+					this.msgError('请确认密码');
+					return
 				}
-			})
+				this.$api.reset(this.form).then(res => {
+					if (res.data.code == 0) {
+						this.$router.push({
+							path: '/'
+						})
+					} else {
+						this.msgError(res.data.message);
+					}
+
+				})
+			},
+			logout() {
+				this.$api.logout().then(res => {
+					// this.$router.push({path:'/login'})
+					this.$router.push({
+						path: '/admin'
+					})
+				})
+			},
+			// permission(name){
+			// 	let permissions=this.info.permissions||[];
+			// 	let list=[];
+			// 	for(let i=0;i<permissions.length;i++){
+			// 		list.push(permissions[i].name)
+			// 	}
+			// 	if(list.indexOf(name)<0){
+			// 		return false;
+			// 	}else{
+			// 		return true;
+			// 	}	
+			// },
+			getData() {
+				this.$api.getAccountInfo().then(res => {
+					if (!res.code) {
+						this.info = res.data.data
+					}
+				})
+			},
+
 		},
-	
-	},
-	
-	created(){
-		this.getData()
-	}
-};
-</script>
+
+		created() {
+			this.getData()
+		}
+	};
+</script>

+ 4 - 4
src/views/Login.vue

@@ -89,8 +89,8 @@
 <template>
   <div class="login">
       <div class="login-div">
-        <!-- <h1><img width="345" src="../assets/title.png" alt=""></h1> -->
-        <h1>贝安欣PK检测管理后台</h1>
+        <!-- <h1><img width="345" src="../assets/title.png" alt=""></h1>  -->
+        <h1>阅卷系统</h1>
         <form>
             <div class="input_div">
               <label>用户名</label>
@@ -108,7 +108,7 @@
             <el-button @click="login" @click.native.prevent="login" @keyup.native.enter="login" class="login-btn" type="primary">登  录</el-button>
         </form>
       </div>
-      <p class="footer">Copyright © {{copyrightdate}} 贝安欣 版权所有</p>
+      <p class="footer">Copyright © {{copyrightdate}} supermarkpp版权所有</p>
   </div>
 </template>
 
@@ -144,7 +144,7 @@ export default {
             this.$api.login(parms).then((res)=>{
                 let data=res.data
                   if(res.data.code == 0){
-                      window.location.hash='/doctor/list';
+                      window.location.hash='/school/class/list';
                   }else{
                       this.$message.error(res.data.message);
                   } 

+ 291 - 0
src/views/anscard/Index.vue

@@ -0,0 +1,291 @@
+<style lang="scss">
+
+</style>
+<template>
+  <section class="content">
+    <div class="breadcrumb">
+        <el-breadcrumb separator="/">
+            <el-breadcrumb-item><a href="/">试卷管理</a></el-breadcrumb-item>
+            <el-breadcrumb-item>答题卡制作</el-breadcrumb-item>
+        </el-breadcrumb>
+    </div>
+    <el-form :model="queryParams" label-width="80px" class="filter-form" :inine="true">
+      <el-row>
+        <el-col :span="4">
+          <el-form-item label="学校">
+            <el-select size="mini" v-model="queryParams.school_id">
+              <el-option label="人大附中" value="人大附中">人大附中</el-option>
+            </el-select>
+          </el-form-item>
+        </el-col>
+        <el-col :span="4">
+          <el-form-item label="年级" v-model="queryParams.grade_id">
+            <el-select size="mini">
+              <el-option label="高三一班" value="高三一班">高三一班</el-option>
+            </el-select>
+          </el-form-item>
+        </el-col>
+        <el-col :span="8">
+          <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-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-column align="center" prop="name" label="班级" />
+      <el-table-column align="center" prop="phone" label="年级" />
+      <el-table-column label="教师">
+        <template slot-scope="scope">
+          <el-link type="primary">查看</el-link>
+        </template>
+      </el-table-column>
+      <el-table-column label="学生">
+        <template slot-scope="scope">
+          <el-link type="primary">查看</el-link>
+        </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
+          >
+        </template>
+      </el-table-column>
+    </el-table>
+    <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="role">
+          <el-select
+            v-model="form.role"
+            placeholder="请选择医生类型"
+            filterable
+          >
+            <el-option
+              v-for="item in $const.doctorRoleList"
+              :key="item.value"
+              :label="item.label"
+              :value="item.value"
+            ></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
+            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
+            v-model="form.hospital_name"
+            placeholder="请输入医院"
+          ></el-input>
+        </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"
+          >
+            <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>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitForm">确 定</el-button>
+        <el-button @click="open = false">取 消</el-button>
+      </div>
+    </el-dialog>
+  </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,
+      doctorList: [],
+      rules: {},
+    };
+  },
+  methods: {
+    del(id) {
+      this.$confirm("确认删除?", "提示", {
+        type: "warning",
+      }).then(() => {
+        this.$api
+          .delDoctorInfo({
+            id: id,
+          })
+          .then((res) => {
+            if (!res.data.code) {
+              this.$msgSuccess("删除成功");
+              this.getData();
+            } else {
+              this.$msgError(res.data.message);
+            }
+          });
+      });
+    },
+    gopage(size) {
+      if (size) {
+        this.queryParams.page_size = size;
+      }
+      this.queryParams.page = this.$refs.pageButton.page;
+      this.getData();
+    },
+    getData() {
+      this.loading = true;
+      this.$api.getDoctorsList(this.queryParams).then((res) => {
+        this.list = res.data.data.list;
+        this.total = res.data.data.total;
+        this.loading = false;
+      });
+
+      this.$api
+          .getDoctorsSearchList({
+          })
+          .then((res) => {
+            this.doctorList = res.data.data;
+            this.$set(this.doctorList, res.data.data);
+            // this.loading = false;
+          });
+    },
+    handleAdd() {
+      this.open = true;
+      this.title = "新增医生";
+      this.form = {};
+    },
+    edit(id) {
+      this.title = "编辑医生";
+      this.$api
+        .getDoctorInfo({
+          id: id,
+        })
+        .then((res) => {
+          this.form = res.data.data;
+          this.open = true;
+        });
+    },
+    /** 提交按钮 */
+    submitForm() {
+      this.$refs["form"].validate((valid) => {
+        if (valid) {
+          if (this.form.id != null) {
+            this.$api.editDoctorInfo(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.addDoctorInfo(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
+          .getDoctorsSearchList({
+            name: query,
+          })
+          .then((res) => {
+            this.doctorList = res.data.data;
+            this.$set(this.doctorList, res.data.data);
+            // this.loading = false;
+          });
+      } else {
+        this.doctorList = [];
+      }
+    },
+  },
+  created() {
+    this.getData();
+    
+  },
+};
+</script>

+ 252 - 0
src/views/anscard/agreementIndex.vue

@@ -0,0 +1,252 @@
+<style lang="scss">
+.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-icon {
+  font-size: 28px;
+  color: #8c939d;
+  width: 178px;
+  height: 178px;
+  line-height: 178px;
+  text-align: center;
+}
+
+.avatar {
+  width: 178px;
+  height: 178px;
+  display: block;
+}
+</style>
+<template>
+  <section class="content">
+    <h4>用户协议列表</h4>
+    <el-divider></el-divider>
+    <!-- <el-form label-width="80px" class="filter-form">
+      <el-row>
+        <el-col :span="4">
+          <el-form-item label="名称">
+            <el-input
+              clearable
+              @clear="getData()"
+              v-model="queryParams.name"
+              placeholder="请输入名称"
+              size="mini"
+            ></el-input>
+          </el-form-item>
+        </el-col>
+        <el-col :span="4">
+          <el-form-item label="手机号">
+            <el-input
+              clearable
+              @clear="getData()"
+              v-model="queryParams.phone"
+              placeholder="请输入手机号"
+              size="mini"
+            ></el-input>
+          </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
+            >
+            <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-column align="center" prop="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
+          >
+        </template>
+      </el-table-column>
+    </el-table>
+    <Page
+      ref="pageButton"
+      :current="form.page"
+      :page_size="form.page_size"
+      :total="total"
+      @pageChange="gopage"
+    />
+    <!-- 新增医生 -->
+    <el-dialog :title="title" :visible.sync="open" width="800px" 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="协议内容">
+            <vue-ueditor-wrap ref="editor" v-model="form.content" :config="myConfig"></vue-ueditor-wrap>
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitForm">确 定</el-button>
+        <el-button @click="open = false">取 消</el-button>
+      </div>
+    </el-dialog>
+  </section>
+</template>
+<script>
+import Page from "../../components/Page";
+import fuEditor from "@/components/fuEditor/index.vue";
+export default {
+  components: {
+    Page,
+    fuEditor
+  },
+  data() {
+    return {
+      loading: false,
+      queryParams: {
+        page: 1,
+      },
+      form: {},
+      form1: {},
+      form2: {},
+      list: [{}, {}],
+      total: 0,
+      title: "新增用户",
+      open: false,
+      doctorList: [],
+      rules: {},
+      myConfig: {
+	      // 编辑器自动被内容撑高
+	      autoHeightEnabled: true,
+	      // 初始容器高度
+	      initialFrameHeight: 500,
+	      // 初始容器宽度
+	      initialFrameWidth: '100%',
+	      // 上传文件接口,实现上传图片功能必须的配置,这个地址会在后端配置的时候产生,此处先放上结果
+	      serverUrl: '/api/admin/ueditor/upload',
+	    },
+    };
+  },
+  methods: {
+    del(id) {
+      this.$confirm("确认删除?", "提示", {
+        type: "warning",
+      }).then(() => {
+        this.$api
+          .delDoctorInfo({
+            id: id,
+          })
+          .then((res) => {
+            if (!res.data.code) {
+              this.$msgSuccess("删除成功");
+              this.getData();
+            } else {
+              this.$msgError(res.data.message);
+            }
+          });
+      });
+    },
+    gopage(size) {
+      if (size) {
+        this.queryParams.page_size = size;
+      }
+      this.queryParams.page = this.$refs.pageButton.page;
+      this.getData();
+    },
+    getData() {
+      this.loading = true;
+      this.$api.getUserAgreementList(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
+        .getUserAgreementInfo({
+          id: id,
+        })
+        .then((res) => {
+          this.form = res.data.data;
+          this.open = true;
+        });
+    },
+    /** 提交按钮 */
+    submitForm() {
+      this.$refs["form"].validate((valid) => {
+        if (valid) {
+          if (this.form.id != null) {
+            this.$api.editUserAgreement(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.addDoctorInfo(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
+          .getDoctorsSearchList({
+            name: query,
+          })
+          .then((res) => {
+            this.doctorList = res.data.data;
+            this.$set(this.doctorList, res.data.data);
+            // this.loading = false;
+          });
+      } else {
+        this.doctorList = [];
+      }
+    },
+  },
+  created() {
+    this.getData();
+  },
+};
+</script>

+ 204 - 0
src/views/anscard/phcodeList.vue

@@ -0,0 +1,204 @@
+<style lang="scss">
+.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-icon {
+  font-size: 28px;
+  color: #8c939d;
+  width: 178px;
+  height: 178px;
+  line-height: 178px;
+  text-align: center;
+}
+
+.avatar {
+  width: 178px;
+  height: 178px;
+  display: block;
+}
+</style>
+<template>
+  <section class="content">
+    <h4>短信记录列表</h4>
+    
+    <el-divider></el-divider>
+    <el-form :inline="true">
+      <el-form-item label="手机号" >
+          <el-input v-model="queryParams.phone" placeholder="请输入手机号"></el-input>
+      </el-form-item>
+      <el-form-item>
+        <el-button @click="getData" type="primary">搜索</el-button>
+      </el-form-item>
+    </el-form>
+    <el-table
+      v-loading="loading"
+      :data="list"
+      style="width: 100%; margin-top: 10px"
+      height="50vh"
+    >
+      <el-table-column align="center" prop="phone" label="手机号" />
+      <el-table-column align="center" prop="code" label="验证码" />
+      <el-table-column align="center" prop="result" label="发送状态">
+          <template slot-scope="scope">
+            <div>
+                <span style="color:green;" v-if="scope.row.result && scope.row.result.indexOf('success') >-1">成功</span>
+                <span v-else="失败">失败:{{scope.row.result}}</span>
+             </div>
+          </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)" size="mini" type="warning"
+            >重新发送</el-button
+          >
+        </template>
+      </el-table-column>
+    </el-table>
+    <Page
+      ref="pageButton"
+      :current="form.page"
+      :page_size="form.page_size"
+      :total="total"
+      @pageChange="gopage"
+    />
+    <!-- 新增医生 -->
+    <el-dialog :title="title" :visible.sync="open" width="800px" 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.phone"
+            placeholder="请输入手机号"
+          ></el-input>
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button @click="open = false">取 消</el-button>
+        <el-button type="primary" @click="submitForm">发 送</el-button>
+      </div>
+    </el-dialog>
+  </section>
+</template>
+<script>
+import Page from "../../components/Page";
+import fuEditor from "@/components/fuEditor/index.vue";
+export default {
+  components: {
+    Page,
+    fuEditor
+  },
+  data() {
+    return {
+      loading: false,
+      queryParams: {
+        page: 1,
+      },
+      form: {},
+      form1: {},
+      form2: {},
+      list: [{}, {}],
+      total: 0,
+      title: "新增用户",
+      open: false,
+      doctorList: [],
+      rules: {},
+      myConfig: {
+	      // 编辑器自动被内容撑高
+	      autoHeightEnabled: true,
+	      // 初始容器高度
+	      initialFrameHeight: 500,
+	      // 初始容器宽度
+	      initialFrameWidth: '100%',
+	      // 上传文件接口,实现上传图片功能必须的配置,这个地址会在后端配置的时候产生,此处先放上结果
+	      serverUrl: '/api/admin/ueditor/upload',
+	    },
+    };
+  },
+  methods: {
+    del(id) {
+      this.$confirm("确认删除?", "提示", {
+        type: "warning",
+      }).then(() => {
+        this.$api
+          .delDoctorInfo({
+            id: id,
+          })
+          .then((res) => {
+            if (!res.data.code) {
+              this.$msgSuccess("删除成功");
+              this.getData();
+            } else {
+              this.$msgError(res.data.message);
+            }
+          });
+      });
+    },
+    gopage(size) {
+      if (size) {
+        this.queryParams.page_size = size;
+      }
+      this.queryParams.page = this.$refs.pageButton.page;
+      this.getData();
+    },
+    getData() {
+      this.loading = true;
+      this.$api.getPhoneRecordList(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(row) {
+      this.title = "重新发送";
+      this.open = true;
+      this.form = row;
+    },
+    /** 提交按钮 */
+    submitForm() {
+      this.$refs["form"].validate((valid) => {
+          this.$api.sendPhoneCode(this.form).then(res=>{
+            if(res.data.data.indexOf("success")>-1){
+              this.$message.success("成功")
+              this.open = false
+              this.getData()
+            }
+          })
+      });
+    },
+    remoteMethod(query) {
+      if (query !== "") {
+        // this.loading = true;
+        this.$api
+          .getDoctorsSearchList({
+            name: query,
+          })
+          .then((res) => {
+            this.doctorList = res.data.data;
+            this.$set(this.doctorList, res.data.data);
+            // this.loading = false;
+          });
+      } else {
+        this.doctorList = [];
+      }
+    },
+  },
+  created() {
+    this.getData();
+  },
+};
+</script>

+ 431 - 0
src/views/barcode/Index.vue

@@ -0,0 +1,431 @@
+<style lang="scss">
+
+</style>
+<template>
+  <section class="content">
+    <div class="breadcrumb">
+      <el-breadcrumb separator="/">
+        <el-breadcrumb-item><a href="/">试卷管理</a></el-breadcrumb-item>
+        <el-breadcrumb-item>条形码制作</el-breadcrumb-item>
+      </el-breadcrumb>
+    </div>
+    <el-form :model="queryParams" label-width="80px" class="filter-form" :inine="true">
+      <el-row>
+        <el-col :span="4">
+          <el-form-item label="名称">
+            <el-input v-model="queryParams.name" size="mini" placeholder="请输入名称"></el-input>
+          </el-form-item>
+        </el-col>
+        <el-col :span="8">
+          <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-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-column align="center" prop="name" label="名称" />
+      <el-table-column align="center" prop="num" label="数量" />
+      <el-table-column align="center" prop="mark" 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="primary">预览</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" />
+    <!-- 新增/编辑 -->
+    <el-dialog title="新增/编辑" :visible.sync="open" width="90%">
+      <el-steps :active="stepNum" simple style="margin-bottom:10px;">
+        <el-step title="选择数据源" icon="el-icon-edit"></el-step>
+        <el-step title="条码制作" icon="el-icon-setting"></el-step>
+        <!-- <el-step title="条码打印" icon="el-icon-printer"></el-step> -->
+      </el-steps>
+      <!-- 第一步 -->
+      <el-row :gutter="20" v-if="stepNum==1">
+        <el-col :span="8">
+          <el-form ref="form" :model="form" :rules="rules" label-width="80px">
+            <el-form-item label="学校" prop="role">
+              <el-select v-model="form.role" placeholder="请选择医生类型" filterable>
+                <el-option v-for="item in $const.doctorRoleList" :key="item.value" :label="item.label"
+                  :value="item.value">
+                </el-option>
+              </el-select>
+            </el-form-item>
+            <el-form-item label="年级" prop="parent_id">
+              <el-select v-model="form.parent_id" placeholder="请输入医生姓名" clearable filterable>
+                <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="parent_id">
+              <el-select v-model="form.parent_id" placeholder="请输入医生姓名" clearable filterable>
+                <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="parent_id" style="display:none;">
+              <el-upload class="upload-demo" drag action="https://jsonplaceholder.typicode.com/posts/" multiple>
+                <i class="el-icon-upload"></i>
+                <div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
+              </el-upload>
+            </el-form-item>
+          </el-form>
+        </el-col>
+        <el-col :span="16">
+          <el-table v-loading="loading" :data="studentList" height="50vh">
+            <el-table-column align="center" prop="exam_num" label="准考证号" />
+            <el-table-column align="center" prop="name" label="姓名" />
+            <el-table-column align="center" prop="exam_room" label="考场号" />
+            <el-table-column align="center" prop="exam_site" label="座位号" />
+            <el-table-column align="center" prop="class" label="班级" />
+            <el-table-column align="center" prop="school" label="学校" />
+            <el-table-column align="center" prop="grade" label="年级" />
+            <!-- <el-table-column align="center" prop="date" label="操作">
+                      <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>
+                      </template>
+                    </el-table-column> -->
+          </el-table>
+        </el-col>
+      </el-row>
+
+      <!-- 第二步 -->
+      <div v-if="stepNum==2" class="stepTwo">
+        <el-form ref="form2" :model="form" :rules="rules" :inline="true">
+          <el-row :gutter="20">
+            <el-col :span="14">
+              <el-row>
+                <el-col :span="6">
+                  <div style="text-align:left;padding-bottom:10px;">前缀</div>
+                  <el-form-item label-width="80px;" v-for="(item,index) in [1,2,3,4,5,6]" ::key="index">
+                    <el-select v-model="form2.posTpl[index].pre" placeholder="请选择" filterable clearable>
+                      <el-option v-for="item in $const.barCodePreList" :key="item.value" :label="item.label"
+                        :value="item.value">
+                      </el-option>
+                    </el-select>
+                  </el-form-item>
+                </el-col>
+                <el-col :span="8">
+                  <div style="text-align:center;padding-bottom:10px;">数据</div>
+                  <el-form-item :label="'位置'+item" prop="role" label-width="80px;" v-for="(item,index) in [1,2,3,4,5,6]"
+                    ::key="index">
+                    <el-select v-model="form2.posTpl[index].data" placeholder="请选择" filterable clearable>
+                      <el-option v-for="item in $const.barCodePosList" :key="item.value" :label="item.label"
+                        :value="item.value">
+                      </el-option>
+                    </el-select>
+                  </el-form-item>
+                </el-col>
+                <el-col :span="8">
+                  <div style="text-align:center;padding-bottom:10px;">后缀</div>
+                  <el-form-item prop="role" label-width="80px;" v-for="(item,index) in [1,2,3,4,5,6]" ::key="index">
+                    <el-select v-model="form2.posTpl[index].back" placeholder="请选择" filterable clearable>
+                      <el-option v-for="item in $const.barCodeBackList" :key="item.value" :label="item.label"
+                        :value="item.value">
+                      </el-option>
+                    </el-select>
+                  </el-form-item>
+                </el-col>
+              </el-row>
+            </el-col>
+            <el-col :span="8">
+              <el-form-item label="字体大小" prop="role">
+                <el-select v-model="form.role" placeholder="请选择" filterable size="mini">
+                  <el-option v-for="item in $const.doctorRoleList" :key="item.value" :label="item.label"
+                    :value="item.value">
+                  </el-option>
+                </el-select>
+              </el-form-item>
+              <div style="position: relative;margin-top:20px;">
+                <img src="../../assets/stdBarCode.png" height="60px" width="220px" alt="">
+                <div class="barcodeTemplate">
+                  <span style="position:absolute;left:0px;top:-20px;">{{pos1}}</span>
+                  <span style="position:absolute;left:90px;top:-20px;">{{pos2}}</span>
+                  <span style="position:absolute;left:160px;top:-20px;">{{pos3}}</span>
+                  <span style="position:absolute;left:0px;top:60px;">{{pos4}}</span>
+                  <span style="position:absolute;left:90px;top:60px;">{{pos5}}</span>
+                  <span style="position:absolute;left:160px;top:60px;">{{pos6}}</span>
+                </div>
+              </div>
+              <div style="margin-top:40px;">
+                <el-form-item prop="role">
+                  <el-button size="mini" type="primary" @click="previewBarcodeFlag=true">预览</el-button>
+                </el-form-item>
+              </div>
+            </el-col>
+          </el-row>
+        </el-form>
+
+      </div>
+      <div slot="footer" class="dialog-footer">
+        <el-button @click="open = false">取 消</el-button>
+        <el-button type="primary" @click="stepNum-=1" v-if="stepNum>1">上一步</el-button>
+        <el-button type="primary" @click="stepNum+=1" v-if="stepNum==1">下一步</el-button>
+        <el-button type="primary" @click="save()" v-if="stepNum==2">保存</el-button>
+      </div>
+      <!-- 预览 -->
+      <el-dialog title="预览/打印" :visible.sync="previewBarcodeFlag" append-to-body width="830px">
+        <div style="width:210mm;height:297mm;border:1px solid #ccc;">
+          <el-button id="printButton" type="primary" icon="el-icon-printer" size="mini"
+           style="position:absolute;left:190mm;top:14mm;" @click="print">打印
+          </el-button>
+          <div v-for="(item,index) in [1,2,3,4,5,6,7,8,9,10]" style="display:inline-block;position: relative;">
+            <div style="
+              position: relative;
+              display: inline-block;
+              width:50mm;
+              height: 20mm;
+              margin-left:2mm;
+              margin-top:1mm;
+              box-shadow: 1px 1px 1px 1px;
+              border-radius: 1mm;
+              top:1mm;">
+              <img src="../../assets/stdBarCode.png" width="100%" style="
+                position:absolute;top:4mm;height: 10mm;width: 46mm;left:2mm;">
+              <div class="barcodeTemplate">
+                <span style="position:absolute;left:2mm;top:-1mm;">位置1</span>
+                <span style="position:absolute;left:70px;top:-1mm;">位置2</span>
+                <span style="position:absolute;left:145px;top:-1mm;">位置3</span>
+                <span style="position:absolute;left:2mm;top:14mm;">位置4</span>
+                <span style="position:absolute;left:70px;top:14mm;">位置5</span>
+                <span style="position:absolute;left:145px;top:14mm;">位置6</span>
+              </div>
+            </div>
+          </div>
+
+        </div>
+      </el-dialog>
+    </el-dialog>
+  </section>
+</template>
+<script>
+  import Page from "../../components/Page";
+  export default {
+    components: {
+      Page,
+    },
+    data() {
+      return {
+        loading: false,
+        queryParams: {
+          page: 1,
+        },
+        form: {},
+        form1: {},
+        form2: {
+          posTpl: [{
+              pre: "",
+              data: "",
+              back: ""
+            },
+            {
+              pre: "",
+              data: "",
+              back: ""
+            },
+            {
+              pre: "",
+              data: "",
+              back: ""
+            },
+            {
+              pre: "",
+              data: "",
+              back: ""
+            },
+            {
+              pre: "",
+              data: "",
+              back: ""
+            },
+            {
+              pre: "",
+              data: "",
+              back: ""
+            }
+          ],
+          pos1: "11"
+        },
+        list: [{}, {}],
+        studentList: [],
+        total: 0,
+        title: "新增用户",
+        open: false,
+        doctorList: [],
+        rules: {},
+        stepNum: 1,
+        previewBarcodeFlag: false
+      };
+    },
+    watch: {
+      form2(val, old) {
+        console.log(val, old, 22222222)
+      }
+    },
+    computed: {
+      pos1(val) {
+        let posTpl = this.form2.posTpl[0];
+        return posTpl.pre + posTpl.data + posTpl.back||"位置1";
+      },
+      pos2(val) {
+        let posTpl = this.form2.posTpl[1];
+        return posTpl.pre + posTpl.data + posTpl.back||"位置2";
+      },
+      pos3(val) {
+        let posTpl = this.form2.posTpl[2];
+        return posTpl.pre + posTpl.data + posTpl.back||"位置3";
+      },
+      pos4(val) {
+        let posTpl = this.form2.posTpl[3];
+        return posTpl.pre + posTpl.data + posTpl.back||"位置4";
+      },
+      pos5(val) {
+        let posTpl = this.form2.posTpl[4];
+        return posTpl.pre + posTpl.data + posTpl.back||"位置5";
+      },
+      pos6(val) {
+        let posTpl = this.form2.posTpl[5];
+        return posTpl.pre + posTpl.data + posTpl.back||"位置6";
+      },
+    },
+    methods: {
+      print() {
+      window.print(); // 调用浏览器的打印功能
+    },
+      del(id) {
+        this.$confirm("确认删除?", "提示", {
+          type: "warning",
+        }).then(() => {
+          this.$api
+            .delDoctorInfo({
+              id: id,
+            })
+            .then((res) => {
+              if (!res.data.code) {
+                this.$msgSuccess("删除成功");
+                this.getData();
+              } else {
+                this.$msgError(res.data.message);
+              }
+            });
+        });
+      },
+      gopage(size) {
+        if (size) {
+          this.queryParams.page_size = size;
+        }
+        this.queryParams.page = this.$refs.pageButton.page;
+        this.getData();
+      },
+      getData() {
+        this.loading = true;
+        this.$api.getDoctorsList(this.queryParams).then((res) => {
+          this.list = res.data.data.list;
+          this.total = res.data.data.total;
+          this.loading = false;
+          this.list = [{
+            name: "人大附中期中考试用条形码",
+            num: 20,
+            mark: "测试",
+            ctime: "2023-11-19 22:44:01"
+          }]
+          this.studentList = [{
+            exam_num: "2023010110",
+            name: "测试学生",
+            exam_room: 20,
+            exam_site: "01",
+            class: "01",
+            school: "人大附中",
+            grade: "09"
+          }]
+        });
+
+        this.$api
+          .getDoctorsSearchList({})
+          .then((res) => {
+            this.doctorList = res.data.data;
+            this.$set(this.doctorList, res.data.data);
+            // this.loading = false;
+          });
+      },
+      handleAdd() {
+        this.open = true;
+        this.title = "新增医生";
+        this.form = {};
+      },
+      edit(id) {
+        this.title = "编辑医生";
+        this.$api
+          .getDoctorInfo({
+            id: id,
+          })
+          .then((res) => {
+            this.form = res.data.data;
+            this.open = true;
+          });
+      },
+      /** 提交按钮 */
+      submitForm() {
+        this.$refs["form"].validate((valid) => {
+          if (valid) {
+            if (this.form.id != null) {
+              this.$api.editDoctorInfo(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.addDoctorInfo(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
+            .getDoctorsSearchList({
+              name: query,
+            })
+            .then((res) => {
+              this.doctorList = res.data.data;
+              this.$set(this.doctorList, res.data.data);
+              // this.loading = false;
+            });
+        } else {
+          this.doctorList = [];
+        }
+      },
+    },
+    created() {
+      this.getData();
+
+    },
+  };
+</script>
+<style lang="scss" scoped>
+  ::v-deep .upload-demo .el-upload-dragger {
+    width: 190px !important;
+  }
+
+  ::v-deep .stepTwo .el-input {
+    width: 100px;
+  }
+</style>

+ 24 - 58
src/views/doctor/Index.vue

@@ -1,60 +1,31 @@
 <style lang="scss">
-.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-icon {
-  font-size: 28px;
-  color: #8c939d;
-  width: 178px;
-  height: 178px;
-  line-height: 178px;
-  text-align: center;
-}
-
-.avatar {
-  width: 178px;
-  height: 178px;
-  display: block;
-}
 </style>
 <template>
   <section class="content">
-    <h4>医生列表</h4>
-    <el-divider></el-divider>
-    <el-form label-width="80px" class="filter-form">
+    <div class="breadcrumb">
+        <el-breadcrumb separator="/">
+            <el-breadcrumb-item><a href="/">师生管理</a></el-breadcrumb-item>
+            <el-breadcrumb-item>教师管理</el-breadcrumb-item>
+        </el-breadcrumb>
+    </div>
+    <el-form :model="queryParams" label-width="80px" class="filter-form" :inine="true">
       <el-row>
         <el-col :span="4">
-          <el-form-item label="名称">
-            <el-input
-              clearable
-              @clear="getData()"
-              v-model="queryParams.name"
-              placeholder="请输入名称"
-              size="mini"
-            ></el-input>
+          <el-form-item label="学校">
+            <el-select size="mini" v-model="queryParams.school_id">
+              <el-option label="人大附中" value="人大附中">人大附中</el-option>
+            </el-select>
           </el-form-item>
         </el-col>
         <el-col :span="4">
-          <el-form-item label="手机号">
-            <el-input
-              clearable
-              @clear="getData()"
-              v-model="queryParams.phone"
-              placeholder="请输入手机号"
-              size="mini"
-            ></el-input>
+          <el-form-item label="年级" v-model="queryParams.grade_id">
+            <el-select size="mini">
+              <el-option label="高三一班" value="高三一班">高三一班</el-option>
+            </el-select>
           </el-form-item>
         </el-col>
-        <el-col :span="4">
+        <el-col :span="8">
           <el-form-item label-width="10" style="margin-left: 10px">
             <el-button type="primary" @click="getData" size="mini"
               >筛选</el-button
@@ -65,7 +36,7 @@
               icon="el-icon-plus"
               size="mini"
               @click="handleAdd"
-              >新增医生</el-button
+              >新增班级</el-button
             >
           </el-form-item>
         </el-col>
@@ -77,23 +48,18 @@
       style="width: 100%; margin-top: 10px"
       height="50vh"
     >
-      <el-table-column align="center" prop="name" label="名称" />
-      <!-- <el-table-column label="图片">
+      <el-table-column align="center" prop="name" label="班级" />
+      <el-table-column align="center" prop="phone" 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>
+          <el-link type="primary">查看</el-link>
         </template>
-      </el-table-column>-->
-      <el-table-column align="center" prop="phone" label="手机号" />
-      <el-table-column label="医生类型">
+      </el-table-column>
+      <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>
+          <el-link type="primary">查看</el-link>
         </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">

+ 291 - 0
src/views/grade/Index.vue

@@ -0,0 +1,291 @@
+<style lang="scss">
+
+</style>
+<template>
+  <section class="content">
+    <div class="breadcrumb">
+        <el-breadcrumb separator="/">
+            <el-breadcrumb-item><a href="/">师生管理</a></el-breadcrumb-item>
+            <el-breadcrumb-item>班级管理</el-breadcrumb-item>
+        </el-breadcrumb>
+    </div>
+    <el-form :model="queryParams" label-width="80px" class="filter-form" :inine="true">
+      <el-row>
+        <el-col :span="4">
+          <el-form-item label="学校">
+            <el-select size="mini" v-model="queryParams.school_id">
+              <el-option label="人大附中" value="人大附中">人大附中</el-option>
+            </el-select>
+          </el-form-item>
+        </el-col>
+        <el-col :span="4">
+          <el-form-item label="年级" v-model="queryParams.grade_id">
+            <el-select size="mini">
+              <el-option label="高三一班" value="高三一班">高三一班</el-option>
+            </el-select>
+          </el-form-item>
+        </el-col>
+        <el-col :span="8">
+          <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-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-column align="center" prop="name" label="班级" />
+      <el-table-column align="center" prop="phone" label="年级" />
+      <el-table-column label="教师">
+        <template slot-scope="scope">
+          <el-link type="primary">查看</el-link>
+        </template>
+      </el-table-column>
+      <el-table-column label="学生">
+        <template slot-scope="scope">
+          <el-link type="primary">查看</el-link>
+        </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
+          >
+        </template>
+      </el-table-column>
+    </el-table>
+    <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="role">
+          <el-select
+            v-model="form.role"
+            placeholder="请选择医生类型"
+            filterable
+          >
+            <el-option
+              v-for="item in $const.doctorRoleList"
+              :key="item.value"
+              :label="item.label"
+              :value="item.value"
+            ></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
+            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
+            v-model="form.hospital_name"
+            placeholder="请输入医院"
+          ></el-input>
+        </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"
+          >
+            <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>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitForm">确 定</el-button>
+        <el-button @click="open = false">取 消</el-button>
+      </div>
+    </el-dialog>
+  </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,
+      doctorList: [],
+      rules: {},
+    };
+  },
+  methods: {
+    del(id) {
+      this.$confirm("确认删除?", "提示", {
+        type: "warning",
+      }).then(() => {
+        this.$api
+          .delDoctorInfo({
+            id: id,
+          })
+          .then((res) => {
+            if (!res.data.code) {
+              this.$msgSuccess("删除成功");
+              this.getData();
+            } else {
+              this.$msgError(res.data.message);
+            }
+          });
+      });
+    },
+    gopage(size) {
+      if (size) {
+        this.queryParams.page_size = size;
+      }
+      this.queryParams.page = this.$refs.pageButton.page;
+      this.getData();
+    },
+    getData() {
+      this.loading = true;
+      this.$api.getDoctorsList(this.queryParams).then((res) => {
+        this.list = res.data.data.list;
+        this.total = res.data.data.total;
+        this.loading = false;
+      });
+
+      this.$api
+          .getDoctorsSearchList({
+          })
+          .then((res) => {
+            this.doctorList = res.data.data;
+            this.$set(this.doctorList, res.data.data);
+            // this.loading = false;
+          });
+    },
+    handleAdd() {
+      this.open = true;
+      this.title = "新增医生";
+      this.form = {};
+    },
+    edit(id) {
+      this.title = "编辑医生";
+      this.$api
+        .getDoctorInfo({
+          id: id,
+        })
+        .then((res) => {
+          this.form = res.data.data;
+          this.open = true;
+        });
+    },
+    /** 提交按钮 */
+    submitForm() {
+      this.$refs["form"].validate((valid) => {
+        if (valid) {
+          if (this.form.id != null) {
+            this.$api.editDoctorInfo(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.addDoctorInfo(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
+          .getDoctorsSearchList({
+            name: query,
+          })
+          .then((res) => {
+            this.doctorList = res.data.data;
+            this.$set(this.doctorList, res.data.data);
+            // this.loading = false;
+          });
+      } else {
+        this.doctorList = [];
+      }
+    },
+  },
+  created() {
+    this.getData();
+    
+  },
+};
+</script>

+ 252 - 0
src/views/grade/agreementIndex.vue

@@ -0,0 +1,252 @@
+<style lang="scss">
+.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-icon {
+  font-size: 28px;
+  color: #8c939d;
+  width: 178px;
+  height: 178px;
+  line-height: 178px;
+  text-align: center;
+}
+
+.avatar {
+  width: 178px;
+  height: 178px;
+  display: block;
+}
+</style>
+<template>
+  <section class="content">
+    <h4>用户协议列表</h4>
+    <el-divider></el-divider>
+    <!-- <el-form label-width="80px" class="filter-form">
+      <el-row>
+        <el-col :span="4">
+          <el-form-item label="名称">
+            <el-input
+              clearable
+              @clear="getData()"
+              v-model="queryParams.name"
+              placeholder="请输入名称"
+              size="mini"
+            ></el-input>
+          </el-form-item>
+        </el-col>
+        <el-col :span="4">
+          <el-form-item label="手机号">
+            <el-input
+              clearable
+              @clear="getData()"
+              v-model="queryParams.phone"
+              placeholder="请输入手机号"
+              size="mini"
+            ></el-input>
+          </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
+            >
+            <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-column align="center" prop="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
+          >
+        </template>
+      </el-table-column>
+    </el-table>
+    <Page
+      ref="pageButton"
+      :current="form.page"
+      :page_size="form.page_size"
+      :total="total"
+      @pageChange="gopage"
+    />
+    <!-- 新增医生 -->
+    <el-dialog :title="title" :visible.sync="open" width="800px" 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="协议内容">
+            <vue-ueditor-wrap ref="editor" v-model="form.content" :config="myConfig"></vue-ueditor-wrap>
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitForm">确 定</el-button>
+        <el-button @click="open = false">取 消</el-button>
+      </div>
+    </el-dialog>
+  </section>
+</template>
+<script>
+import Page from "../../components/Page";
+import fuEditor from "@/components/fuEditor/index.vue";
+export default {
+  components: {
+    Page,
+    fuEditor
+  },
+  data() {
+    return {
+      loading: false,
+      queryParams: {
+        page: 1,
+      },
+      form: {},
+      form1: {},
+      form2: {},
+      list: [{}, {}],
+      total: 0,
+      title: "新增用户",
+      open: false,
+      doctorList: [],
+      rules: {},
+      myConfig: {
+	      // 编辑器自动被内容撑高
+	      autoHeightEnabled: true,
+	      // 初始容器高度
+	      initialFrameHeight: 500,
+	      // 初始容器宽度
+	      initialFrameWidth: '100%',
+	      // 上传文件接口,实现上传图片功能必须的配置,这个地址会在后端配置的时候产生,此处先放上结果
+	      serverUrl: '/api/admin/ueditor/upload',
+	    },
+    };
+  },
+  methods: {
+    del(id) {
+      this.$confirm("确认删除?", "提示", {
+        type: "warning",
+      }).then(() => {
+        this.$api
+          .delDoctorInfo({
+            id: id,
+          })
+          .then((res) => {
+            if (!res.data.code) {
+              this.$msgSuccess("删除成功");
+              this.getData();
+            } else {
+              this.$msgError(res.data.message);
+            }
+          });
+      });
+    },
+    gopage(size) {
+      if (size) {
+        this.queryParams.page_size = size;
+      }
+      this.queryParams.page = this.$refs.pageButton.page;
+      this.getData();
+    },
+    getData() {
+      this.loading = true;
+      this.$api.getUserAgreementList(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
+        .getUserAgreementInfo({
+          id: id,
+        })
+        .then((res) => {
+          this.form = res.data.data;
+          this.open = true;
+        });
+    },
+    /** 提交按钮 */
+    submitForm() {
+      this.$refs["form"].validate((valid) => {
+        if (valid) {
+          if (this.form.id != null) {
+            this.$api.editUserAgreement(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.addDoctorInfo(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
+          .getDoctorsSearchList({
+            name: query,
+          })
+          .then((res) => {
+            this.doctorList = res.data.data;
+            this.$set(this.doctorList, res.data.data);
+            // this.loading = false;
+          });
+      } else {
+        this.doctorList = [];
+      }
+    },
+  },
+  created() {
+    this.getData();
+  },
+};
+</script>

+ 204 - 0
src/views/grade/phcodeList.vue

@@ -0,0 +1,204 @@
+<style lang="scss">
+.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-icon {
+  font-size: 28px;
+  color: #8c939d;
+  width: 178px;
+  height: 178px;
+  line-height: 178px;
+  text-align: center;
+}
+
+.avatar {
+  width: 178px;
+  height: 178px;
+  display: block;
+}
+</style>
+<template>
+  <section class="content">
+    <h4>短信记录列表</h4>
+    
+    <el-divider></el-divider>
+    <el-form :inline="true">
+      <el-form-item label="手机号" >
+          <el-input v-model="queryParams.phone" placeholder="请输入手机号"></el-input>
+      </el-form-item>
+      <el-form-item>
+        <el-button @click="getData" type="primary">搜索</el-button>
+      </el-form-item>
+    </el-form>
+    <el-table
+      v-loading="loading"
+      :data="list"
+      style="width: 100%; margin-top: 10px"
+      height="50vh"
+    >
+      <el-table-column align="center" prop="phone" label="手机号" />
+      <el-table-column align="center" prop="code" label="验证码" />
+      <el-table-column align="center" prop="result" label="发送状态">
+          <template slot-scope="scope">
+            <div>
+                <span style="color:green;" v-if="scope.row.result && scope.row.result.indexOf('success') >-1">成功</span>
+                <span v-else="失败">失败:{{scope.row.result}}</span>
+             </div>
+          </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)" size="mini" type="warning"
+            >重新发送</el-button
+          >
+        </template>
+      </el-table-column>
+    </el-table>
+    <Page
+      ref="pageButton"
+      :current="form.page"
+      :page_size="form.page_size"
+      :total="total"
+      @pageChange="gopage"
+    />
+    <!-- 新增医生 -->
+    <el-dialog :title="title" :visible.sync="open" width="800px" 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.phone"
+            placeholder="请输入手机号"
+          ></el-input>
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button @click="open = false">取 消</el-button>
+        <el-button type="primary" @click="submitForm">发 送</el-button>
+      </div>
+    </el-dialog>
+  </section>
+</template>
+<script>
+import Page from "../../components/Page";
+import fuEditor from "@/components/fuEditor/index.vue";
+export default {
+  components: {
+    Page,
+    fuEditor
+  },
+  data() {
+    return {
+      loading: false,
+      queryParams: {
+        page: 1,
+      },
+      form: {},
+      form1: {},
+      form2: {},
+      list: [{}, {}],
+      total: 0,
+      title: "新增用户",
+      open: false,
+      doctorList: [],
+      rules: {},
+      myConfig: {
+	      // 编辑器自动被内容撑高
+	      autoHeightEnabled: true,
+	      // 初始容器高度
+	      initialFrameHeight: 500,
+	      // 初始容器宽度
+	      initialFrameWidth: '100%',
+	      // 上传文件接口,实现上传图片功能必须的配置,这个地址会在后端配置的时候产生,此处先放上结果
+	      serverUrl: '/api/admin/ueditor/upload',
+	    },
+    };
+  },
+  methods: {
+    del(id) {
+      this.$confirm("确认删除?", "提示", {
+        type: "warning",
+      }).then(() => {
+        this.$api
+          .delDoctorInfo({
+            id: id,
+          })
+          .then((res) => {
+            if (!res.data.code) {
+              this.$msgSuccess("删除成功");
+              this.getData();
+            } else {
+              this.$msgError(res.data.message);
+            }
+          });
+      });
+    },
+    gopage(size) {
+      if (size) {
+        this.queryParams.page_size = size;
+      }
+      this.queryParams.page = this.$refs.pageButton.page;
+      this.getData();
+    },
+    getData() {
+      this.loading = true;
+      this.$api.getPhoneRecordList(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(row) {
+      this.title = "重新发送";
+      this.open = true;
+      this.form = row;
+    },
+    /** 提交按钮 */
+    submitForm() {
+      this.$refs["form"].validate((valid) => {
+          this.$api.sendPhoneCode(this.form).then(res=>{
+            if(res.data.data.indexOf("success")>-1){
+              this.$message.success("成功")
+              this.open = false
+              this.getData()
+            }
+          })
+      });
+    },
+    remoteMethod(query) {
+      if (query !== "") {
+        // this.loading = true;
+        this.$api
+          .getDoctorsSearchList({
+            name: query,
+          })
+          .then((res) => {
+            this.doctorList = res.data.data;
+            this.$set(this.doctorList, res.data.data);
+            // this.loading = false;
+          });
+      } else {
+        this.doctorList = [];
+      }
+    },
+  },
+  created() {
+    this.getData();
+  },
+};
+</script>

+ 291 - 0
src/views/papers.1/Index.vue

@@ -0,0 +1,291 @@
+<style lang="scss">
+
+</style>
+<template>
+  <section class="content">
+    <div class="breadcrumb">
+        <el-breadcrumb separator="/">
+            <el-breadcrumb-item><a href="/">试卷管理</a></el-breadcrumb-item>
+            <el-breadcrumb-item>试卷模板</el-breadcrumb-item>
+        </el-breadcrumb>
+    </div>
+    <el-form :model="queryParams" label-width="80px" class="filter-form" :inine="true">
+      <el-row>
+        <el-col :span="4">
+          <el-form-item label="学校">
+            <el-select size="mini" v-model="queryParams.school_id">
+              <el-option label="人大附中" value="人大附中">人大附中</el-option>
+            </el-select>
+          </el-form-item>
+        </el-col>
+        <el-col :span="4">
+          <el-form-item label="年级" v-model="queryParams.grade_id">
+            <el-select size="mini">
+              <el-option label="高三一班" value="高三一班">高三一班</el-option>
+            </el-select>
+          </el-form-item>
+        </el-col>
+        <el-col :span="8">
+          <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-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-column align="center" prop="name" label="班级" />
+      <el-table-column align="center" prop="phone" label="年级" />
+      <el-table-column label="教师">
+        <template slot-scope="scope">
+          <el-link type="primary">查看</el-link>
+        </template>
+      </el-table-column>
+      <el-table-column label="学生">
+        <template slot-scope="scope">
+          <el-link type="primary">查看</el-link>
+        </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
+          >
+        </template>
+      </el-table-column>
+    </el-table>
+    <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="role">
+          <el-select
+            v-model="form.role"
+            placeholder="请选择医生类型"
+            filterable
+          >
+            <el-option
+              v-for="item in $const.doctorRoleList"
+              :key="item.value"
+              :label="item.label"
+              :value="item.value"
+            ></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
+            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
+            v-model="form.hospital_name"
+            placeholder="请输入医院"
+          ></el-input>
+        </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"
+          >
+            <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>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitForm">确 定</el-button>
+        <el-button @click="open = false">取 消</el-button>
+      </div>
+    </el-dialog>
+  </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,
+      doctorList: [],
+      rules: {},
+    };
+  },
+  methods: {
+    del(id) {
+      this.$confirm("确认删除?", "提示", {
+        type: "warning",
+      }).then(() => {
+        this.$api
+          .delDoctorInfo({
+            id: id,
+          })
+          .then((res) => {
+            if (!res.data.code) {
+              this.$msgSuccess("删除成功");
+              this.getData();
+            } else {
+              this.$msgError(res.data.message);
+            }
+          });
+      });
+    },
+    gopage(size) {
+      if (size) {
+        this.queryParams.page_size = size;
+      }
+      this.queryParams.page = this.$refs.pageButton.page;
+      this.getData();
+    },
+    getData() {
+      this.loading = true;
+      this.$api.getDoctorsList(this.queryParams).then((res) => {
+        this.list = res.data.data.list;
+        this.total = res.data.data.total;
+        this.loading = false;
+      });
+
+      this.$api
+          .getDoctorsSearchList({
+          })
+          .then((res) => {
+            this.doctorList = res.data.data;
+            this.$set(this.doctorList, res.data.data);
+            // this.loading = false;
+          });
+    },
+    handleAdd() {
+      this.open = true;
+      this.title = "新增医生";
+      this.form = {};
+    },
+    edit(id) {
+      this.title = "编辑医生";
+      this.$api
+        .getDoctorInfo({
+          id: id,
+        })
+        .then((res) => {
+          this.form = res.data.data;
+          this.open = true;
+        });
+    },
+    /** 提交按钮 */
+    submitForm() {
+      this.$refs["form"].validate((valid) => {
+        if (valid) {
+          if (this.form.id != null) {
+            this.$api.editDoctorInfo(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.addDoctorInfo(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
+          .getDoctorsSearchList({
+            name: query,
+          })
+          .then((res) => {
+            this.doctorList = res.data.data;
+            this.$set(this.doctorList, res.data.data);
+            // this.loading = false;
+          });
+      } else {
+        this.doctorList = [];
+      }
+    },
+  },
+  created() {
+    this.getData();
+    
+  },
+};
+</script>

+ 252 - 0
src/views/papers.1/agreementIndex.vue

@@ -0,0 +1,252 @@
+<style lang="scss">
+.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-icon {
+  font-size: 28px;
+  color: #8c939d;
+  width: 178px;
+  height: 178px;
+  line-height: 178px;
+  text-align: center;
+}
+
+.avatar {
+  width: 178px;
+  height: 178px;
+  display: block;
+}
+</style>
+<template>
+  <section class="content">
+    <h4>用户协议列表</h4>
+    <el-divider></el-divider>
+    <!-- <el-form label-width="80px" class="filter-form">
+      <el-row>
+        <el-col :span="4">
+          <el-form-item label="名称">
+            <el-input
+              clearable
+              @clear="getData()"
+              v-model="queryParams.name"
+              placeholder="请输入名称"
+              size="mini"
+            ></el-input>
+          </el-form-item>
+        </el-col>
+        <el-col :span="4">
+          <el-form-item label="手机号">
+            <el-input
+              clearable
+              @clear="getData()"
+              v-model="queryParams.phone"
+              placeholder="请输入手机号"
+              size="mini"
+            ></el-input>
+          </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
+            >
+            <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-column align="center" prop="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
+          >
+        </template>
+      </el-table-column>
+    </el-table>
+    <Page
+      ref="pageButton"
+      :current="form.page"
+      :page_size="form.page_size"
+      :total="total"
+      @pageChange="gopage"
+    />
+    <!-- 新增医生 -->
+    <el-dialog :title="title" :visible.sync="open" width="800px" 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="协议内容">
+            <vue-ueditor-wrap ref="editor" v-model="form.content" :config="myConfig"></vue-ueditor-wrap>
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitForm">确 定</el-button>
+        <el-button @click="open = false">取 消</el-button>
+      </div>
+    </el-dialog>
+  </section>
+</template>
+<script>
+import Page from "../../components/Page";
+import fuEditor from "@/components/fuEditor/index.vue";
+export default {
+  components: {
+    Page,
+    fuEditor
+  },
+  data() {
+    return {
+      loading: false,
+      queryParams: {
+        page: 1,
+      },
+      form: {},
+      form1: {},
+      form2: {},
+      list: [{}, {}],
+      total: 0,
+      title: "新增用户",
+      open: false,
+      doctorList: [],
+      rules: {},
+      myConfig: {
+	      // 编辑器自动被内容撑高
+	      autoHeightEnabled: true,
+	      // 初始容器高度
+	      initialFrameHeight: 500,
+	      // 初始容器宽度
+	      initialFrameWidth: '100%',
+	      // 上传文件接口,实现上传图片功能必须的配置,这个地址会在后端配置的时候产生,此处先放上结果
+	      serverUrl: '/api/admin/ueditor/upload',
+	    },
+    };
+  },
+  methods: {
+    del(id) {
+      this.$confirm("确认删除?", "提示", {
+        type: "warning",
+      }).then(() => {
+        this.$api
+          .delDoctorInfo({
+            id: id,
+          })
+          .then((res) => {
+            if (!res.data.code) {
+              this.$msgSuccess("删除成功");
+              this.getData();
+            } else {
+              this.$msgError(res.data.message);
+            }
+          });
+      });
+    },
+    gopage(size) {
+      if (size) {
+        this.queryParams.page_size = size;
+      }
+      this.queryParams.page = this.$refs.pageButton.page;
+      this.getData();
+    },
+    getData() {
+      this.loading = true;
+      this.$api.getUserAgreementList(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
+        .getUserAgreementInfo({
+          id: id,
+        })
+        .then((res) => {
+          this.form = res.data.data;
+          this.open = true;
+        });
+    },
+    /** 提交按钮 */
+    submitForm() {
+      this.$refs["form"].validate((valid) => {
+        if (valid) {
+          if (this.form.id != null) {
+            this.$api.editUserAgreement(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.addDoctorInfo(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
+          .getDoctorsSearchList({
+            name: query,
+          })
+          .then((res) => {
+            this.doctorList = res.data.data;
+            this.$set(this.doctorList, res.data.data);
+            // this.loading = false;
+          });
+      } else {
+        this.doctorList = [];
+      }
+    },
+  },
+  created() {
+    this.getData();
+  },
+};
+</script>

+ 204 - 0
src/views/papers.1/phcodeList.vue

@@ -0,0 +1,204 @@
+<style lang="scss">
+.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-icon {
+  font-size: 28px;
+  color: #8c939d;
+  width: 178px;
+  height: 178px;
+  line-height: 178px;
+  text-align: center;
+}
+
+.avatar {
+  width: 178px;
+  height: 178px;
+  display: block;
+}
+</style>
+<template>
+  <section class="content">
+    <h4>短信记录列表</h4>
+    
+    <el-divider></el-divider>
+    <el-form :inline="true">
+      <el-form-item label="手机号" >
+          <el-input v-model="queryParams.phone" placeholder="请输入手机号"></el-input>
+      </el-form-item>
+      <el-form-item>
+        <el-button @click="getData" type="primary">搜索</el-button>
+      </el-form-item>
+    </el-form>
+    <el-table
+      v-loading="loading"
+      :data="list"
+      style="width: 100%; margin-top: 10px"
+      height="50vh"
+    >
+      <el-table-column align="center" prop="phone" label="手机号" />
+      <el-table-column align="center" prop="code" label="验证码" />
+      <el-table-column align="center" prop="result" label="发送状态">
+          <template slot-scope="scope">
+            <div>
+                <span style="color:green;" v-if="scope.row.result && scope.row.result.indexOf('success') >-1">成功</span>
+                <span v-else="失败">失败:{{scope.row.result}}</span>
+             </div>
+          </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)" size="mini" type="warning"
+            >重新发送</el-button
+          >
+        </template>
+      </el-table-column>
+    </el-table>
+    <Page
+      ref="pageButton"
+      :current="form.page"
+      :page_size="form.page_size"
+      :total="total"
+      @pageChange="gopage"
+    />
+    <!-- 新增医生 -->
+    <el-dialog :title="title" :visible.sync="open" width="800px" 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.phone"
+            placeholder="请输入手机号"
+          ></el-input>
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button @click="open = false">取 消</el-button>
+        <el-button type="primary" @click="submitForm">发 送</el-button>
+      </div>
+    </el-dialog>
+  </section>
+</template>
+<script>
+import Page from "../../components/Page";
+import fuEditor from "@/components/fuEditor/index.vue";
+export default {
+  components: {
+    Page,
+    fuEditor
+  },
+  data() {
+    return {
+      loading: false,
+      queryParams: {
+        page: 1,
+      },
+      form: {},
+      form1: {},
+      form2: {},
+      list: [{}, {}],
+      total: 0,
+      title: "新增用户",
+      open: false,
+      doctorList: [],
+      rules: {},
+      myConfig: {
+	      // 编辑器自动被内容撑高
+	      autoHeightEnabled: true,
+	      // 初始容器高度
+	      initialFrameHeight: 500,
+	      // 初始容器宽度
+	      initialFrameWidth: '100%',
+	      // 上传文件接口,实现上传图片功能必须的配置,这个地址会在后端配置的时候产生,此处先放上结果
+	      serverUrl: '/api/admin/ueditor/upload',
+	    },
+    };
+  },
+  methods: {
+    del(id) {
+      this.$confirm("确认删除?", "提示", {
+        type: "warning",
+      }).then(() => {
+        this.$api
+          .delDoctorInfo({
+            id: id,
+          })
+          .then((res) => {
+            if (!res.data.code) {
+              this.$msgSuccess("删除成功");
+              this.getData();
+            } else {
+              this.$msgError(res.data.message);
+            }
+          });
+      });
+    },
+    gopage(size) {
+      if (size) {
+        this.queryParams.page_size = size;
+      }
+      this.queryParams.page = this.$refs.pageButton.page;
+      this.getData();
+    },
+    getData() {
+      this.loading = true;
+      this.$api.getPhoneRecordList(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(row) {
+      this.title = "重新发送";
+      this.open = true;
+      this.form = row;
+    },
+    /** 提交按钮 */
+    submitForm() {
+      this.$refs["form"].validate((valid) => {
+          this.$api.sendPhoneCode(this.form).then(res=>{
+            if(res.data.data.indexOf("success")>-1){
+              this.$message.success("成功")
+              this.open = false
+              this.getData()
+            }
+          })
+      });
+    },
+    remoteMethod(query) {
+      if (query !== "") {
+        // this.loading = true;
+        this.$api
+          .getDoctorsSearchList({
+            name: query,
+          })
+          .then((res) => {
+            this.doctorList = res.data.data;
+            this.$set(this.doctorList, res.data.data);
+            // this.loading = false;
+          });
+      } else {
+        this.doctorList = [];
+      }
+    },
+  },
+  created() {
+    this.getData();
+  },
+};
+</script>

+ 266 - 0
src/views/papers/Index.vue

@@ -0,0 +1,266 @@
+<style lang="scss">
+
+</style>
+<template>
+  <section class="content">
+    <div class="breadcrumb">
+      <el-breadcrumb separator="/">
+        <el-breadcrumb-item><a href="/">试卷管理</a></el-breadcrumb-item>
+        <el-breadcrumb-item>试卷模板</el-breadcrumb-item>
+      </el-breadcrumb>
+    </div>
+    <el-form :model="queryParams" label-width="80px" class="filter-form" :inine="true">
+      <el-row>
+        <el-col :span="4">
+          <el-form-item label="名称" size="mini">
+            <el-input v-model="queryParams.name"></el-input>
+          </el-form-item>
+        </el-col>
+        <el-col :span="8">
+          <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-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-column align="center" prop="name" label="名称" />
+      <el-table-column align="center" prop="subject" label="科目" />
+      <el-table-column align="center" prop="size" label="尺寸" />
+      <el-table-column align="center" prop="num" 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>
+        </template>
+      </el-table-column>
+    </el-table>
+    <Page ref="pageButton" :current="form.page" :page_size="form.page_size" :total="total" @pageChange="gopage" />
+    <!-- 新增/编辑 -->
+    <el-dialog title="新增试卷模板" :visible.sync="open" width="50%" 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="role">
+          <el-select v-model="form.subject" placeholder="请选择科目" filterable>
+            <el-option v-for="item in $const.subjectList" :key="item.value" :label="item.label" :value="item.value">
+            </el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="试卷尺寸" prop="parent_id">
+          <el-select v-model="form.size" placeholder="请输入尺寸" clearable filterable size="mini">
+            <el-option v-for="item in $const.paperSizeList" :key="item.value" :label="item.label" :value="item.value">
+            </el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="试卷图片" prop>
+          <el-upload
+            class="upload-demo"
+            action="/api/admin/uploadfile"
+            :on-preview="handlePreview"
+            :on-remove="handleRemove"
+            :on-success="handleSuccess"
+            :file-list="fileList"
+            list-type="picture">
+            <el-button size="small" type="primary">点击上传</el-button>
+            <div slot="tip" class="el-upload__tip">只能上传jpg/png文件,且不超过500kb</div>
+          </el-upload>
+        </el-form-item>
+      </el-form>
+      <!-- 第二步 -->
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitForm">确 定</el-button>
+        <el-button @click="open = false">取 消</el-button>
+      </div>
+    </el-dialog>
+  </section>
+</template>
+<script>
+  import Page from "../../components/Page";
+  import Cropper from 'cropperjs'
+  import 'cropperjs/dist/cropper.css'
+  export default {
+    components: {
+      Page,
+    },
+    data() {
+      return {
+        loading: false,
+        queryParams: {
+          page: 1,
+        },
+        form: {},
+        form1: {},
+        form2: {},
+        list: [{}, {}],
+        total: 0,
+        title: "新增用户",
+        open: false,
+        doctorList: [],
+        rules: {},
+        stepNum: 2,
+        fileList:[]
+      };
+    },
+    methods: {
+      del(id) {
+        this.$confirm("确认删除?", "提示", {
+          type: "warning",
+        }).then(() => {
+          this.$api
+            .delPaperInfo({
+              id: id,
+            })
+            .then((res) => {
+              if (!res.data.code) {
+                this.$msgSuccess("删除成功");
+                this.getData();
+              } else {
+                this.$msgError(res.data.message);
+              }
+            });
+        });
+      },
+      gopage(size) {
+        if (size) {
+          this.queryParams.page_size = size;
+        }
+        this.queryParams.page = this.$refs.pageButton.page;
+        this.getData();
+      },
+      getData() {
+        this.loading = true;
+        this.$api.getPapersList(this.queryParams).then((res) => {
+          this.list = res.data.data.list;
+          this.total = res.data.data.total;
+          this.loading = false;
+        });
+
+        this.$api
+          .getDoctorsSearchList({})
+          .then((res) => {
+            this.doctorList = res.data.data;
+            this.$set(this.doctorList, res.data.data);
+            // this.loading = false;
+          });
+      },
+      handleAdd() {
+        this.open = true;
+        this.title = "新增医生";
+        this.form = {};
+        // this.initCropper();
+      },
+      handleSuccess(res){
+        console.log(res,222222222222)
+        this.fileList.push(res.data.url)
+        console.log(this.fileList)
+      },
+      edit(id) {
+        this.title = "编辑医生";
+        this.$router.push({path:"/papertpl/cutpaper",query:{id:id}})
+      },
+      /** 提交按钮 */
+      submitForm() {
+        this.$refs["form"].validate((valid) => {
+          this.form.imgs = JSON.stringify(this.fileList)
+          if (valid) {
+            if (this.form.id != null) {
+              this.$api.editPaperInfo(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.addPaperInfo(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
+            .getDoctorsSearchList({
+              name: query,
+            })
+            .then((res) => {
+              this.doctorList = res.data.data;
+              this.$set(this.doctorList, res.data.data);
+              // this.loading = false;
+            });
+        } else {
+          this.doctorList = [];
+        }
+      },
+      initCropper() {
+        let that = this;
+        this.$nextTick(function () {
+          let imgObj = this.$refs.image;
+          that.myCropper = new Cropper(imgObj, {
+            viewMode: 0,
+            dragMode: "crop",
+            autoCrop: false,
+            initialAspectRatio: 1,
+            // aspectRatio: 1,
+            preview: '.before',
+            background: false,
+            autoCropArea: 0.6,
+            zoomOnWheel: true,
+            cropBoxResizable:true,
+            movable:true,
+            ready: function () {
+              // self.croppable = true;
+              // this.cropperCutImg = this.cropper.getCroppedCanvas({ width: 1310 }).toDataURL("image/jpeg")
+              // console.log(this.cropperCutImg,333333333)
+              document.addEventListener('keydown',function(e){
+                console.log(555555555)
+                console.log(e)
+                if(e.keyCode==32){
+                  console.log(44444444)
+                  that.myCropper.setDragMode("move");
+                }
+              })
+              document.addEventListener('keyup',function(e){
+                if(e.keyCode==32){
+                  that.myCropper.setDragMode("crop");
+                  // that.myCropper.clear()
+                }
+              })
+            },
+            cropstart:function(e){
+            },
+            cropend:function(e){
+              let cropData = that.myCropper.getCropBoxData();
+              that.myCropper.clear()
+            },
+            crop(){
+              let cropData = that.myCropper.getCropBoxData();
+            }
+          })
+        })
+      }
+    },
+    created() {
+      this.getData();
+
+    },
+    mounted() {
+      this.initCropper();
+    }
+  };
+</script>

+ 400 - 0
src/views/papers/cutPaper.vue

@@ -0,0 +1,400 @@
+<template>
+  <section class="content">
+    <div class="breadcrumb">
+      <el-breadcrumb separator="/">
+        <el-breadcrumb-item><a href="/">试卷管理</a></el-breadcrumb-item>
+        <el-breadcrumb-item>试卷模板</el-breadcrumb-item>
+      </el-breadcrumb>
+    </div>
+    <el-row :gutter="20" style="margin-bottom:10px;">
+      <el-col :span="18">
+          <el-steps :active="stepNum" simple>
+            <el-step title="定标准点" icon="el-icon-edit"></el-step>
+            <el-step title="考号区域" icon="el-icon-upload"></el-step>
+            <el-step title="客观题" icon="el-icon-picture"></el-step>
+          </el-steps>
+      </el-col>
+      <el-col :span="6">
+          <el-button size="mini" type="primary" v-if="stepNum > 1" @click="stepNum-=1">上一步</el-button>
+          <el-button size="mini" type="primary" v-if="stepNum < 3" @click="stepNum+=1">下一步</el-button>
+      </el-col>
+    </el-row>
+    <el-row>
+      <el-col :span="4">
+        <div style="padding:0px 10px;">
+          <img width="100%" src="http://118.190.145.217/demo.png" />
+        </div>
+      </el-col>
+      <el-col :span="14" style="background:#fff;">
+        <img id="image" ref="image" width="100%" src="http://118.190.145.217/demo.png" />
+      </el-col>
+      <el-col :span="6">
+        <div style="padding:0px 10px;overflow-y: auto;height: 450px;">
+          <el-card class="box-card" v-if="stepNum==1">
+            <div slot="header" class="clearfix">
+              <span>选取标准点</span>
+            </div>
+            <el-image height="60px" width="100%" :src="stdPointImg" :preview-src-list="[stdPointImg]"></el-image>
+          </el-card>
+          <el-card class="box-card" v-if="stepNum==2">
+            <div slot="header" class="clearfix">
+              <span>标注考号区域</span>
+            </div>
+            <el-image height="60px" width="100%" :src="snoImg" :preview-src-list="[snoImg]"></el-image>
+          </el-card>
+          <el-card class="box-card" v-if="stepNum==3">
+            <div slot="header" class="clearfix">
+              <span>标注客观题</span>
+            </div>
+            <div v-for="(item,index) in ansCardImgList" >
+                <div style="margin-bottom:10px;">
+                    <i class="el-icon-delete" @click="ansCardImgList.splice(index,1)" style="float:right;color:red;cursor: pointer;"></i>
+                    <i class="el-icon-edit" @click="editAnsCard(item)"  style="float:right;color:blue;margin-right:20px;cursor: pointer;"></i>
+                    <div class="clear"></div>
+                </div>
+                <el-image style="margin-bottom:20px 0px;border:1px solid #ccc;" width="100%" :src="item" :preview-src-list="[item]"></el-image>
+              
+            </div>
+          </el-card>
+        </div>
+      </el-col>
+    </el-row>
+    <!-- 客观题设置 -->
+    <el-dialog title="客观题设置" :visible.sync="open" width="90%" append-to-body>
+        <el-row :gutter="20">
+            
+            <el-col :span="12">
+                <h4>题目设置</h4>
+                <div class="tag-group">
+                  <span class="tag-group__title">填涂选项:</span>
+                  <el-tag
+                    v-for="item in ansOptionList"
+                    :key="item.label"
+                    type="success"
+                    :effect="item.value==0?'plain':'dark'"
+                    @click="item.value=!item.value"
+                    >
+                    {{ item.label }}
+                  </el-tag>
+                </div>
+                <div style="margin-top:10px;">
+                  <span class="tag-group__title">选项方向:</span>
+                  <el-radio v-model="optionDir" :label="1" :value="1">横向</el-radio>
+                  <el-radio v-model="optionDir" :label="2" :value="2">纵向</el-radio>
+                </div>
+                <div style="margin-top:10px;">
+                  <span class="tag-group__title">题号方向:</span>
+                  <el-radio v-model="queDir" :label="1" :value="1">横向</el-radio>
+                  <el-radio v-model="queDir" :label="2" :value="2">纵向</el-radio>
+                </div>
+                <div style="margin-top:10px;" class="setScoreForm">
+                  <span class="tag-group__title">分数设置:</span>
+                  <el-form :inline="true" v-model="addQueForm">
+                    <el-form-item label="题号">
+                      <el-input size="mini" v-model="addQueForm.fQno"></el-input>
+                    </el-form-item>
+                    <el-form-item label="至">
+                        <el-input size="mini" v-model="addQueForm.tQno"></el-input>
+                    </el-form-item>
+                    <el-form-item label="分数">
+                        <el-input size="mini" v-model="addQueForm.score"></el-input>
+                    </el-form-item>
+                    <el-form-item label="题型">
+                        <el-select size="mini" v-model="addQueForm.qtype">
+                          <el-option label="单选" value="单选">单选</el-option>
+                          <el-option label="多选" value="多选">多选</el-option>
+                        </el-select>
+                    </el-form-item>
+                    <el-form-item>
+                        <el-button size="mini" type="primary" @click="addQues">添加</el-button>
+                    </el-form-item>
+                  </el-form>
+                  <el-row :gutter="20">
+                    <el-col :span="4">题号</el-col>
+                    <el-col :span="4">分数</el-col>
+                    <el-col :span="4">题型</el-col>
+                    <el-col :span="10">标准答案</el-col>
+                  </el-row>
+
+                  <el-row :gutter="20" v-for="(item,index) in stdQueList">
+                    <el-col :span="4">
+                        <el-input size="mini" v-model="item.qno"></el-input>
+                    </el-col>
+                    <el-col :span="4">
+                        <el-input size="mini" v-model="item.score"></el-input>
+                    </el-col>
+                    <el-col :span="4">
+                        <el-select size="mini" v-model="item.qtype">
+                            <el-option label="单选" value="单选">单选</el-option>
+                            <el-option label="多选" value="多选">多选</el-option>
+                          </el-select>
+                    </el-col>
+                    <el-col :span="4">
+                        <div class="tag-group">
+                            <el-select size="mini" v-model="item.stdAns">
+                                <el-option :label="item.label" :value="item.value" v-for="(item,index) in $const.ansOptionList"></el-option>
+                            </el-select>
+                          </div>
+                    </el-col>
+                    <el-col :span="4">
+                      <el-button type="danger" size="mini" @click="stdQueList.splice(1,1)">删除</el-button>
+                    </el-col>
+                  </el-row>
+                </div>
+            </el-col>
+            <el-col :span="12">
+                <h4>答题卡预览</h4>
+                <el-image v-if="recCurAnsImg" :src="recCurAnsImg" v-loading="ansImgLoading"></el-image>
+                <el-image v-else :src="curAnsImg" v-loading="ansImgLoading"></el-image>
+                <el-button style="float:right;margin-top:20px;" type="primary" @click="tryRecPaper" size="mini">识别测试</el-button>
+              </el-col>
+        </el-row>
+        <div slot="footer" class="dialog-footer">
+            <el-button @click="open = false">取 消</el-button>
+            <el-button type="primary" @click="submitForm">保 存</el-button>
+        </div>
+    </el-dialog>
+  </section>
+</template>
+<script>
+  import Page from "../../components/Page";
+  import Cropper from 'cropperjs'
+  import 'cropperjs/dist/cropper.css'
+  export default {
+    components: {
+      Page,
+    },
+    data() {
+      return {
+        loading: false,
+        queryParams: {
+          page: 1,
+        },
+        form: {},
+        form1: {},
+        form2: {},
+        list: [{}, {}],
+        total: 0,
+        title: "新增用户",
+        open: false,
+        doctorList: [],
+        rules: {},
+        stepNum: 3,
+        stdPointImg:"",
+        snoImg:"",
+        ansCardImgList:[],
+        curAnsImg:"",
+        curRecAnsImg:"",
+        ansOptionList:[
+            {label:"A",value:0},
+            {label:"B",value:1},
+            {label:"C",value:0},
+            {label:"D",value:0},
+            {label:"E",value:0},
+            {label:"F",value:0},
+            {label:"G",value:0}
+        ],
+        stdAnsOptionList:[
+            {label:"A",value:0},
+            {label:"B",value:1},
+            {label:"C",value:0},
+            {label:"D",value:0}
+        ],
+        radio:1,
+        ansImgLoading:false,
+        optionDir:1,
+        queDir:1,
+        addQueForm:{},
+        stdQueList:[
+          // {qno:"",score:1,qtype:"单选",stdAns:""}
+        ]
+      };
+    },
+    methods: {
+      del(id) {
+        this.$confirm("确认删除?", "提示", {
+          type: "warning",
+        }).then(() => {
+          this.$api
+            .delDoctorInfo({
+              id: id,
+            })
+            .then((res) => {
+              if (!res.data.code) {
+                this.$msgSuccess("删除成功");
+                this.getData();
+              } else {
+                this.$msgError(res.data.message);
+              }
+            });
+        });
+      },
+      gopage(size) {
+        if (size) {
+          this.queryParams.page_size = size;
+        }
+        this.queryParams.page = this.$refs.pageButton.page;
+        this.getData();
+      },
+      getData() {
+        this.loading = true;
+        this.$api.getPapersList(this.queryParams).then((res) => {
+          this.list = res.data.data.list;
+          this.total = res.data.data.total;
+          this.loading = false;
+        });
+
+        this.$api
+          .getDoctorsSearchList({})
+          .then((res) => {
+            this.doctorList = res.data.data;
+            this.$set(this.doctorList, res.data.data);
+            // this.loading = false;
+          });
+      },
+      handleAdd() {
+        this.open = true;
+        this.title = "新增医生";
+        this.form = {};
+        // this.initCropper();
+      },
+      editAnsCard(item) {
+        this.open = true;
+        this.curAnsImg = item;
+        this.recCurAnsImg = "";
+        this.stdQueList = [];
+        this.addQueForm = {};
+      },
+      /** 提交按钮 */
+      submitForm() {
+        this.$refs["form"].validate((valid) => {
+          if (valid) {
+            if (this.form.id != null) {
+              this.$api.editDoctorInfo(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.addDoctorInfo(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
+            .getDoctorsSearchList({
+              name: query,
+            })
+            .then((res) => {
+              this.doctorList = res.data.data;
+              this.$set(this.doctorList, res.data.data);
+              // this.loading = false;
+            });
+        } else {
+          this.doctorList = [];
+        }
+      },
+      initCropper() {
+        let that = this;
+        this.$nextTick(function () {
+          let imgObj = this.$refs.image;
+          that.myCropper = new Cropper(imgObj, {
+            viewMode: 0,
+            dragMode: "crop",
+            autoCrop: false,
+            initialAspectRatio: 1,
+            // aspectRatio: 1,
+            preview: '.before',
+            background: false,
+            autoCropArea: 0.6,
+            zoomOnWheel: true,
+            cropBoxResizable: true,
+            movable: true,
+            ready: function () {
+              // self.croppable = true;
+              // this.cropperCutImg = this.cropper.getCroppedCanvas({ width: 1310 }).toDataURL("image/jpeg")
+              // console.log(this.cropperCutImg,333333333)
+              document.addEventListener('keydown', function (e) {
+                if (e.keyCode == 32) {
+                  that.myCropper.setDragMode("move");
+                }
+              })
+              document.addEventListener('keyup', function (e) {
+                if (e.keyCode == 32) {
+                  that.myCropper.setDragMode("crop");
+                  // that.myCropper.clear()
+                }
+              })
+            },
+            cropstart: function (e) {},
+            cropend: function (e) {
+              // let cropData = that.myCropper.getCropBoxData();
+              let cropperImgData = this.cropper.getCroppedCanvas({ width: 1310 }).toDataURL("image/jpeg");
+              if(that.stepNum==1){
+                that.stdPointImg = cropperImgData;
+              }
+              if(that.stepNum==2){
+                that.snoImg = cropperImgData;
+              }
+              if(that.stepNum==3){
+                that.ansCardImgList.push(cropperImgData);
+              }
+              that.myCropper.clear()
+            },
+            crop() {
+              let cropData = that.myCropper.getCropBoxData();
+            }
+          })
+        })
+      },
+      tryRecPaper(){
+        this.ansImgLoading = true;
+        this.$api.tryRecPaper({img:this.curAnsImg,optionDir:this.optionDir,queDir:this.queDir}).then(res=>{
+          this.recCurAnsImg = res.data.data;
+          this.ansImgLoading = false;
+        })
+      },
+      addQues(){
+        let fQno = parseInt(this.addQueForm.fQno);
+        let tQno = parseInt(this.addQueForm.tQno);
+        for(var i=fQno;i<tQno+1;i++){
+          let queRow = {qno:i,score:this.addQueForm.score,qtype:this.addQueForm.qtype}
+          this.stdQueList.push(queRow)
+        }
+      }
+    },
+    created() {
+      this.getData();
+
+    },
+    mounted() {
+      this.initCropper();
+    }
+  };
+</script>
+<style lang="scss" scoped>
+  .el-tag{
+    cursor: pointer!important;
+    margin-left:10px;
+  }
+
+  /deep/.el-input--mini .el-input__inner{
+    width:85px!important;
+  }
+
+</style>

+ 6 - 6
src/views/patient/Records.vue

@@ -55,14 +55,14 @@
       <el-table-column align="center" prop="name" label="名称" />
       <el-table-column align="center" prop="code" label="编码" />
       <el-table-column align="center" prop="mpro" label="注射产品" />
-      <el-table-column align="center" prop="zssjt0" label="注射时间" />
-      <el-table-column align="center" prop="ctime" label="打卡时间" />
-      <!-- <el-table-column align="center" prop="date" label="操作" width="160" fixed="right">
+      <el-table-column align="center" prop="zssjt0" label="注射时间" sortable />
+      <el-table-column align="center" prop="ctime" label="打卡时间" sortable/>
+      <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> -->
+      </el-table-column>
     </el-table>
     <Page
       ref="pageButton"
@@ -159,7 +159,7 @@ export default {
         type: "warning"
       }).then(() => {
         this.$api
-          .delPatientCaseInfo({
+          .delPatientRecord({
             id: id
           })
           .then(res => {

+ 291 - 0
src/views/score/Index.vue

@@ -0,0 +1,291 @@
+<style lang="scss">
+
+</style>
+<template>
+  <section class="content">
+    <div class="breadcrumb">
+        <el-breadcrumb separator="/">
+            <el-breadcrumb-item><a href="/">阅卷管理</a></el-breadcrumb-item>
+            <el-breadcrumb-item>成绩分析</el-breadcrumb-item>
+        </el-breadcrumb>
+    </div>
+    <el-form :model="queryParams" label-width="80px" class="filter-form" :inine="true">
+      <el-row>
+        <el-col :span="4">
+          <el-form-item label="学校">
+            <el-select size="mini" v-model="queryParams.school_id">
+              <el-option label="人大附中" value="人大附中">人大附中</el-option>
+            </el-select>
+          </el-form-item>
+        </el-col>
+        <el-col :span="4">
+          <el-form-item label="年级" v-model="queryParams.grade_id">
+            <el-select size="mini">
+              <el-option label="高三一班" value="高三一班">高三一班</el-option>
+            </el-select>
+          </el-form-item>
+        </el-col>
+        <el-col :span="8">
+          <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-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-column align="center" prop="name" label="班级" />
+      <el-table-column align="center" prop="phone" label="年级" />
+      <el-table-column label="教师">
+        <template slot-scope="scope">
+          <el-link type="primary">查看</el-link>
+        </template>
+      </el-table-column>
+      <el-table-column label="学生">
+        <template slot-scope="scope">
+          <el-link type="primary">查看</el-link>
+        </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
+          >
+        </template>
+      </el-table-column>
+    </el-table>
+    <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="role">
+          <el-select
+            v-model="form.role"
+            placeholder="请选择医生类型"
+            filterable
+          >
+            <el-option
+              v-for="item in $const.doctorRoleList"
+              :key="item.value"
+              :label="item.label"
+              :value="item.value"
+            ></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
+            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
+            v-model="form.hospital_name"
+            placeholder="请输入医院"
+          ></el-input>
+        </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"
+          >
+            <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>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitForm">确 定</el-button>
+        <el-button @click="open = false">取 消</el-button>
+      </div>
+    </el-dialog>
+  </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,
+      doctorList: [],
+      rules: {},
+    };
+  },
+  methods: {
+    del(id) {
+      this.$confirm("确认删除?", "提示", {
+        type: "warning",
+      }).then(() => {
+        this.$api
+          .delDoctorInfo({
+            id: id,
+          })
+          .then((res) => {
+            if (!res.data.code) {
+              this.$msgSuccess("删除成功");
+              this.getData();
+            } else {
+              this.$msgError(res.data.message);
+            }
+          });
+      });
+    },
+    gopage(size) {
+      if (size) {
+        this.queryParams.page_size = size;
+      }
+      this.queryParams.page = this.$refs.pageButton.page;
+      this.getData();
+    },
+    getData() {
+      this.loading = true;
+      this.$api.getDoctorsList(this.queryParams).then((res) => {
+        this.list = res.data.data.list;
+        this.total = res.data.data.total;
+        this.loading = false;
+      });
+
+      this.$api
+          .getDoctorsSearchList({
+          })
+          .then((res) => {
+            this.doctorList = res.data.data;
+            this.$set(this.doctorList, res.data.data);
+            // this.loading = false;
+          });
+    },
+    handleAdd() {
+      this.open = true;
+      this.title = "新增医生";
+      this.form = {};
+    },
+    edit(id) {
+      this.title = "编辑医生";
+      this.$api
+        .getDoctorInfo({
+          id: id,
+        })
+        .then((res) => {
+          this.form = res.data.data;
+          this.open = true;
+        });
+    },
+    /** 提交按钮 */
+    submitForm() {
+      this.$refs["form"].validate((valid) => {
+        if (valid) {
+          if (this.form.id != null) {
+            this.$api.editDoctorInfo(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.addDoctorInfo(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
+          .getDoctorsSearchList({
+            name: query,
+          })
+          .then((res) => {
+            this.doctorList = res.data.data;
+            this.$set(this.doctorList, res.data.data);
+            // this.loading = false;
+          });
+      } else {
+        this.doctorList = [];
+      }
+    },
+  },
+  created() {
+    this.getData();
+    
+  },
+};
+</script>

+ 252 - 0
src/views/score/agreementIndex.vue

@@ -0,0 +1,252 @@
+<style lang="scss">
+.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-icon {
+  font-size: 28px;
+  color: #8c939d;
+  width: 178px;
+  height: 178px;
+  line-height: 178px;
+  text-align: center;
+}
+
+.avatar {
+  width: 178px;
+  height: 178px;
+  display: block;
+}
+</style>
+<template>
+  <section class="content">
+    <h4>用户协议列表</h4>
+    <el-divider></el-divider>
+    <!-- <el-form label-width="80px" class="filter-form">
+      <el-row>
+        <el-col :span="4">
+          <el-form-item label="名称">
+            <el-input
+              clearable
+              @clear="getData()"
+              v-model="queryParams.name"
+              placeholder="请输入名称"
+              size="mini"
+            ></el-input>
+          </el-form-item>
+        </el-col>
+        <el-col :span="4">
+          <el-form-item label="手机号">
+            <el-input
+              clearable
+              @clear="getData()"
+              v-model="queryParams.phone"
+              placeholder="请输入手机号"
+              size="mini"
+            ></el-input>
+          </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
+            >
+            <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-column align="center" prop="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
+          >
+        </template>
+      </el-table-column>
+    </el-table>
+    <Page
+      ref="pageButton"
+      :current="form.page"
+      :page_size="form.page_size"
+      :total="total"
+      @pageChange="gopage"
+    />
+    <!-- 新增医生 -->
+    <el-dialog :title="title" :visible.sync="open" width="800px" 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="协议内容">
+            <vue-ueditor-wrap ref="editor" v-model="form.content" :config="myConfig"></vue-ueditor-wrap>
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitForm">确 定</el-button>
+        <el-button @click="open = false">取 消</el-button>
+      </div>
+    </el-dialog>
+  </section>
+</template>
+<script>
+import Page from "../../components/Page";
+import fuEditor from "@/components/fuEditor/index.vue";
+export default {
+  components: {
+    Page,
+    fuEditor
+  },
+  data() {
+    return {
+      loading: false,
+      queryParams: {
+        page: 1,
+      },
+      form: {},
+      form1: {},
+      form2: {},
+      list: [{}, {}],
+      total: 0,
+      title: "新增用户",
+      open: false,
+      doctorList: [],
+      rules: {},
+      myConfig: {
+	      // 编辑器自动被内容撑高
+	      autoHeightEnabled: true,
+	      // 初始容器高度
+	      initialFrameHeight: 500,
+	      // 初始容器宽度
+	      initialFrameWidth: '100%',
+	      // 上传文件接口,实现上传图片功能必须的配置,这个地址会在后端配置的时候产生,此处先放上结果
+	      serverUrl: '/api/admin/ueditor/upload',
+	    },
+    };
+  },
+  methods: {
+    del(id) {
+      this.$confirm("确认删除?", "提示", {
+        type: "warning",
+      }).then(() => {
+        this.$api
+          .delDoctorInfo({
+            id: id,
+          })
+          .then((res) => {
+            if (!res.data.code) {
+              this.$msgSuccess("删除成功");
+              this.getData();
+            } else {
+              this.$msgError(res.data.message);
+            }
+          });
+      });
+    },
+    gopage(size) {
+      if (size) {
+        this.queryParams.page_size = size;
+      }
+      this.queryParams.page = this.$refs.pageButton.page;
+      this.getData();
+    },
+    getData() {
+      this.loading = true;
+      this.$api.getUserAgreementList(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
+        .getUserAgreementInfo({
+          id: id,
+        })
+        .then((res) => {
+          this.form = res.data.data;
+          this.open = true;
+        });
+    },
+    /** 提交按钮 */
+    submitForm() {
+      this.$refs["form"].validate((valid) => {
+        if (valid) {
+          if (this.form.id != null) {
+            this.$api.editUserAgreement(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.addDoctorInfo(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
+          .getDoctorsSearchList({
+            name: query,
+          })
+          .then((res) => {
+            this.doctorList = res.data.data;
+            this.$set(this.doctorList, res.data.data);
+            // this.loading = false;
+          });
+      } else {
+        this.doctorList = [];
+      }
+    },
+  },
+  created() {
+    this.getData();
+  },
+};
+</script>

+ 204 - 0
src/views/score/phcodeList.vue

@@ -0,0 +1,204 @@
+<style lang="scss">
+.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-icon {
+  font-size: 28px;
+  color: #8c939d;
+  width: 178px;
+  height: 178px;
+  line-height: 178px;
+  text-align: center;
+}
+
+.avatar {
+  width: 178px;
+  height: 178px;
+  display: block;
+}
+</style>
+<template>
+  <section class="content">
+    <h4>短信记录列表</h4>
+    
+    <el-divider></el-divider>
+    <el-form :inline="true">
+      <el-form-item label="手机号" >
+          <el-input v-model="queryParams.phone" placeholder="请输入手机号"></el-input>
+      </el-form-item>
+      <el-form-item>
+        <el-button @click="getData" type="primary">搜索</el-button>
+      </el-form-item>
+    </el-form>
+    <el-table
+      v-loading="loading"
+      :data="list"
+      style="width: 100%; margin-top: 10px"
+      height="50vh"
+    >
+      <el-table-column align="center" prop="phone" label="手机号" />
+      <el-table-column align="center" prop="code" label="验证码" />
+      <el-table-column align="center" prop="result" label="发送状态">
+          <template slot-scope="scope">
+            <div>
+                <span style="color:green;" v-if="scope.row.result && scope.row.result.indexOf('success') >-1">成功</span>
+                <span v-else="失败">失败:{{scope.row.result}}</span>
+             </div>
+          </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)" size="mini" type="warning"
+            >重新发送</el-button
+          >
+        </template>
+      </el-table-column>
+    </el-table>
+    <Page
+      ref="pageButton"
+      :current="form.page"
+      :page_size="form.page_size"
+      :total="total"
+      @pageChange="gopage"
+    />
+    <!-- 新增医生 -->
+    <el-dialog :title="title" :visible.sync="open" width="800px" 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.phone"
+            placeholder="请输入手机号"
+          ></el-input>
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button @click="open = false">取 消</el-button>
+        <el-button type="primary" @click="submitForm">发 送</el-button>
+      </div>
+    </el-dialog>
+  </section>
+</template>
+<script>
+import Page from "../../components/Page";
+import fuEditor from "@/components/fuEditor/index.vue";
+export default {
+  components: {
+    Page,
+    fuEditor
+  },
+  data() {
+    return {
+      loading: false,
+      queryParams: {
+        page: 1,
+      },
+      form: {},
+      form1: {},
+      form2: {},
+      list: [{}, {}],
+      total: 0,
+      title: "新增用户",
+      open: false,
+      doctorList: [],
+      rules: {},
+      myConfig: {
+	      // 编辑器自动被内容撑高
+	      autoHeightEnabled: true,
+	      // 初始容器高度
+	      initialFrameHeight: 500,
+	      // 初始容器宽度
+	      initialFrameWidth: '100%',
+	      // 上传文件接口,实现上传图片功能必须的配置,这个地址会在后端配置的时候产生,此处先放上结果
+	      serverUrl: '/api/admin/ueditor/upload',
+	    },
+    };
+  },
+  methods: {
+    del(id) {
+      this.$confirm("确认删除?", "提示", {
+        type: "warning",
+      }).then(() => {
+        this.$api
+          .delDoctorInfo({
+            id: id,
+          })
+          .then((res) => {
+            if (!res.data.code) {
+              this.$msgSuccess("删除成功");
+              this.getData();
+            } else {
+              this.$msgError(res.data.message);
+            }
+          });
+      });
+    },
+    gopage(size) {
+      if (size) {
+        this.queryParams.page_size = size;
+      }
+      this.queryParams.page = this.$refs.pageButton.page;
+      this.getData();
+    },
+    getData() {
+      this.loading = true;
+      this.$api.getPhoneRecordList(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(row) {
+      this.title = "重新发送";
+      this.open = true;
+      this.form = row;
+    },
+    /** 提交按钮 */
+    submitForm() {
+      this.$refs["form"].validate((valid) => {
+          this.$api.sendPhoneCode(this.form).then(res=>{
+            if(res.data.data.indexOf("success")>-1){
+              this.$message.success("成功")
+              this.open = false
+              this.getData()
+            }
+          })
+      });
+    },
+    remoteMethod(query) {
+      if (query !== "") {
+        // this.loading = true;
+        this.$api
+          .getDoctorsSearchList({
+            name: query,
+          })
+          .then((res) => {
+            this.doctorList = res.data.data;
+            this.$set(this.doctorList, res.data.data);
+            // this.loading = false;
+          });
+      } else {
+        this.doctorList = [];
+      }
+    },
+  },
+  created() {
+    this.getData();
+  },
+};
+</script>

+ 291 - 0
src/views/student/Index.vue

@@ -0,0 +1,291 @@
+<style lang="scss">
+
+</style>
+<template>
+  <section class="content">
+    <div class="breadcrumb">
+        <el-breadcrumb separator="/">
+            <el-breadcrumb-item><a href="/">师生管理</a></el-breadcrumb-item>
+            <el-breadcrumb-item>学生管理</el-breadcrumb-item>
+        </el-breadcrumb>
+    </div>
+    <el-form :model="queryParams" label-width="80px" class="filter-form" :inine="true">
+      <el-row>
+        <el-col :span="4">
+          <el-form-item label="学校">
+            <el-select size="mini" v-model="queryParams.school_id">
+              <el-option label="人大附中" value="人大附中">人大附中</el-option>
+            </el-select>
+          </el-form-item>
+        </el-col>
+        <el-col :span="4">
+          <el-form-item label="年级" v-model="queryParams.grade_id">
+            <el-select size="mini">
+              <el-option label="高三一班" value="高三一班">高三一班</el-option>
+            </el-select>
+          </el-form-item>
+        </el-col>
+        <el-col :span="8">
+          <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-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-column align="center" prop="name" label="班级" />
+      <el-table-column align="center" prop="phone" label="年级" />
+      <el-table-column label="教师">
+        <template slot-scope="scope">
+          <el-link type="primary">查看</el-link>
+        </template>
+      </el-table-column>
+      <el-table-column label="学生">
+        <template slot-scope="scope">
+          <el-link type="primary">查看</el-link>
+        </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
+          >
+        </template>
+      </el-table-column>
+    </el-table>
+    <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="role">
+          <el-select
+            v-model="form.role"
+            placeholder="请选择医生类型"
+            filterable
+          >
+            <el-option
+              v-for="item in $const.doctorRoleList"
+              :key="item.value"
+              :label="item.label"
+              :value="item.value"
+            ></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
+            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
+            v-model="form.hospital_name"
+            placeholder="请输入医院"
+          ></el-input>
+        </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"
+          >
+            <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>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitForm">确 定</el-button>
+        <el-button @click="open = false">取 消</el-button>
+      </div>
+    </el-dialog>
+  </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,
+      doctorList: [],
+      rules: {},
+    };
+  },
+  methods: {
+    del(id) {
+      this.$confirm("确认删除?", "提示", {
+        type: "warning",
+      }).then(() => {
+        this.$api
+          .delDoctorInfo({
+            id: id,
+          })
+          .then((res) => {
+            if (!res.data.code) {
+              this.$msgSuccess("删除成功");
+              this.getData();
+            } else {
+              this.$msgError(res.data.message);
+            }
+          });
+      });
+    },
+    gopage(size) {
+      if (size) {
+        this.queryParams.page_size = size;
+      }
+      this.queryParams.page = this.$refs.pageButton.page;
+      this.getData();
+    },
+    getData() {
+      this.loading = true;
+      this.$api.getDoctorsList(this.queryParams).then((res) => {
+        this.list = res.data.data.list;
+        this.total = res.data.data.total;
+        this.loading = false;
+      });
+
+      this.$api
+          .getDoctorsSearchList({
+          })
+          .then((res) => {
+            this.doctorList = res.data.data;
+            this.$set(this.doctorList, res.data.data);
+            // this.loading = false;
+          });
+    },
+    handleAdd() {
+      this.open = true;
+      this.title = "新增医生";
+      this.form = {};
+    },
+    edit(id) {
+      this.title = "编辑医生";
+      this.$api
+        .getDoctorInfo({
+          id: id,
+        })
+        .then((res) => {
+          this.form = res.data.data;
+          this.open = true;
+        });
+    },
+    /** 提交按钮 */
+    submitForm() {
+      this.$refs["form"].validate((valid) => {
+        if (valid) {
+          if (this.form.id != null) {
+            this.$api.editDoctorInfo(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.addDoctorInfo(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
+          .getDoctorsSearchList({
+            name: query,
+          })
+          .then((res) => {
+            this.doctorList = res.data.data;
+            this.$set(this.doctorList, res.data.data);
+            // this.loading = false;
+          });
+      } else {
+        this.doctorList = [];
+      }
+    },
+  },
+  created() {
+    this.getData();
+    
+  },
+};
+</script>

+ 252 - 0
src/views/student/agreementIndex.vue

@@ -0,0 +1,252 @@
+<style lang="scss">
+.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-icon {
+  font-size: 28px;
+  color: #8c939d;
+  width: 178px;
+  height: 178px;
+  line-height: 178px;
+  text-align: center;
+}
+
+.avatar {
+  width: 178px;
+  height: 178px;
+  display: block;
+}
+</style>
+<template>
+  <section class="content">
+    <h4>用户协议列表</h4>
+    <el-divider></el-divider>
+    <!-- <el-form label-width="80px" class="filter-form">
+      <el-row>
+        <el-col :span="4">
+          <el-form-item label="名称">
+            <el-input
+              clearable
+              @clear="getData()"
+              v-model="queryParams.name"
+              placeholder="请输入名称"
+              size="mini"
+            ></el-input>
+          </el-form-item>
+        </el-col>
+        <el-col :span="4">
+          <el-form-item label="手机号">
+            <el-input
+              clearable
+              @clear="getData()"
+              v-model="queryParams.phone"
+              placeholder="请输入手机号"
+              size="mini"
+            ></el-input>
+          </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
+            >
+            <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-column align="center" prop="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
+          >
+        </template>
+      </el-table-column>
+    </el-table>
+    <Page
+      ref="pageButton"
+      :current="form.page"
+      :page_size="form.page_size"
+      :total="total"
+      @pageChange="gopage"
+    />
+    <!-- 新增医生 -->
+    <el-dialog :title="title" :visible.sync="open" width="800px" 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="协议内容">
+            <vue-ueditor-wrap ref="editor" v-model="form.content" :config="myConfig"></vue-ueditor-wrap>
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitForm">确 定</el-button>
+        <el-button @click="open = false">取 消</el-button>
+      </div>
+    </el-dialog>
+  </section>
+</template>
+<script>
+import Page from "../../components/Page";
+import fuEditor from "@/components/fuEditor/index.vue";
+export default {
+  components: {
+    Page,
+    fuEditor
+  },
+  data() {
+    return {
+      loading: false,
+      queryParams: {
+        page: 1,
+      },
+      form: {},
+      form1: {},
+      form2: {},
+      list: [{}, {}],
+      total: 0,
+      title: "新增用户",
+      open: false,
+      doctorList: [],
+      rules: {},
+      myConfig: {
+	      // 编辑器自动被内容撑高
+	      autoHeightEnabled: true,
+	      // 初始容器高度
+	      initialFrameHeight: 500,
+	      // 初始容器宽度
+	      initialFrameWidth: '100%',
+	      // 上传文件接口,实现上传图片功能必须的配置,这个地址会在后端配置的时候产生,此处先放上结果
+	      serverUrl: '/api/admin/ueditor/upload',
+	    },
+    };
+  },
+  methods: {
+    del(id) {
+      this.$confirm("确认删除?", "提示", {
+        type: "warning",
+      }).then(() => {
+        this.$api
+          .delDoctorInfo({
+            id: id,
+          })
+          .then((res) => {
+            if (!res.data.code) {
+              this.$msgSuccess("删除成功");
+              this.getData();
+            } else {
+              this.$msgError(res.data.message);
+            }
+          });
+      });
+    },
+    gopage(size) {
+      if (size) {
+        this.queryParams.page_size = size;
+      }
+      this.queryParams.page = this.$refs.pageButton.page;
+      this.getData();
+    },
+    getData() {
+      this.loading = true;
+      this.$api.getUserAgreementList(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
+        .getUserAgreementInfo({
+          id: id,
+        })
+        .then((res) => {
+          this.form = res.data.data;
+          this.open = true;
+        });
+    },
+    /** 提交按钮 */
+    submitForm() {
+      this.$refs["form"].validate((valid) => {
+        if (valid) {
+          if (this.form.id != null) {
+            this.$api.editUserAgreement(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.addDoctorInfo(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
+          .getDoctorsSearchList({
+            name: query,
+          })
+          .then((res) => {
+            this.doctorList = res.data.data;
+            this.$set(this.doctorList, res.data.data);
+            // this.loading = false;
+          });
+      } else {
+        this.doctorList = [];
+      }
+    },
+  },
+  created() {
+    this.getData();
+  },
+};
+</script>

+ 204 - 0
src/views/student/phcodeList.vue

@@ -0,0 +1,204 @@
+<style lang="scss">
+.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-icon {
+  font-size: 28px;
+  color: #8c939d;
+  width: 178px;
+  height: 178px;
+  line-height: 178px;
+  text-align: center;
+}
+
+.avatar {
+  width: 178px;
+  height: 178px;
+  display: block;
+}
+</style>
+<template>
+  <section class="content">
+    <h4>短信记录列表</h4>
+    
+    <el-divider></el-divider>
+    <el-form :inline="true">
+      <el-form-item label="手机号" >
+          <el-input v-model="queryParams.phone" placeholder="请输入手机号"></el-input>
+      </el-form-item>
+      <el-form-item>
+        <el-button @click="getData" type="primary">搜索</el-button>
+      </el-form-item>
+    </el-form>
+    <el-table
+      v-loading="loading"
+      :data="list"
+      style="width: 100%; margin-top: 10px"
+      height="50vh"
+    >
+      <el-table-column align="center" prop="phone" label="手机号" />
+      <el-table-column align="center" prop="code" label="验证码" />
+      <el-table-column align="center" prop="result" label="发送状态">
+          <template slot-scope="scope">
+            <div>
+                <span style="color:green;" v-if="scope.row.result && scope.row.result.indexOf('success') >-1">成功</span>
+                <span v-else="失败">失败:{{scope.row.result}}</span>
+             </div>
+          </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)" size="mini" type="warning"
+            >重新发送</el-button
+          >
+        </template>
+      </el-table-column>
+    </el-table>
+    <Page
+      ref="pageButton"
+      :current="form.page"
+      :page_size="form.page_size"
+      :total="total"
+      @pageChange="gopage"
+    />
+    <!-- 新增医生 -->
+    <el-dialog :title="title" :visible.sync="open" width="800px" 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.phone"
+            placeholder="请输入手机号"
+          ></el-input>
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button @click="open = false">取 消</el-button>
+        <el-button type="primary" @click="submitForm">发 送</el-button>
+      </div>
+    </el-dialog>
+  </section>
+</template>
+<script>
+import Page from "../../components/Page";
+import fuEditor from "@/components/fuEditor/index.vue";
+export default {
+  components: {
+    Page,
+    fuEditor
+  },
+  data() {
+    return {
+      loading: false,
+      queryParams: {
+        page: 1,
+      },
+      form: {},
+      form1: {},
+      form2: {},
+      list: [{}, {}],
+      total: 0,
+      title: "新增用户",
+      open: false,
+      doctorList: [],
+      rules: {},
+      myConfig: {
+	      // 编辑器自动被内容撑高
+	      autoHeightEnabled: true,
+	      // 初始容器高度
+	      initialFrameHeight: 500,
+	      // 初始容器宽度
+	      initialFrameWidth: '100%',
+	      // 上传文件接口,实现上传图片功能必须的配置,这个地址会在后端配置的时候产生,此处先放上结果
+	      serverUrl: '/api/admin/ueditor/upload',
+	    },
+    };
+  },
+  methods: {
+    del(id) {
+      this.$confirm("确认删除?", "提示", {
+        type: "warning",
+      }).then(() => {
+        this.$api
+          .delDoctorInfo({
+            id: id,
+          })
+          .then((res) => {
+            if (!res.data.code) {
+              this.$msgSuccess("删除成功");
+              this.getData();
+            } else {
+              this.$msgError(res.data.message);
+            }
+          });
+      });
+    },
+    gopage(size) {
+      if (size) {
+        this.queryParams.page_size = size;
+      }
+      this.queryParams.page = this.$refs.pageButton.page;
+      this.getData();
+    },
+    getData() {
+      this.loading = true;
+      this.$api.getPhoneRecordList(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(row) {
+      this.title = "重新发送";
+      this.open = true;
+      this.form = row;
+    },
+    /** 提交按钮 */
+    submitForm() {
+      this.$refs["form"].validate((valid) => {
+          this.$api.sendPhoneCode(this.form).then(res=>{
+            if(res.data.data.indexOf("success")>-1){
+              this.$message.success("成功")
+              this.open = false
+              this.getData()
+            }
+          })
+      });
+    },
+    remoteMethod(query) {
+      if (query !== "") {
+        // this.loading = true;
+        this.$api
+          .getDoctorsSearchList({
+            name: query,
+          })
+          .then((res) => {
+            this.doctorList = res.data.data;
+            this.$set(this.doctorList, res.data.data);
+            // this.loading = false;
+          });
+      } else {
+        this.doctorList = [];
+      }
+    },
+  },
+  created() {
+    this.getData();
+  },
+};
+</script>

+ 298 - 0
src/views/tasks/Index.vue

@@ -0,0 +1,298 @@
+<template>
+  <section class="content">
+    <div class="breadcrumb">
+      <el-breadcrumb separator="/">
+        <el-breadcrumb-item><a href="/">阅卷管理</a></el-breadcrumb-item>
+        <el-breadcrumb-item>阅卷任务</el-breadcrumb-item>
+      </el-breadcrumb>
+    </div>
+    <el-form :model="queryParams" label-width="80px" class="filter-form" :inine="true">
+      <el-row>
+        <el-col :span="4">
+          <el-form-item label="学校">
+            <el-select size="mini" v-model="queryParams.school_id">
+              <el-option label="人大附中" value="人大附中">人大附中</el-option>
+            </el-select>
+          </el-form-item>
+        </el-col>
+        <el-col :span="4">
+          <el-form-item label="年级" v-model="queryParams.grade_id">
+            <el-select size="mini">
+              <el-option label="高三一班" value="高三一班">高三一班</el-option>
+            </el-select>
+          </el-form-item>
+        </el-col>
+        <el-col :span="8">
+          <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-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-column align="center" prop="name" label="班级" />
+      <el-table-column align="center" prop="phone" label="年级" />
+      <el-table-column label="教师">
+        <template slot-scope="scope">
+          <el-link type="primary">查看</el-link>
+        </template>
+      </el-table-column>
+      <el-table-column label="学生">
+        <template slot-scope="scope">
+          <el-link type="primary">查看</el-link>
+        </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="openUploadPaper" size="mini" type="primary">上传试卷</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" />
+    <!-- 新增医生 -->
+    <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="role">
+          <el-select v-model="form.role" placeholder="请选择医生类型" filterable>
+            <el-option v-for="item in $const.doctorRoleList" :key="item.value" :label="item.label" :value="item.value">
+            </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 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 v-model="form.hospital_name" placeholder="请输入医院"></el-input>
+        </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"
+          >
+            <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>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitForm">确 定</el-button>
+        <el-button @click="open = false">取 消</el-button>
+      </div>
+    </el-dialog>
+    <!-- 上传试卷 -->
+    <el-dialog title="试卷上传" :visible.sync="uploadDialogVisible" width="90%">
+      <el-row :gutter="20">
+        <el-col :span="12">
+          <el-table v-loading="loading" :data="list" style="width: 100%; margin-top: 10px" height="50vh">
+            <el-table-column align="center" prop="name" label="姓名" width="80" />
+            <el-table-column align="center" prop="phone" label="考号" />
+            <el-table-column align="center" prop="ctime" label="创建时间" />
+            <el-table-column align="center" prop="date" label="操作" width="150">
+              <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>
+              </template>
+            </el-table-column>
+          </el-table>
+        </el-col>
+        <el-col :span="12">
+          <el-upload
+            class="upload-demo"
+            action="http://118.190.145.217:8091/api/admin/uploadfile"
+            :on-preview="handlePreview"
+            :on-remove="handleRemove"
+            :file-list="fileList"
+            list-type="picture"
+            :data="{taskid:1}"
+            multiple
+            >
+            <el-button size="small" type="primary">点击上传</el-button>
+            <div slot="tip" class="el-upload__tip">只能上传jpg/png文件,且不超过500kb</div>
+          </el-upload>
+        </el-col>
+        
+      </el-row>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitForm">确 定</el-button>
+        <el-button @click="open = false">取 消</el-button>
+      </div>
+    </el-dialog>
+  </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,
+        doctorList: [],
+        rules: {},
+        uploadDialogVisible: false,
+      };
+    },
+    methods: {
+      submitUpload() {
+        this.$refs.upload.submit();
+      },
+      del(id) {
+        this.$confirm("确认删除?", "提示", {
+          type: "warning",
+        }).then(() => {
+          this.$api
+            .delDoctorInfo({
+              id: id,
+            })
+            .then((res) => {
+              if (!res.data.code) {
+                this.$msgSuccess("删除成功");
+                this.getData();
+              } else {
+                this.$msgError(res.data.message);
+              }
+            });
+        });
+      },
+      gopage(size) {
+        if (size) {
+          this.queryParams.page_size = size;
+        }
+        this.queryParams.page = this.$refs.pageButton.page;
+        this.getData();
+      },
+      getData() {
+        this.loading = true;
+        this.$api.getDoctorsList(this.queryParams).then((res) => {
+          this.list = res.data.data.list;
+          this.total = res.data.data.total;
+          this.loading = false;
+        });
+
+        this.$api
+          .getDoctorsSearchList({})
+          .then((res) => {
+            this.doctorList = res.data.data;
+            this.$set(this.doctorList, res.data.data);
+            // this.loading = false;
+          });
+      },
+      handleAdd() {
+        this.open = true;
+        this.title = "新增医生";
+        this.form = {};
+      },
+      edit(id) {
+        this.title = "编辑医生";
+        this.$api
+          .getDoctorInfo({
+            id: id,
+          })
+          .then((res) => {
+            this.form = res.data.data;
+            this.open = true;
+          });
+      },
+      /** 提交按钮 */
+      submitForm() {
+        this.$refs["form"].validate((valid) => {
+          if (valid) {
+            if (this.form.id != null) {
+              this.$api.editDoctorInfo(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.addDoctorInfo(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
+            .getDoctorsSearchList({
+              name: query,
+            })
+            .then((res) => {
+              this.doctorList = res.data.data;
+              this.$set(this.doctorList, res.data.data);
+              // this.loading = false;
+            });
+        } else {
+          this.doctorList = [];
+        }
+      },
+      openUploadPaper() {
+        this.uploadDialogVisible = true
+      },
+      handlePreview(file) {
+        console.log(file);
+      }
+    },
+    created() {
+      this.getData();
+
+    },
+  };
+</script>
+<style lang="scss">
+  .el-upload-list--picture .el-upload-list__item{
+    width:150px;
+    float:left;
+    margin-right:10px;
+    position: relative;
+  }
+  .el-upload-list--picture .el-upload-list__item.is-success .el-upload-list__item-name{
+      position:absolute;
+      z-index:100;
+      height:70px;
+      line-height: 130px;
+  }
+  .el-upload-list--picture .el-upload-list__item-thumbnail{
+    width:125px;
+  }
+</style>

+ 252 - 0
src/views/tasks/agreementIndex.vue

@@ -0,0 +1,252 @@
+<style lang="scss">
+.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-icon {
+  font-size: 28px;
+  color: #8c939d;
+  width: 178px;
+  height: 178px;
+  line-height: 178px;
+  text-align: center;
+}
+
+.avatar {
+  width: 178px;
+  height: 178px;
+  display: block;
+}
+</style>
+<template>
+  <section class="content">
+    <h4>用户协议列表</h4>
+    <el-divider></el-divider>
+    <!-- <el-form label-width="80px" class="filter-form">
+      <el-row>
+        <el-col :span="4">
+          <el-form-item label="名称">
+            <el-input
+              clearable
+              @clear="getData()"
+              v-model="queryParams.name"
+              placeholder="请输入名称"
+              size="mini"
+            ></el-input>
+          </el-form-item>
+        </el-col>
+        <el-col :span="4">
+          <el-form-item label="手机号">
+            <el-input
+              clearable
+              @clear="getData()"
+              v-model="queryParams.phone"
+              placeholder="请输入手机号"
+              size="mini"
+            ></el-input>
+          </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
+            >
+            <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-column align="center" prop="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
+          >
+        </template>
+      </el-table-column>
+    </el-table>
+    <Page
+      ref="pageButton"
+      :current="form.page"
+      :page_size="form.page_size"
+      :total="total"
+      @pageChange="gopage"
+    />
+    <!-- 新增医生 -->
+    <el-dialog :title="title" :visible.sync="open" width="800px" 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="协议内容">
+            <vue-ueditor-wrap ref="editor" v-model="form.content" :config="myConfig"></vue-ueditor-wrap>
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitForm">确 定</el-button>
+        <el-button @click="open = false">取 消</el-button>
+      </div>
+    </el-dialog>
+  </section>
+</template>
+<script>
+import Page from "../../components/Page";
+import fuEditor from "@/components/fuEditor/index.vue";
+export default {
+  components: {
+    Page,
+    fuEditor
+  },
+  data() {
+    return {
+      loading: false,
+      queryParams: {
+        page: 1,
+      },
+      form: {},
+      form1: {},
+      form2: {},
+      list: [{}, {}],
+      total: 0,
+      title: "新增用户",
+      open: false,
+      doctorList: [],
+      rules: {},
+      myConfig: {
+	      // 编辑器自动被内容撑高
+	      autoHeightEnabled: true,
+	      // 初始容器高度
+	      initialFrameHeight: 500,
+	      // 初始容器宽度
+	      initialFrameWidth: '100%',
+	      // 上传文件接口,实现上传图片功能必须的配置,这个地址会在后端配置的时候产生,此处先放上结果
+	      serverUrl: '/api/admin/ueditor/upload',
+	    },
+    };
+  },
+  methods: {
+    del(id) {
+      this.$confirm("确认删除?", "提示", {
+        type: "warning",
+      }).then(() => {
+        this.$api
+          .delDoctorInfo({
+            id: id,
+          })
+          .then((res) => {
+            if (!res.data.code) {
+              this.$msgSuccess("删除成功");
+              this.getData();
+            } else {
+              this.$msgError(res.data.message);
+            }
+          });
+      });
+    },
+    gopage(size) {
+      if (size) {
+        this.queryParams.page_size = size;
+      }
+      this.queryParams.page = this.$refs.pageButton.page;
+      this.getData();
+    },
+    getData() {
+      this.loading = true;
+      this.$api.getUserAgreementList(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
+        .getUserAgreementInfo({
+          id: id,
+        })
+        .then((res) => {
+          this.form = res.data.data;
+          this.open = true;
+        });
+    },
+    /** 提交按钮 */
+    submitForm() {
+      this.$refs["form"].validate((valid) => {
+        if (valid) {
+          if (this.form.id != null) {
+            this.$api.editUserAgreement(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.addDoctorInfo(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
+          .getDoctorsSearchList({
+            name: query,
+          })
+          .then((res) => {
+            this.doctorList = res.data.data;
+            this.$set(this.doctorList, res.data.data);
+            // this.loading = false;
+          });
+      } else {
+        this.doctorList = [];
+      }
+    },
+  },
+  created() {
+    this.getData();
+  },
+};
+</script>

+ 204 - 0
src/views/tasks/phcodeList.vue

@@ -0,0 +1,204 @@
+<style lang="scss">
+.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-icon {
+  font-size: 28px;
+  color: #8c939d;
+  width: 178px;
+  height: 178px;
+  line-height: 178px;
+  text-align: center;
+}
+
+.avatar {
+  width: 178px;
+  height: 178px;
+  display: block;
+}
+</style>
+<template>
+  <section class="content">
+    <h4>短信记录列表</h4>
+    
+    <el-divider></el-divider>
+    <el-form :inline="true">
+      <el-form-item label="手机号" >
+          <el-input v-model="queryParams.phone" placeholder="请输入手机号"></el-input>
+      </el-form-item>
+      <el-form-item>
+        <el-button @click="getData" type="primary">搜索</el-button>
+      </el-form-item>
+    </el-form>
+    <el-table
+      v-loading="loading"
+      :data="list"
+      style="width: 100%; margin-top: 10px"
+      height="50vh"
+    >
+      <el-table-column align="center" prop="phone" label="手机号" />
+      <el-table-column align="center" prop="code" label="验证码" />
+      <el-table-column align="center" prop="result" label="发送状态">
+          <template slot-scope="scope">
+            <div>
+                <span style="color:green;" v-if="scope.row.result && scope.row.result.indexOf('success') >-1">成功</span>
+                <span v-else="失败">失败:{{scope.row.result}}</span>
+             </div>
+          </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)" size="mini" type="warning"
+            >重新发送</el-button
+          >
+        </template>
+      </el-table-column>
+    </el-table>
+    <Page
+      ref="pageButton"
+      :current="form.page"
+      :page_size="form.page_size"
+      :total="total"
+      @pageChange="gopage"
+    />
+    <!-- 新增医生 -->
+    <el-dialog :title="title" :visible.sync="open" width="800px" 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.phone"
+            placeholder="请输入手机号"
+          ></el-input>
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button @click="open = false">取 消</el-button>
+        <el-button type="primary" @click="submitForm">发 送</el-button>
+      </div>
+    </el-dialog>
+  </section>
+</template>
+<script>
+import Page from "../../components/Page";
+import fuEditor from "@/components/fuEditor/index.vue";
+export default {
+  components: {
+    Page,
+    fuEditor
+  },
+  data() {
+    return {
+      loading: false,
+      queryParams: {
+        page: 1,
+      },
+      form: {},
+      form1: {},
+      form2: {},
+      list: [{}, {}],
+      total: 0,
+      title: "新增用户",
+      open: false,
+      doctorList: [],
+      rules: {},
+      myConfig: {
+	      // 编辑器自动被内容撑高
+	      autoHeightEnabled: true,
+	      // 初始容器高度
+	      initialFrameHeight: 500,
+	      // 初始容器宽度
+	      initialFrameWidth: '100%',
+	      // 上传文件接口,实现上传图片功能必须的配置,这个地址会在后端配置的时候产生,此处先放上结果
+	      serverUrl: '/api/admin/ueditor/upload',
+	    },
+    };
+  },
+  methods: {
+    del(id) {
+      this.$confirm("确认删除?", "提示", {
+        type: "warning",
+      }).then(() => {
+        this.$api
+          .delDoctorInfo({
+            id: id,
+          })
+          .then((res) => {
+            if (!res.data.code) {
+              this.$msgSuccess("删除成功");
+              this.getData();
+            } else {
+              this.$msgError(res.data.message);
+            }
+          });
+      });
+    },
+    gopage(size) {
+      if (size) {
+        this.queryParams.page_size = size;
+      }
+      this.queryParams.page = this.$refs.pageButton.page;
+      this.getData();
+    },
+    getData() {
+      this.loading = true;
+      this.$api.getPhoneRecordList(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(row) {
+      this.title = "重新发送";
+      this.open = true;
+      this.form = row;
+    },
+    /** 提交按钮 */
+    submitForm() {
+      this.$refs["form"].validate((valid) => {
+          this.$api.sendPhoneCode(this.form).then(res=>{
+            if(res.data.data.indexOf("success")>-1){
+              this.$message.success("成功")
+              this.open = false
+              this.getData()
+            }
+          })
+      });
+    },
+    remoteMethod(query) {
+      if (query !== "") {
+        // this.loading = true;
+        this.$api
+          .getDoctorsSearchList({
+            name: query,
+          })
+          .then((res) => {
+            this.doctorList = res.data.data;
+            this.$set(this.doctorList, res.data.data);
+            // this.loading = false;
+          });
+      } else {
+        this.doctorList = [];
+      }
+    },
+  },
+  created() {
+    this.getData();
+  },
+};
+</script>

+ 291 - 0
src/views/teacher/Index.vue

@@ -0,0 +1,291 @@
+<style lang="scss">
+
+</style>
+<template>
+  <section class="content">
+    <div class="breadcrumb">
+        <el-breadcrumb separator="/">
+            <el-breadcrumb-item><a href="/">师生管理</a></el-breadcrumb-item>
+            <el-breadcrumb-item>教师管理</el-breadcrumb-item>
+        </el-breadcrumb>
+    </div>
+    <el-form :model="queryParams" label-width="80px" class="filter-form" :inine="true">
+      <el-row>
+        <el-col :span="4">
+          <el-form-item label="学校">
+            <el-select size="mini" v-model="queryParams.school_id">
+              <el-option label="人大附中" value="人大附中">人大附中</el-option>
+            </el-select>
+          </el-form-item>
+        </el-col>
+        <el-col :span="4">
+          <el-form-item label="年级" v-model="queryParams.grade_id">
+            <el-select size="mini">
+              <el-option label="高三一班" value="高三一班">高三一班</el-option>
+            </el-select>
+          </el-form-item>
+        </el-col>
+        <el-col :span="8">
+          <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-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-column align="center" prop="name" label="班级" />
+      <el-table-column align="center" prop="phone" label="年级" />
+      <el-table-column label="教师">
+        <template slot-scope="scope">
+          <el-link type="primary">查看</el-link>
+        </template>
+      </el-table-column>
+      <el-table-column label="学生">
+        <template slot-scope="scope">
+          <el-link type="primary">查看</el-link>
+        </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
+          >
+        </template>
+      </el-table-column>
+    </el-table>
+    <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="role">
+          <el-select
+            v-model="form.role"
+            placeholder="请选择医生类型"
+            filterable
+          >
+            <el-option
+              v-for="item in $const.doctorRoleList"
+              :key="item.value"
+              :label="item.label"
+              :value="item.value"
+            ></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
+            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
+            v-model="form.hospital_name"
+            placeholder="请输入医院"
+          ></el-input>
+        </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"
+          >
+            <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>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitForm">确 定</el-button>
+        <el-button @click="open = false">取 消</el-button>
+      </div>
+    </el-dialog>
+  </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,
+      doctorList: [],
+      rules: {},
+    };
+  },
+  methods: {
+    del(id) {
+      this.$confirm("确认删除?", "提示", {
+        type: "warning",
+      }).then(() => {
+        this.$api
+          .delDoctorInfo({
+            id: id,
+          })
+          .then((res) => {
+            if (!res.data.code) {
+              this.$msgSuccess("删除成功");
+              this.getData();
+            } else {
+              this.$msgError(res.data.message);
+            }
+          });
+      });
+    },
+    gopage(size) {
+      if (size) {
+        this.queryParams.page_size = size;
+      }
+      this.queryParams.page = this.$refs.pageButton.page;
+      this.getData();
+    },
+    getData() {
+      this.loading = true;
+      this.$api.getDoctorsList(this.queryParams).then((res) => {
+        this.list = res.data.data.list;
+        this.total = res.data.data.total;
+        this.loading = false;
+      });
+
+      this.$api
+          .getDoctorsSearchList({
+          })
+          .then((res) => {
+            this.doctorList = res.data.data;
+            this.$set(this.doctorList, res.data.data);
+            // this.loading = false;
+          });
+    },
+    handleAdd() {
+      this.open = true;
+      this.title = "新增医生";
+      this.form = {};
+    },
+    edit(id) {
+      this.title = "编辑医生";
+      this.$api
+        .getDoctorInfo({
+          id: id,
+        })
+        .then((res) => {
+          this.form = res.data.data;
+          this.open = true;
+        });
+    },
+    /** 提交按钮 */
+    submitForm() {
+      this.$refs["form"].validate((valid) => {
+        if (valid) {
+          if (this.form.id != null) {
+            this.$api.editDoctorInfo(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.addDoctorInfo(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
+          .getDoctorsSearchList({
+            name: query,
+          })
+          .then((res) => {
+            this.doctorList = res.data.data;
+            this.$set(this.doctorList, res.data.data);
+            // this.loading = false;
+          });
+      } else {
+        this.doctorList = [];
+      }
+    },
+  },
+  created() {
+    this.getData();
+    
+  },
+};
+</script>

+ 252 - 0
src/views/teacher/agreementIndex.vue

@@ -0,0 +1,252 @@
+<style lang="scss">
+.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-icon {
+  font-size: 28px;
+  color: #8c939d;
+  width: 178px;
+  height: 178px;
+  line-height: 178px;
+  text-align: center;
+}
+
+.avatar {
+  width: 178px;
+  height: 178px;
+  display: block;
+}
+</style>
+<template>
+  <section class="content">
+    <h4>用户协议列表</h4>
+    <el-divider></el-divider>
+    <!-- <el-form label-width="80px" class="filter-form">
+      <el-row>
+        <el-col :span="4">
+          <el-form-item label="名称">
+            <el-input
+              clearable
+              @clear="getData()"
+              v-model="queryParams.name"
+              placeholder="请输入名称"
+              size="mini"
+            ></el-input>
+          </el-form-item>
+        </el-col>
+        <el-col :span="4">
+          <el-form-item label="手机号">
+            <el-input
+              clearable
+              @clear="getData()"
+              v-model="queryParams.phone"
+              placeholder="请输入手机号"
+              size="mini"
+            ></el-input>
+          </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
+            >
+            <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-column align="center" prop="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
+          >
+        </template>
+      </el-table-column>
+    </el-table>
+    <Page
+      ref="pageButton"
+      :current="form.page"
+      :page_size="form.page_size"
+      :total="total"
+      @pageChange="gopage"
+    />
+    <!-- 新增医生 -->
+    <el-dialog :title="title" :visible.sync="open" width="800px" 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="协议内容">
+            <vue-ueditor-wrap ref="editor" v-model="form.content" :config="myConfig"></vue-ueditor-wrap>
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitForm">确 定</el-button>
+        <el-button @click="open = false">取 消</el-button>
+      </div>
+    </el-dialog>
+  </section>
+</template>
+<script>
+import Page from "../../components/Page";
+import fuEditor from "@/components/fuEditor/index.vue";
+export default {
+  components: {
+    Page,
+    fuEditor
+  },
+  data() {
+    return {
+      loading: false,
+      queryParams: {
+        page: 1,
+      },
+      form: {},
+      form1: {},
+      form2: {},
+      list: [{}, {}],
+      total: 0,
+      title: "新增用户",
+      open: false,
+      doctorList: [],
+      rules: {},
+      myConfig: {
+	      // 编辑器自动被内容撑高
+	      autoHeightEnabled: true,
+	      // 初始容器高度
+	      initialFrameHeight: 500,
+	      // 初始容器宽度
+	      initialFrameWidth: '100%',
+	      // 上传文件接口,实现上传图片功能必须的配置,这个地址会在后端配置的时候产生,此处先放上结果
+	      serverUrl: '/api/admin/ueditor/upload',
+	    },
+    };
+  },
+  methods: {
+    del(id) {
+      this.$confirm("确认删除?", "提示", {
+        type: "warning",
+      }).then(() => {
+        this.$api
+          .delDoctorInfo({
+            id: id,
+          })
+          .then((res) => {
+            if (!res.data.code) {
+              this.$msgSuccess("删除成功");
+              this.getData();
+            } else {
+              this.$msgError(res.data.message);
+            }
+          });
+      });
+    },
+    gopage(size) {
+      if (size) {
+        this.queryParams.page_size = size;
+      }
+      this.queryParams.page = this.$refs.pageButton.page;
+      this.getData();
+    },
+    getData() {
+      this.loading = true;
+      this.$api.getUserAgreementList(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
+        .getUserAgreementInfo({
+          id: id,
+        })
+        .then((res) => {
+          this.form = res.data.data;
+          this.open = true;
+        });
+    },
+    /** 提交按钮 */
+    submitForm() {
+      this.$refs["form"].validate((valid) => {
+        if (valid) {
+          if (this.form.id != null) {
+            this.$api.editUserAgreement(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.addDoctorInfo(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
+          .getDoctorsSearchList({
+            name: query,
+          })
+          .then((res) => {
+            this.doctorList = res.data.data;
+            this.$set(this.doctorList, res.data.data);
+            // this.loading = false;
+          });
+      } else {
+        this.doctorList = [];
+      }
+    },
+  },
+  created() {
+    this.getData();
+  },
+};
+</script>

+ 204 - 0
src/views/teacher/phcodeList.vue

@@ -0,0 +1,204 @@
+<style lang="scss">
+.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-icon {
+  font-size: 28px;
+  color: #8c939d;
+  width: 178px;
+  height: 178px;
+  line-height: 178px;
+  text-align: center;
+}
+
+.avatar {
+  width: 178px;
+  height: 178px;
+  display: block;
+}
+</style>
+<template>
+  <section class="content">
+    <h4>短信记录列表</h4>
+    
+    <el-divider></el-divider>
+    <el-form :inline="true">
+      <el-form-item label="手机号" >
+          <el-input v-model="queryParams.phone" placeholder="请输入手机号"></el-input>
+      </el-form-item>
+      <el-form-item>
+        <el-button @click="getData" type="primary">搜索</el-button>
+      </el-form-item>
+    </el-form>
+    <el-table
+      v-loading="loading"
+      :data="list"
+      style="width: 100%; margin-top: 10px"
+      height="50vh"
+    >
+      <el-table-column align="center" prop="phone" label="手机号" />
+      <el-table-column align="center" prop="code" label="验证码" />
+      <el-table-column align="center" prop="result" label="发送状态">
+          <template slot-scope="scope">
+            <div>
+                <span style="color:green;" v-if="scope.row.result && scope.row.result.indexOf('success') >-1">成功</span>
+                <span v-else="失败">失败:{{scope.row.result}}</span>
+             </div>
+          </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)" size="mini" type="warning"
+            >重新发送</el-button
+          >
+        </template>
+      </el-table-column>
+    </el-table>
+    <Page
+      ref="pageButton"
+      :current="form.page"
+      :page_size="form.page_size"
+      :total="total"
+      @pageChange="gopage"
+    />
+    <!-- 新增医生 -->
+    <el-dialog :title="title" :visible.sync="open" width="800px" 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.phone"
+            placeholder="请输入手机号"
+          ></el-input>
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button @click="open = false">取 消</el-button>
+        <el-button type="primary" @click="submitForm">发 送</el-button>
+      </div>
+    </el-dialog>
+  </section>
+</template>
+<script>
+import Page from "../../components/Page";
+import fuEditor from "@/components/fuEditor/index.vue";
+export default {
+  components: {
+    Page,
+    fuEditor
+  },
+  data() {
+    return {
+      loading: false,
+      queryParams: {
+        page: 1,
+      },
+      form: {},
+      form1: {},
+      form2: {},
+      list: [{}, {}],
+      total: 0,
+      title: "新增用户",
+      open: false,
+      doctorList: [],
+      rules: {},
+      myConfig: {
+	      // 编辑器自动被内容撑高
+	      autoHeightEnabled: true,
+	      // 初始容器高度
+	      initialFrameHeight: 500,
+	      // 初始容器宽度
+	      initialFrameWidth: '100%',
+	      // 上传文件接口,实现上传图片功能必须的配置,这个地址会在后端配置的时候产生,此处先放上结果
+	      serverUrl: '/api/admin/ueditor/upload',
+	    },
+    };
+  },
+  methods: {
+    del(id) {
+      this.$confirm("确认删除?", "提示", {
+        type: "warning",
+      }).then(() => {
+        this.$api
+          .delDoctorInfo({
+            id: id,
+          })
+          .then((res) => {
+            if (!res.data.code) {
+              this.$msgSuccess("删除成功");
+              this.getData();
+            } else {
+              this.$msgError(res.data.message);
+            }
+          });
+      });
+    },
+    gopage(size) {
+      if (size) {
+        this.queryParams.page_size = size;
+      }
+      this.queryParams.page = this.$refs.pageButton.page;
+      this.getData();
+    },
+    getData() {
+      this.loading = true;
+      this.$api.getPhoneRecordList(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(row) {
+      this.title = "重新发送";
+      this.open = true;
+      this.form = row;
+    },
+    /** 提交按钮 */
+    submitForm() {
+      this.$refs["form"].validate((valid) => {
+          this.$api.sendPhoneCode(this.form).then(res=>{
+            if(res.data.data.indexOf("success")>-1){
+              this.$message.success("成功")
+              this.open = false
+              this.getData()
+            }
+          })
+      });
+    },
+    remoteMethod(query) {
+      if (query !== "") {
+        // this.loading = true;
+        this.$api
+          .getDoctorsSearchList({
+            name: query,
+          })
+          .then((res) => {
+            this.doctorList = res.data.data;
+            this.$set(this.doctorList, res.data.data);
+            // this.loading = false;
+          });
+      } else {
+        this.doctorList = [];
+      }
+    },
+  },
+  created() {
+    this.getData();
+  },
+};
+</script>

+ 272 - 525
src/views/user/index.vue

@@ -1,543 +1,290 @@
 <style lang="scss">
-  .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-icon {
-    font-size: 28px;
-    color: #8c939d;
-    width: 178px;
-    height: 178px;
-    line-height: 178px;
-    text-align: center;
-  }
-  .avatar {
-    width: 178px;
-    height: 178px;
-    display: block;
-  }
-</style>
-<template>
-  <section class="content">
-    <h4>用户管理</h4>
-    <el-divider></el-divider>
-    <el-form label-width="40px" class="filter-form">
-      <el-row>
-        <el-col :span="4">
-          <el-form-item label="用户">
-            <el-input
+
+  </style>
+  <template>
+    <section class="content">
+      <div class="breadcrumb">
+          <el-breadcrumb separator="/">
+              <el-breadcrumb-item><a href="/">系统管理</a></el-breadcrumb-item>
+              <el-breadcrumb-item>用户管理</el-breadcrumb-item>
+          </el-breadcrumb>
+      </div>
+      <el-form :model="queryParams" label-width="80px" class="filter-form" :inine="true">
+        <el-row>
+          <el-col :span="4">
+            <el-form-item label="学校">
+              <el-select size="mini" v-model="queryParams.school_id">
+                <el-option label="人大附中" value="人大附中">人大附中</el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+          <el-col :span="4">
+            <el-form-item label="年级" v-model="queryParams.grade_id">
+              <el-select size="mini">
+                <el-option label="高三一班" value="高三一班">高三一班</el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+          <el-col :span="8">
+            <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-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-column align="center" prop="name" label="班级" />
+        <el-table-column align="center" prop="phone" label="年级" />
+        <el-table-column label="教师">
+          <template slot-scope="scope">
+            <el-link type="primary">查看</el-link>
+          </template>
+        </el-table-column>
+        <el-table-column label="学生">
+          <template slot-scope="scope">
+            <el-link type="primary">查看</el-link>
+          </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
+            >
+          </template>
+        </el-table-column>
+      </el-table>
+      <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="role">
+            <el-select
+              v-model="form.role"
+              placeholder="请选择医生类型"
+              filterable
+            >
+              <el-option
+                v-for="item in $const.doctorRoleList"
+                :key="item.value"
+                :label="item.label"
+                :value="item.value"
+              ></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
-              @clear="getData()"
-              v-model="queryParams.username"
-              placeholder="请输入用户名/代码"
+              filterable
               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-col>
-        <el-col :span="8">
-          <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"
-              icon="el-icon-plus"
-              size="mini"
-              @click="handleFastAdd"
-              >新增选手</el-button
-            > -->
+          <el-form-item label="手机号" prop="phone">
+            <el-input
+              clearable
+              v-model="form.phone"
+              placeholder="请输入手机号"
+            ></el-input>
           </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-column align="center" prop="usercode" label="登录代码" />
-      <el-table-column align="center" prop="username" label="用户名" />
-      <el-table-column align="center" prop="nickname" label="微信昵称" />
-      <el-table-column align="center" prop="openid" label="微信ID" />
-      <el-table-column label="头像">
-        <template slot-scope="scope">
-            <el-image
-              style="width: 100px; height: 100px"
-              :src="scope.row.avatar"
-              :preview-src-list="[scope.row.avatar]"
-              ></el-image>
-        </template>
-      </el-table-column>
-      <el-table-column
-        header-align="center"
-        align="center"
-        prop="prop"
-        label="开户类型" >
-        <template slot-scope="scope">
-          <span v-if="scope.row.player_type==0">游客</span>
-          <span v-if="scope.row.player_type==1">普通选手</span>
-          <span v-if="scope.row.player_type==2">种子选手</span></span>
-          <span v-if="scope.row.player_type==3">开户选手</span>
-        </template>
-      </el-table-column>
-      <el-table-column align="center" prop="phone" label="手机号" />
-      <el-table-column align="center" prop="zq" label="周期" />
-      <el-table-column align="center" prop="cw" label="仓位" />
-      <el-table-column align="center" prop="df" label="打法" />
-      <!-- <el-table-column align="center" prop="pz" label="品种" /> -->
-      <el-table-column align="center"  prop="badge" label="徽章"/>
-      <el-table-column align="center" prop="date" label="绑定">
-        <template slot-scope="scope">
-          <span v-if="scope.row.is_bind">已绑定</span>
-          <span v-else>未绑定</span>
-        </template>
-      </el-table-column>
-      <!-- <el-table-column align="center"  prop="date" 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 v-if="scope.row.openid" @click="relationOld(scope.row)" size="mini" type="danger">关联老用户</el-button>
-          <el-button v-if="scope.row.comment_status==1" @click="black(scope.row)" size="mini" type="primary">拉黑</el-button>
-          <el-button v-else @click="black(scope.row)" size="mini" type="primary">取消拉黑</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"
-    />
-    <!-- 新增用户 -->
-    <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="username">
-          <el-input
-            clearable
-            v-model="form.username"
-            placeholder="请输入用户名"
-          ></el-input>
-        </el-form-item>
-        <el-form-item label="用户代码" prop="usercode">
-          <el-input
-            clearable
-            v-model="form.usercode"
-            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="player_type">
-          <el-select v-model="form.player_type" placeholder="">
-            <el-option
-              v-for="item in playerType"
-              :key="item.value"
-              :label="item.label"
-              :value="item.value">
-            </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"
-          >
-            <img v-if="form.avatar" :src="form.avatar" class="avatar" />
-            <i v-else class="el-icon-plus avatar-uploader-icon"></i>
-          </el-upload>
-          <span style="color:red;">尺寸要求100*100</span>
-        </el-form-item>
-        <el-form-item label="手机号" prop="phone" v-if="form.player_type==2||form.player_type==3">
-          <el-input
-            clearable
-            v-model="form.phone"
-            placeholder="请输入手机号"
-          ></el-input>
-        </el-form-item>
-        <el-form-item label="徽章">
-          <el-select v-model="form.badge" placeholder="请选择徽章">
-            <el-option v-for="(item,index) in badgeList" :key="index" :label="item" :value="item"></el-option>
-          </el-select>
-        </el-form-item>
-        <el-form-item label="周期">
-          <el-select v-model="form.zq" placeholder="请选择周期">
-            <el-option v-for="(item,index) in zqList" :key="index" :label="item" :value="item"></el-option>
-          </el-select>
-        </el-form-item>
-        <el-form-item label="仓位">
-          <el-select v-model="form.cw" placeholder="请选择仓位">
-            <el-option v-for="(item,index) in cwList" :key="index" :label="item" :value="item"></el-option>
-          </el-select>
-        </el-form-item>
-        <el-form-item label="打法">
-          <el-select v-model="form.df" placeholder="请选择打法">
-            <el-option v-for="(item,index) in dfList" :key="index" :label="item" :value="item"></el-option>
-          </el-select>
-        </el-form-item>
-        <el-form-item label="用户代码" v-if="form.id">
-          <el-select v-model="form.is_bind" placeholder="请选择比赛分组">
-            <el-option label="已绑定" :value="1"></el-option>
-            <el-option label="未绑定" :value="0"></el-option>
-          </el-select>
-        </el-form-item>
-      </el-form>
-      <div slot="footer" class="dialog-footer">
-        <el-button type="primary" @click="submitForm">确 定</el-button>
-        <el-button @click="open = false">取 消</el-button>
-      </div>
-    </el-dialog>
-    <!-- 新增选手 -->
-    <el-dialog
-      :title="title"
-      :visible.sync="open1"
-      width="500px"
-      append-to-body
-    >
-      <el-form ref="form1" :model="form1" :rules="rules1" label-width="80px">
-        <el-form-item label="用户名" prop="username">
-          <el-input
-            clearable
-            v-model="form1.username"
-            placeholder="请输入用户名"
-          ></el-input>
-        </el-form-item>
-        <el-form-item label="用户代码" prop="usercode">
-          <el-input
-            clearable
-            v-model="form1.usercode"
-            placeholder="请输入用户代码"
-          ></el-input>
-        </el-form-item>
-        <!-- <el-form-item label="初始资金" prop="fund">
-          <el-input clearable v-model="form1.fund" placeholder="请输入初始资金">
-            <template slot="append">万元</template>
-          </el-input>
-        </el-form-item> -->
-        <el-form-item label="比赛名称" prop="match_id">
-          <el-select v-model="form1.match_id" placeholder="请选择比赛">
-            <el-option
-              v-for="item in matchList"
-              :key="item.id"
-              :label="item.name"
-              :value="item.id"
-            ></el-option>
-          </el-select>
-        </el-form-item>
-        <el-form-item label="比赛分组" prop="match_group">
-          <el-select v-model="form1.match_group" placeholder="请选择比赛分组">
-            <el-option
-              v-for="item in groupList"
-              :key="item.id"
-              :label="item.name"
-              :value="item.id"
-            ></el-option>
-          </el-select>
-        </el-form-item>
-        <el-form-item label="参数状态" prop="match_status">
-          <el-select v-model="form1.match_status" placeholder="请选择参数状态">
-            <el-option key="1" label="参赛中" :value="1"></el-option>
-            <el-option key="0" label="暂停" :value="0"></el-option>
-            <el-option key="-1" label="已退赛" :value="-1"></el-option>
-          </el-select>
-        </el-form-item>
-      </el-form>
-      <div slot="footer" class="dialog-footer">
-        <el-button type="primary" @click="fastSavePlayer">确 定</el-button>
-        <el-button @click="open1 = false">取 消</el-button>
-      </div>
-    </el-dialog>
-    <!-- 关联老用户 -->
-    <el-dialog
-      title="关联老用户(无openid的老用户)"
-      :visible.sync="open2"
-      width="500px"
-      append-to-body
-    >
-      <el-form ref="form2" :model="form2" :rules="rules1" label-width="80px">
-        <el-form-item label="老用户">
-          <el-select v-model="form2.old_user_id" placeholder="请选择需要关联的老用户" filterable>
-            <el-option v-for="(item,index) in allUsers" :key="index" :label="item.username+item.usercode" :value="item.id"></el-option>
-          </el-select>
-        </el-form-item>
-        <h3 style="color:red;">此功能为老用户由于缺少openid账号被出新注册后丢失数据情况使用,请谨慎操作,如查找不到相应老用户请及时联系技术处理!!!</h3>
-      </el-form>
-      <div slot="footer" class="dialog-footer">
-        <el-button type="primary" @click="saveRelationOld">确 定</el-button>
-        <el-button @click="open2 = false">取 消</el-button>
-      </div>
-    </el-dialog>
-  </section>
-</template>
-<script>
-import Page from "../../components/Page";
-export default {
-  components: {
-    Page,
-  },
-  data() {
-    return {
-      allUsers:[],
-      badgeList:[
-        "选手",
-        "冠军",
-        "第一",
-        "榜眼",
-        "探花郎",
-        "腰斩VIP"
-      ],
-      zqList:[
-        "短线",
-        "中线",
-        "长线",
-        "中短线"
-      ],
-      cwList:[
-        "轻仓",
-        "分仓",
-        "重仓",
-        "全仓"
-      ],
-      dfList:[
-        "低吸",
-        "半路",
-        "首板",
-        "接力",
-        "撬板",
-        "核按钮"
-      ],
-      loading: false,
-      queryParams: {
-        page: 1,
-      },
-      form: {},
-      form1: {},
-      form2:{},
-      list: [{}, {}],
-      total: 0,
-      title: "新增用户",
-      open: false,
-      open1: false,
-      open2:false,
-      matchList: [],
-      groupList: [],
-      rules: {
-        username: [
-          { required: true, message: "请输入用户名", trigger: "blur" },
-        ],
-        player_type: [
-          { required: true, message: "请选择用户类型", trigger: "change" },
-        ],
-        phone: [
-          { required: true, message: "请输入用户手机号", trigger: "blur" },
-        ],
-        avatar: [
-          { required: true, message: "请输入用户手机号", trigger: "change" },
-        ],
-      },
-      rules1: {
-        match_id: [
-          { required: true, message: "请选择比赛", trigger: "change" },
-        ],
-        username: [
-          { required: true, message: "请输入用户名", trigger: "blur" },
-        ],
-        match_group: [
-          { required: true, message: "请选择分组", trigger: "change" },
-        ],
-        match_status: [
-          { required: true, message: "请选择参数状态", trigger: "change" },
-        ],
-      },
-      playerType:[
-          {label:"游客",value:0},
-          {label:"普通选手",value:1},
-          {label:"种子选手",value:2},
-          {label:"开户选手",value:3}
-      ]
-    };
-  },
-  methods: {
-    del(id) {
-      this.$confirm("删除用户会删除相关数据,确定删除吗?", "提示", {
-        type: "warning",
-      }).then(() => {
-        this.$api.delUser({ 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.getMatchList().then((res) => {
-        this.matchList = res.data.data;
-      });
-      this.$api.getGroupList().then((res) => {
-        this.groupList = res.data.data;
-      });
-      this.$api.getUserList(this.queryParams).then((res) => {
-        this.list = res.data.data.list;
-        this.total = res.data.data.total;
-        this.loading = false;
-      });
-      this.$api.getopenidmiss().then(res=>{
-        this.allUsers = res.data.data
-      })
-    },
-    handleAdd() {
-      this.open = true;
-      this.title = "新增用户";
-      this.form = {};
+  
+          <el-form-item label="医院" prop="hospital_name">
+            <el-input
+              clearable
+              v-model="form.hospital_name"
+              placeholder="请输入医院"
+            ></el-input>
+          </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"
+            >
+              <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>
+        <div slot="footer" class="dialog-footer">
+          <el-button type="primary" @click="submitForm">确 定</el-button>
+          <el-button @click="open = false">取 消</el-button>
+        </div>
+      </el-dialog>
+    </section>
+  </template>
+  <script>
+  import Page from "../../components/Page";
+  export default {
+    components: {
+      Page,
     },
-    handleFastAdd() {
-      this.open1 = true;
-      this.title = "新增选手";
-      this.form1 = {
-        match_status: 1,
-        match_id: this.matchList[0].id,
+    data() {
+      return {
+        loading: false,
+        queryParams: {
+          page: 1,
+        },
+        form: {},
+        form1: {},
+        form2: {},
+        list: [{}, {}],
+        total: 0,
+        title: "新增用户",
+        open: false,
+        doctorList: [],
+        rules: {},
       };
     },
-    edit(id) {
-      this.title = "编辑用户";
-      this.$api.getUserInfo({ id: id }).then((res) => {
-        this.form = res.data.data;
-        this.open = true;
-      });
-    },
-    black(row){
-        this.$api.commentsBlack({id:row.id}).then(res=>{
-            this.getData()
-        })
-    },
-    relationOld(row){
-        this.open2 = true;
-        this.form2.user_id = row.id
-    },
-    saveRelationOld(){
-      this.$api.relationOld(this.form2).then(res=>{
-        if(res.data.code==0){
-          this.$message.success("关联成功!")
-        }else{
-          this.$message.error(res.data.message)
-        }
-      })
-    },
-    handleAvatarSuccess(res, file) {
-      this.form.avatar = 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) => {
-        if (valid) {
-          if (this.form.id != null) {
-            this.$api.editUser(this.form).then((res) => {
-              if (res.data.code == 0) {
-                this.msgSuccess("成功!");
-                this.open = false;
+    methods: {
+      del(id) {
+        this.$confirm("确认删除?", "提示", {
+          type: "warning",
+        }).then(() => {
+          this.$api
+            .delDoctorInfo({
+              id: id,
+            })
+            .then((res) => {
+              if (!res.data.code) {
+                this.$msgSuccess("删除成功");
                 this.getData();
               } else {
-                this.msgError(res.data.message);
+                this.$msgError(res.data.message);
               }
             });
-          } else {
-            this.$api.addUser(this.form).then((res) => {
-              if (res.data.code == 0) {
-                this.msgSuccess("成功!");
-                this.open = false;
-                this.getData();
-              } else {
-                this.msgError(res.data.message);
-              }
-            });
-          }
+        });
+      },
+      gopage(size) {
+        if (size) {
+          this.queryParams.page_size = size;
         }
-      });
-    },
-    // 创建选手同时创建用户
-    fastSavePlayer() {
-      this.$refs["form1"].validate((valid) => {
-        if (valid) {
-          if (this.form1.id != null) {
-            this.$api.fastSavePlayer(this.form1).then((res) => {
-              if (res.data.code == 0) {
-                this.msgSuccess("成功!");
-                this.open = false;
-                this.getData();
-              } else {
-                this.msgError(res.data.message);
-              }
-            });
-          } else {
-            this.$api.fastSavePlayer(this.form1).then((res) => {
-              if (res.data.code == 0) {
-                this.msgSuccess("成功!");
-                this.open1 = false;
-                this.getData();
-              } else {
-                this.msgError(res.data.message);
-              }
+        this.queryParams.page = this.$refs.pageButton.page;
+        this.getData();
+      },
+      getData() {
+        this.loading = true;
+        this.$api.getDoctorsList(this.queryParams).then((res) => {
+          this.list = res.data.data.list;
+          this.total = res.data.data.total;
+          this.loading = false;
+        });
+  
+        this.$api
+            .getDoctorsSearchList({
+            })
+            .then((res) => {
+              this.doctorList = res.data.data;
+              this.$set(this.doctorList, res.data.data);
+              // this.loading = false;
             });
+      },
+      handleAdd() {
+        this.open = true;
+        this.title = "新增医生";
+        this.form = {};
+      },
+      edit(id) {
+        this.title = "编辑医生";
+        this.$api
+          .getDoctorInfo({
+            id: id,
+          })
+          .then((res) => {
+            this.form = res.data.data;
+            this.open = true;
+          });
+      },
+      /** 提交按钮 */
+      submitForm() {
+        this.$refs["form"].validate((valid) => {
+          if (valid) {
+            if (this.form.id != null) {
+              this.$api.editDoctorInfo(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.addDoctorInfo(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
+            .getDoctorsSearchList({
+              name: query,
+            })
+            .then((res) => {
+              this.doctorList = res.data.data;
+              this.$set(this.doctorList, res.data.data);
+              // this.loading = false;
+            });
+        } else {
+          this.doctorList = [];
         }
-      });
+      },
+    },
+    created() {
+      this.getData();
     },
-  },
-  created() {
-    this.getData();
-  },
-};
-</script>
+  };
+  </script>

+ 290 - 0
src/views/user/role.vue

@@ -0,0 +1,290 @@
+<style lang="scss">
+
+  </style>
+  <template>
+    <section class="content">
+      <div class="breadcrumb">
+          <el-breadcrumb separator="/">
+              <el-breadcrumb-item><a href="/">系统管理</a></el-breadcrumb-item>
+              <el-breadcrumb-item>角色管理</el-breadcrumb-item>
+          </el-breadcrumb>
+      </div>
+      <el-form :model="queryParams" label-width="80px" class="filter-form" :inine="true">
+        <el-row>
+          <el-col :span="4">
+            <el-form-item label="学校">
+              <el-select size="mini" v-model="queryParams.school_id">
+                <el-option label="人大附中" value="人大附中">人大附中</el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+          <el-col :span="4">
+            <el-form-item label="年级" v-model="queryParams.grade_id">
+              <el-select size="mini">
+                <el-option label="高三一班" value="高三一班">高三一班</el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+          <el-col :span="8">
+            <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-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-column align="center" prop="name" label="班级" />
+        <el-table-column align="center" prop="phone" label="年级" />
+        <el-table-column label="教师">
+          <template slot-scope="scope">
+            <el-link type="primary">查看</el-link>
+          </template>
+        </el-table-column>
+        <el-table-column label="学生">
+          <template slot-scope="scope">
+            <el-link type="primary">查看</el-link>
+          </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
+            >
+          </template>
+        </el-table-column>
+      </el-table>
+      <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="role">
+            <el-select
+              v-model="form.role"
+              placeholder="请选择医生类型"
+              filterable
+            >
+              <el-option
+                v-for="item in $const.doctorRoleList"
+                :key="item.value"
+                :label="item.label"
+                :value="item.value"
+              ></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
+              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
+              v-model="form.hospital_name"
+              placeholder="请输入医院"
+            ></el-input>
+          </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"
+            >
+              <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>
+        <div slot="footer" class="dialog-footer">
+          <el-button type="primary" @click="submitForm">确 定</el-button>
+          <el-button @click="open = false">取 消</el-button>
+        </div>
+      </el-dialog>
+    </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,
+        doctorList: [],
+        rules: {},
+      };
+    },
+    methods: {
+      del(id) {
+        this.$confirm("确认删除?", "提示", {
+          type: "warning",
+        }).then(() => {
+          this.$api
+            .delDoctorInfo({
+              id: id,
+            })
+            .then((res) => {
+              if (!res.data.code) {
+                this.$msgSuccess("删除成功");
+                this.getData();
+              } else {
+                this.$msgError(res.data.message);
+              }
+            });
+        });
+      },
+      gopage(size) {
+        if (size) {
+          this.queryParams.page_size = size;
+        }
+        this.queryParams.page = this.$refs.pageButton.page;
+        this.getData();
+      },
+      getData() {
+        this.loading = true;
+        this.$api.getDoctorsList(this.queryParams).then((res) => {
+          this.list = res.data.data.list;
+          this.total = res.data.data.total;
+          this.loading = false;
+        });
+  
+        this.$api
+            .getDoctorsSearchList({
+            })
+            .then((res) => {
+              this.doctorList = res.data.data;
+              this.$set(this.doctorList, res.data.data);
+              // this.loading = false;
+            });
+      },
+      handleAdd() {
+        this.open = true;
+        this.title = "新增医生";
+        this.form = {};
+      },
+      edit(id) {
+        this.title = "编辑医生";
+        this.$api
+          .getDoctorInfo({
+            id: id,
+          })
+          .then((res) => {
+            this.form = res.data.data;
+            this.open = true;
+          });
+      },
+      /** 提交按钮 */
+      submitForm() {
+        this.$refs["form"].validate((valid) => {
+          if (valid) {
+            if (this.form.id != null) {
+              this.$api.editDoctorInfo(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.addDoctorInfo(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
+            .getDoctorsSearchList({
+              name: query,
+            })
+            .then((res) => {
+              this.doctorList = res.data.data;
+              this.$set(this.doctorList, res.data.data);
+              // this.loading = false;
+            });
+        } else {
+          this.doctorList = [];
+        }
+      },
+    },
+    created() {
+      this.getData();
+    },
+  };
+  </script>

+ 3 - 8
vue.config.js

@@ -2,16 +2,11 @@ module.exports = {
     devServer: {
         proxy: {
             '/api': {
-                // target:'http://39.107.246.59:81',
-                // target: 'https://api.hunanwanzhu.com',
-                // target:'http://caos.tederen.com',
-                // target: 'https://wx.scxjc.club',
-                // target: 'http://47.107.124.163:8068',
-                // target: 'http://120.78.138.64',
-                target: 'http://xjctest.baianxi.com',
+                // target: 'http://xjctest.baianxi.com',
+                target: 'http://118.190.145.217:8091',
                 changeOrigin: true,
             }
         }
     },
-    publicPath: '/admin'
+    publicPath: '/'
 }