Browse Source

添加全局公共队列

new
1747191978@qq.com 1 year ago
parent
commit
838dfcb68a
  1. 9
      acupuncture-前台/src/api/followupFile.js
  2. 21
      acupuncture-前台/src/views/followFile/index.vue
  3. 8
      acupuncture-前台/src/views/followFile/subjects.vue
  4. 482
      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"; import request from "@/utils/request";
// 公共队列
export function commonQueue(data) {
return request({
url: "/followup/commonQueue",
method: "post",
data: data,
});
}
// 随访队列 // 随访队列
export function followupQuery(data) { export function followupQuery(data) {
return request({ return request({

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

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

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

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

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

@ -1,251 +1,251 @@
<template> <template>
<div class="login"> <div class="login">
<el-form <el-form ref="loginForm" :model="loginForm" :rules="loginRules" class="login-form">
ref="loginForm" <h3 class="title">针灸后台管理系统</h3>
:model="loginForm" <el-form-item prop="username">
:rules="loginRules" <el-input v-model="loginForm.username" type="text" auto-complete="off" placeholder="账号">
class="login-form" <svg-icon slot="prefix" icon-class="user" class="el-input__icon input-icon" />
> </el-input>
<h3 class="title">针灸后台管理系统</h3> </el-form-item>
<el-form-item prop="username"> <el-form-item prop="password">
<el-input <el-input v-model="loginForm.password" type="password" auto-complete="off" placeholder="密码"
v-model="loginForm.username" @keyup.enter.native="handleLogin">
type="text" <svg-icon slot="prefix" icon-class="password" class="el-input__icon input-icon" />
auto-complete="off" </el-input>
placeholder="账号" </el-form-item>
> <el-form-item prop="code" v-if="captchaEnabled">
<svg-icon <el-input v-model="loginForm.code" auto-complete="off" placeholder="验证码" style="width: 63%"
slot="prefix" @keyup.enter.native="handleLogin">
icon-class="user" <svg-icon slot="prefix" icon-class="validCode" class="el-input__icon input-icon" />
class="el-input__icon input-icon" </el-input>
/> <div class="login-code">
</el-input> <img :src="codeUrl" @click="getCode" class="login-code-img" />
</el-form-item> </div>
<el-form-item prop="password"> </el-form-item>
<el-input <el-checkbox v-model="loginForm.rememberMe" style="margin: 0px 0px 25px 0px">记住密码</el-checkbox>
v-model="loginForm.password" <el-form-item style="width: 100%">
type="password" <el-button :loading="loading" size="medium" type="primary" style="width: 100%"
auto-complete="off" @click.native.prevent="handleLogin">
placeholder="密码" <span v-if="!loading"> </span>
@keyup.enter.native="handleLogin" <span v-else> 中...</span>
> </el-button>
<svg-icon <div style="float: right" v-if="register">
slot="prefix" <router-link class="link-type" :to="'/register'">立即注册</router-link>
icon-class="password" </div>
class="el-input__icon input-icon" </el-form-item>
/> </el-form>
</el-input> <!-- 底部 -->
</el-form-item> <div class="el-login-footer">
<el-form-item prop="code" v-if="captchaEnabled"> <span>Copyright © 2018-2025 ruoyi.vip All Rights Reserved.</span>
<el-input </div>
v-model="loginForm.code" </div>
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-form-item style="width: 100%">
<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
>
</div>
</el-form-item>
</el-form>
<!-- 底部 -->
<div class="el-login-footer">
<span>Copyright © 2018-2025 ruoyi.vip All Rights Reserved.</span>
</div>
</div>
</template> </template>
<script> <script>
import { getCodeImg } from "@/api/login"; import {
import Cookies from "js-cookie"; getCodeImg
import { encrypt, decrypt } from "@/utils/jsencrypt"; } from "@/api/login";
import Cookies from "js-cookie";
import {
encrypt,
decrypt
} from "@/utils/jsencrypt";
import {
commonQueue
} from "@/api/followupFile";
export default {
name: "Login",
data() {
return {
codeUrl: "",
loginForm: {
username: "admin",
password: "admin123",
rememberMe: false,
code: "",
uuid: "",
},
loginRules: {
username: [{
required: true,
trigger: "blur",
message: "请输入您的账号"
}, ],
password: [{
required: true,
trigger: "blur",
message: "请输入您的密码"
}, ],
code: [{
required: true,
trigger: "change",
message: "请输入验证码"
}],
},
loading: false,
//
captchaEnabled: true,
//
register: false,
redirect: undefined,
};
},
watch: {
$route: {
handler: function(route) {
this.redirect = route.query && route.query.redirect;
},
immediate: true,
},
},
created() {
this.getCode();
this.getCookie();
},
methods: {
getCode() {
getCodeImg().then((res) => {
this.captchaEnabled =
res.captchaEnabled === undefined ? true : res.captchaEnabled;
if (this.captchaEnabled) {
this.codeUrl = "data:image/gif;base64," + res.img;
this.loginForm.uuid = res.uuid;
}
});
},
getCookie() {
const username = Cookies.get("username");
const password = Cookies.get("password");
const rememberMe = Cookies.get("rememberMe");
this.loginForm = {
username: username === undefined ? this.loginForm.username : username,
password: password === undefined ? this.loginForm.password : decrypt(password),
rememberMe: rememberMe === undefined ? false : Boolean(rememberMe),
};
},
handleLogin() {
this.$refs.loginForm.validate((valid) => {
if (valid) {
this.loading = true;
if (this.loginForm.rememberMe) {
Cookies.set("username", this.loginForm.username, {
expires: 30
});
Cookies.set("password", encrypt(this.loginForm.password), {
expires: 30,
});
Cookies.set("rememberMe", this.loginForm.rememberMe, {
expires: 30,
});
} else {
Cookies.remove("username");
Cookies.remove("password");
Cookies.remove("rememberMe");
}
this.$store
.dispatch("Login", this.loginForm)
.then(() => {
export default { this.$router.push({
name: "Login", path: this.redirect || "/"
data() { }).catch(() => {});
return { this.getCommonQueue()
codeUrl: "", })
loginForm: { .catch(() => {
username: "admin", this.loading = false;
password: "admin123", if (this.captchaEnabled) {
rememberMe: false, this.getCode();
code: "", }
uuid: "", });
}, }
loginRules: { });
username: [ },
{ required: true, trigger: "blur", message: "请输入您的账号" }, //
], getCommonQueue() {
password: [ commonQueue({
{ required: true, trigger: "blur", message: "请输入您的密码" }, pageNum: -1,
], param: {
code: [{ required: true, trigger: "change", message: "请输入验证码" }], status: 1
}, },
loading: false, }).then((res) => {
// res.data.list.forEach(i=>{
captchaEnabled: true, i.type = 1
// })
register: false, localStorage.setItem('commonQueue', JSON.stringify(res.data.list))
redirect: undefined, });
}; },
}, },
watch: { };
$route: {
handler: function (route) {
this.redirect = route.query && route.query.redirect;
},
immediate: true,
},
},
created() {
this.getCode();
this.getCookie();
},
methods: {
getCode() {
getCodeImg().then((res) => {
this.captchaEnabled =
res.captchaEnabled === undefined ? true : res.captchaEnabled;
if (this.captchaEnabled) {
this.codeUrl = "data:image/gif;base64," + res.img;
this.loginForm.uuid = res.uuid;
}
});
},
getCookie() {
const username = Cookies.get("username");
const password = Cookies.get("password");
const rememberMe = Cookies.get("rememberMe");
this.loginForm = {
username: username === undefined ? this.loginForm.username : username,
password:
password === undefined ? this.loginForm.password : decrypt(password),
rememberMe: rememberMe === undefined ? false : Boolean(rememberMe),
};
},
handleLogin() {
this.$refs.loginForm.validate((valid) => {
if (valid) {
this.loading = true;
if (this.loginForm.rememberMe) {
Cookies.set("username", this.loginForm.username, { expires: 30 });
Cookies.set("password", encrypt(this.loginForm.password), {
expires: 30,
});
Cookies.set("rememberMe", this.loginForm.rememberMe, {
expires: 30,
});
} else {
Cookies.remove("username");
Cookies.remove("password");
Cookies.remove("rememberMe");
}
this.$store
.dispatch("Login", this.loginForm)
.then(() => {
this.$router.push({ path: this.redirect || "/" }).catch(() => {});
})
.catch(() => {
this.loading = false;
if (this.captchaEnabled) {
this.getCode();
}
});
}
});
},
},
};
</script> </script>
<style rel="stylesheet/scss" lang="scss"> <style rel="stylesheet/scss" lang="scss">
.login { .login {
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
height: 100%; height: 100%;
background-image: url("../assets/images/login-background.jpg"); background-image: url("../assets/images/login-background.jpg");
background-size: cover; background-size: cover;
} }
.title {
margin: 0px auto 30px auto;
text-align: center;
color: #707070;
}
.login-form { .title {
border-radius: 6px; margin: 0px auto 30px auto;
background: #ffffff; text-align: center;
width: 400px; color: #707070;
padding: 25px 25px 5px 25px; }
.el-input {
height: 38px; .login-form {
input { border-radius: 6px;
height: 38px; background: #ffffff;
} width: 400px;
} padding: 25px 25px 5px 25px;
.input-icon {
height: 39px; .el-input {
width: 14px; height: 38px;
margin-left: 2px;
} input {
} height: 38px;
.login-tip { }
font-size: 13px; }
text-align: center;
color: #bfbfbf; .input-icon {
} height: 39px;
.login-code { width: 14px;
width: 33%; margin-left: 2px;
height: 38px; }
float: right; }
img {
cursor: pointer; .login-tip {
vertical-align: middle; font-size: 13px;
} text-align: center;
} color: #bfbfbf;
.el-login-footer { }
height: 40px;
line-height: 40px; .login-code {
position: fixed; width: 33%;
bottom: 0; height: 38px;
width: 100%; float: right;
text-align: center;
color: #fff; img {
font-family: Arial; cursor: pointer;
font-size: 12px; vertical-align: middle;
letter-spacing: 1px; }
} }
.login-code-img {
height: 38px; .el-login-footer {
} height: 40px;
line-height: 40px;
position: fixed;
bottom: 0;
width: 100%;
text-align: center;
color: #fff;
font-family: Arial;
font-size: 12px;
letter-spacing: 1px;
}
.login-code-img {
height: 38px;
}
</style> </style>

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

@ -1062,7 +1062,7 @@
}, },
created() { created() {
let idCard = this.$route.query.idCard let idCard = this.$route.query.idCard
this.queryParams.param.idCard = idCard || '' this.queryParams.param.keywords = idCard || ''
this.getList(); this.getList();
this.getFollowupQuery(); this.getFollowupQuery();
}, },
@ -1076,6 +1076,10 @@
}, },
}).then((res) => { }).then((res) => {
this.followupList = res.data.list; 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, required: true,
message: "手机号码不能为空", message: "手机号码不能为空",
trigger: "blur" 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: [{ ethnicity: [{
required: true, required: true,
message: "民族不能为空", message: "民族不能为空",

Loading…
Cancel
Save