Browse Source

添加全局公共队列

newMaster
1747191978@qq.com 4 months ago
parent
commit
838dfcb68a
  1. 9
      acupuncture-前台/src/api/followupFile.js
  2. 19
      acupuncture-前台/src/views/followFile/index.vue
  3. 8
      acupuncture-前台/src/views/followFile/subjects.vue
  4. 140
      acupuncture-前台/src/views/login.vue
  5. 6
      acupuncture-前台/src/views/medicalFile/index.vue
  6. 18
      acupuncture-前台/src/views/patientFile/index.vue

9
acupuncture-前台/src/api/followupFile.js

@ -1,5 +1,12 @@
import request from "@/utils/request";
// 公共队列
export function commonQueue(data) {
return request({
url: "/followup/commonQueue",
method: "post",
data: data,
});
}
// 随访队列
export function followupQuery(data) {
return request({

19
acupuncture-前台/src/views/followFile/index.vue

@ -119,13 +119,24 @@
>
<template slot-scope="scope">
<span v-if="scope.row.status == 0" style="color: #F56C6C">禁用</span>
<span v-else style="color: #67C23A">本院</span>
</template>
</el-table-column>
<el-table-column
label="状态"
align="center"
show-overflow-tooltip
min-width="100"
>
<template slot-scope="scope">
<span v-if="scope.row.type == 1"> 公共</span>
<span v-if="scope.row.status == 1" style="color: #67C23A">启用</span>
</template>
</el-table-column>
<el-table-column
label="创建人/创建时间"
align="center"
min-width="130"
min-width="140"
fixed="right"
>
<template slot-scope="scope">
@ -247,6 +258,7 @@ import {
followupAdd,
followupUpd,
followupDel,
commonQueue
} from "@/api/followupFile";
export default {
name: "Notice",
@ -338,11 +350,16 @@ export default {
crontabFill(value) {
this.form.frequency = value;
},
/** 查询公告列表 */
getList() {
this.loading = true;
followupQuery(this.queryParams).then((res) => {
let commonQueue = JSON.parse(localStorage.getItem('commonQueue'))
this.listDat = res.data.list;
commonQueue.forEach(i=>{
this.listDat.unshift(i)
})
this.total = res.data.total;
this.loading = false;
});

8
acupuncture-前台/src/views/followFile/subjects.vue

@ -47,8 +47,9 @@
max-height="600"
>
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="姓名" align="center" prop="name" width="100" />
<el-table-column label="姓名" align="center" prop="name" width="100" fixed/>
<el-table-column
fixed
label="性别"
align="center"
prop="gender"
@ -62,6 +63,7 @@
</el-table-column>
<el-table-column
fixed
label="出生日期"
align="center"
prop="birthDate"
@ -286,6 +288,10 @@ export default {
},
}).then((res) => {
this.followupList = res.data.list;
let commonQueue = JSON.parse(localStorage.getItem('commonQueue'))
commonQueue.forEach(i=>{
this.followupList.unshift(i)
})
});
},

140
acupuncture-前台/src/views/login.vue

@ -1,79 +1,36 @@
<template>
<div class="login">
<el-form
ref="loginForm"
:model="loginForm"
:rules="loginRules"
class="login-form"
>
<el-form ref="loginForm" :model="loginForm" :rules="loginRules" class="login-form">
<h3 class="title">针灸后台管理系统</h3>
<el-form-item prop="username">
<el-input
v-model="loginForm.username"
type="text"
auto-complete="off"
placeholder="账号"
>
<svg-icon
slot="prefix"
icon-class="user"
class="el-input__icon input-icon"
/>
<el-input v-model="loginForm.username" type="text" auto-complete="off" placeholder="账号">
<svg-icon slot="prefix" icon-class="user" class="el-input__icon input-icon" />
</el-input>
</el-form-item>
<el-form-item prop="password">
<el-input
v-model="loginForm.password"
type="password"
auto-complete="off"
placeholder="密码"
@keyup.enter.native="handleLogin"
>
<svg-icon
slot="prefix"
icon-class="password"
class="el-input__icon input-icon"
/>
<el-input v-model="loginForm.password" type="password" auto-complete="off" placeholder="密码"
@keyup.enter.native="handleLogin">
<svg-icon slot="prefix" icon-class="password" class="el-input__icon input-icon" />
</el-input>
</el-form-item>
<el-form-item prop="code" v-if="captchaEnabled">
<el-input
v-model="loginForm.code"
auto-complete="off"
placeholder="验证码"
style="width: 63%"
@keyup.enter.native="handleLogin"
>
<svg-icon
slot="prefix"
icon-class="validCode"
class="el-input__icon input-icon"
/>
<el-input v-model="loginForm.code" auto-complete="off" placeholder="验证码" style="width: 63%"
@keyup.enter.native="handleLogin">
<svg-icon slot="prefix" icon-class="validCode" class="el-input__icon input-icon" />
</el-input>
<div class="login-code">
<img :src="codeUrl" @click="getCode" class="login-code-img" />
</div>
</el-form-item>
<el-checkbox
v-model="loginForm.rememberMe"
style="margin: 0px 0px 25px 0px"
>记住密码</el-checkbox
>
<el-checkbox v-model="loginForm.rememberMe" style="margin: 0px 0px 25px 0px">记住密码</el-checkbox>
<el-form-item style="width: 100%">
<el-button
:loading="loading"
size="medium"
type="primary"
style="width: 100%"
@click.native.prevent="handleLogin"
>
<el-button :loading="loading" size="medium" type="primary" style="width: 100%"
@click.native.prevent="handleLogin">
<span v-if="!loading"> </span>
<span v-else> 中...</span>
</el-button>
<div style="float: right" v-if="register">
<router-link class="link-type" :to="'/register'"
>立即注册</router-link
>
<router-link class="link-type" :to="'/register'">立即注册</router-link>
</div>
</el-form-item>
</el-form>
@ -85,10 +42,17 @@
</template>
<script>
import { getCodeImg } from "@/api/login";
import {
getCodeImg
} from "@/api/login";
import Cookies from "js-cookie";
import { encrypt, decrypt } from "@/utils/jsencrypt";
import {
encrypt,
decrypt
} from "@/utils/jsencrypt";
import {
commonQueue
} from "@/api/followupFile";
export default {
name: "Login",
data() {
@ -102,13 +66,21 @@ export default {
uuid: "",
},
loginRules: {
username: [
{ required: true, trigger: "blur", message: "请输入您的账号" },
],
password: [
{ required: true, trigger: "blur", message: "请输入您的密码" },
],
code: [{ required: true, trigger: "change", message: "请输入验证码" }],
username: [{
required: true,
trigger: "blur",
message: "请输入您的账号"
}, ],
password: [{
required: true,
trigger: "blur",
message: "请输入您的密码"
}, ],
code: [{
required: true,
trigger: "change",
message: "请输入验证码"
}],
},
loading: false,
//
@ -147,8 +119,7 @@ export default {
const rememberMe = Cookies.get("rememberMe");
this.loginForm = {
username: username === undefined ? this.loginForm.username : username,
password:
password === undefined ? this.loginForm.password : decrypt(password),
password: password === undefined ? this.loginForm.password : decrypt(password),
rememberMe: rememberMe === undefined ? false : Boolean(rememberMe),
};
},
@ -157,7 +128,9 @@ export default {
if (valid) {
this.loading = true;
if (this.loginForm.rememberMe) {
Cookies.set("username", this.loginForm.username, { expires: 30 });
Cookies.set("username", this.loginForm.username, {
expires: 30
});
Cookies.set("password", encrypt(this.loginForm.password), {
expires: 30,
});
@ -172,7 +145,11 @@ export default {
this.$store
.dispatch("Login", this.loginForm)
.then(() => {
this.$router.push({ path: this.redirect || "/" }).catch(() => {});
this.$router.push({
path: this.redirect || "/"
}).catch(() => {});
this.getCommonQueue()
})
.catch(() => {
this.loading = false;
@ -183,6 +160,20 @@ export default {
}
});
},
//
getCommonQueue() {
commonQueue({
pageNum: -1,
param: {
status: 1
},
}).then((res) => {
res.data.list.forEach(i=>{
i.type = 1
})
localStorage.setItem('commonQueue', JSON.stringify(res.data.list))
});
},
},
};
</script>
@ -196,6 +187,7 @@ export default {
background-image: url("../assets/images/login-background.jpg");
background-size: cover;
}
.title {
margin: 0px auto 30px auto;
text-align: center;
@ -207,32 +199,39 @@ export default {
background: #ffffff;
width: 400px;
padding: 25px 25px 5px 25px;
.el-input {
height: 38px;
input {
height: 38px;
}
}
.input-icon {
height: 39px;
width: 14px;
margin-left: 2px;
}
}
.login-tip {
font-size: 13px;
text-align: center;
color: #bfbfbf;
}
.login-code {
width: 33%;
height: 38px;
float: right;
img {
cursor: pointer;
vertical-align: middle;
}
}
.el-login-footer {
height: 40px;
line-height: 40px;
@ -245,6 +244,7 @@ export default {
font-size: 12px;
letter-spacing: 1px;
}
.login-code-img {
height: 38px;
}

6
acupuncture-前台/src/views/medicalFile/index.vue

@ -1062,7 +1062,7 @@
},
created() {
let idCard = this.$route.query.idCard
this.queryParams.param.idCard = idCard || ''
this.queryParams.param.keywords = idCard || ''
this.getList();
this.getFollowupQuery();
},
@ -1076,6 +1076,10 @@
},
}).then((res) => {
this.followupList = res.data.list;
let commonQueue = JSON.parse(localStorage.getItem('commonQueue'))
commonQueue.forEach(i=>{
this.followupList.unshift(i)
})
});
},
//

18
acupuncture-前台/src/views/patientFile/index.vue

@ -299,7 +299,23 @@
required: true,
message: "手机号码不能为空",
trigger: "blur"
}, ],
},{
//
validator: (rule, value, callback) => {
// truefalse
// required: falsetrue
let regs = /^1[3-9]\d{9}$/;
if (!regs.test(this.form.phone)) {
return false
}else{
return true
}
},
message: '手机号码格式不正确',
// blurchange
trigger: ['change','blur'],
}
],
ethnicity: [{
required: true,
message: "民族不能为空",

Loading…
Cancel
Save