Browse Source

添加全局公共队列

newMaster
1747191978@qq.com 4 months 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. 486
      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)
})
}); });
}, },

486
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";
export default { import {
name: "Login", encrypt,
data() { decrypt
return { } from "@/utils/jsencrypt";
codeUrl: "", import {
loginForm: { commonQueue
username: "admin", } from "@/api/followupFile";
password: "admin123", export default {
rememberMe: false, name: "Login",
code: "", data() {
uuid: "", return {
}, codeUrl: "",
loginRules: { loginForm: {
username: [ username: "admin",
{ required: true, trigger: "blur", message: "请输入您的账号" }, password: "admin123",
], rememberMe: false,
password: [ code: "",
{ required: true, trigger: "blur", message: "请输入您的密码" }, uuid: "",
], },
code: [{ required: true, trigger: "change", message: "请输入验证码" }], loginRules: {
}, username: [{
loading: false, required: true,
// trigger: "blur",
captchaEnabled: true, message: "请输入您的账号"
// }, ],
register: false, password: [{
redirect: undefined, required: true,
}; trigger: "blur",
}, message: "请输入您的密码"
watch: { }, ],
$route: { code: [{
handler: function (route) { required: true,
this.redirect = route.query && route.query.redirect; trigger: "change",
}, message: "请输入验证码"
immediate: true, }],
}, },
}, loading: false,
created() { //
this.getCode(); captchaEnabled: true,
this.getCookie(); //
}, register: false,
methods: { redirect: undefined,
getCode() { };
getCodeImg().then((res) => { },
this.captchaEnabled = watch: {
res.captchaEnabled === undefined ? true : res.captchaEnabled; $route: {
if (this.captchaEnabled) { handler: function(route) {
this.codeUrl = "data:image/gif;base64," + res.img; this.redirect = route.query && route.query.redirect;
this.loginForm.uuid = res.uuid; },
} immediate: true,
}); },
}, },
getCookie() { created() {
const username = Cookies.get("username"); this.getCode();
const password = Cookies.get("password"); this.getCookie();
const rememberMe = Cookies.get("rememberMe"); },
this.loginForm = { methods: {
username: username === undefined ? this.loginForm.username : username, getCode() {
password: getCodeImg().then((res) => {
password === undefined ? this.loginForm.password : decrypt(password), this.captchaEnabled =
rememberMe: rememberMe === undefined ? false : Boolean(rememberMe), res.captchaEnabled === undefined ? true : res.captchaEnabled;
}; if (this.captchaEnabled) {
}, this.codeUrl = "data:image/gif;base64," + res.img;
handleLogin() { this.loginForm.uuid = res.uuid;
this.$refs.loginForm.validate((valid) => { }
if (valid) { });
this.loading = true; },
if (this.loginForm.rememberMe) { getCookie() {
Cookies.set("username", this.loginForm.username, { expires: 30 }); const username = Cookies.get("username");
Cookies.set("password", encrypt(this.loginForm.password), { const password = Cookies.get("password");
expires: 30, const rememberMe = Cookies.get("rememberMe");
}); this.loginForm = {
Cookies.set("rememberMe", this.loginForm.rememberMe, { username: username === undefined ? this.loginForm.username : username,
expires: 30, password: password === undefined ? this.loginForm.password : decrypt(password),
}); rememberMe: rememberMe === undefined ? false : Boolean(rememberMe),
} else { };
Cookies.remove("username"); },
Cookies.remove("password"); handleLogin() {
Cookies.remove("rememberMe"); this.$refs.loginForm.validate((valid) => {
} if (valid) {
this.$store this.loading = true;
.dispatch("Login", this.loginForm) if (this.loginForm.rememberMe) {
.then(() => { Cookies.set("username", this.loginForm.username, {
this.$router.push({ path: this.redirect || "/" }).catch(() => {}); expires: 30
}) });
.catch(() => { Cookies.set("password", encrypt(this.loginForm.password), {
this.loading = false; expires: 30,
if (this.captchaEnabled) { });
this.getCode(); 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(() => {});
this.getCommonQueue()
})
.catch(() => {
this.loading = false;
if (this.captchaEnabled) {
this.getCode();
}
});
}
});
},
//
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> </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; .title {
text-align: center; margin: 0px auto 30px auto;
color: #707070; text-align: center;
} color: #707070;
}
.login-form {
border-radius: 6px;
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;
position: fixed;
bottom: 0;
width: 100%;
text-align: center;
color: #fff;
font-family: Arial;
font-size: 12px;
letter-spacing: 1px;
}
.login-form { .login-code-img {
border-radius: 6px; height: 38px;
background: #ffffff; }
width: 400px; </style>
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;
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>

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