Browse Source

添加全局公共队列

new
1747191978@qq.com 1 year 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. 176
      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({

19
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-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> <span v-if="scope.row.status == 1" style="color: #67C23A">启用</span>
</template> </template>
</el-table-column> </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)
})
}); });
}, },

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

@ -1,79 +1,36 @@
<template> <template>
<div class="login"> <div class="login">
<el-form <el-form ref="loginForm" :model="loginForm" :rules="loginRules" class="login-form">
ref="loginForm"
:model="loginForm"
:rules="loginRules"
class="login-form"
>
<h3 class="title">针灸后台管理系统</h3> <h3 class="title">针灸后台管理系统</h3>
<el-form-item prop="username"> <el-form-item prop="username">
<el-input <el-input v-model="loginForm.username" type="text" auto-complete="off" placeholder="账号">
v-model="loginForm.username" <svg-icon slot="prefix" icon-class="user" class="el-input__icon input-icon" />
type="text"
auto-complete="off"
placeholder="账号"
>
<svg-icon
slot="prefix"
icon-class="user"
class="el-input__icon input-icon"
/>
</el-input> </el-input>
</el-form-item> </el-form-item>
<el-form-item prop="password"> <el-form-item prop="password">
<el-input <el-input v-model="loginForm.password" type="password" auto-complete="off" placeholder="密码"
v-model="loginForm.password" @keyup.enter.native="handleLogin">
type="password" <svg-icon slot="prefix" icon-class="password" class="el-input__icon input-icon" />
auto-complete="off"
placeholder="密码"
@keyup.enter.native="handleLogin"
>
<svg-icon
slot="prefix"
icon-class="password"
class="el-input__icon input-icon"
/>
</el-input> </el-input>
</el-form-item> </el-form-item>
<el-form-item prop="code" v-if="captchaEnabled"> <el-form-item prop="code" v-if="captchaEnabled">
<el-input <el-input v-model="loginForm.code" auto-complete="off" placeholder="验证码" style="width: 63%"
v-model="loginForm.code" @keyup.enter.native="handleLogin">
auto-complete="off" <svg-icon slot="prefix" icon-class="validCode" class="el-input__icon input-icon" />
placeholder="验证码"
style="width: 63%"
@keyup.enter.native="handleLogin"
>
<svg-icon
slot="prefix"
icon-class="validCode"
class="el-input__icon input-icon"
/>
</el-input> </el-input>
<div class="login-code"> <div class="login-code">
<img :src="codeUrl" @click="getCode" class="login-code-img" /> <img :src="codeUrl" @click="getCode" class="login-code-img" />
</div> </div>
</el-form-item> </el-form-item>
<el-checkbox <el-checkbox v-model="loginForm.rememberMe" style="margin: 0px 0px 25px 0px">记住密码</el-checkbox>
v-model="loginForm.rememberMe"
style="margin: 0px 0px 25px 0px"
>记住密码</el-checkbox
>
<el-form-item style="width: 100%"> <el-form-item style="width: 100%">
<el-button <el-button :loading="loading" size="medium" type="primary" style="width: 100%"
:loading="loading" @click.native.prevent="handleLogin">
size="medium"
type="primary"
style="width: 100%"
@click.native.prevent="handleLogin"
>
<span v-if="!loading"> </span> <span v-if="!loading"> </span>
<span v-else> 中...</span> <span v-else> 中...</span>
</el-button> </el-button>
<div style="float: right" v-if="register"> <div style="float: right" v-if="register">
<router-link class="link-type" :to="'/register'" <router-link class="link-type" :to="'/register'">立即注册</router-link>
>立即注册</router-link
>
</div> </div>
</el-form-item> </el-form-item>
</el-form> </el-form>
@ -85,11 +42,18 @@
</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 {
encrypt,
decrypt
} from "@/utils/jsencrypt";
import {
commonQueue
} from "@/api/followupFile";
export default {
name: "Login", name: "Login",
data() { data() {
return { return {
@ -102,13 +66,21 @@ export default {
uuid: "", uuid: "",
}, },
loginRules: { loginRules: {
username: [ username: [{
{ required: true, trigger: "blur", message: "请输入您的账号" }, required: true,
], trigger: "blur",
password: [ message: "请输入您的账号"
{ required: true, trigger: "blur", message: "请输入您的密码" }, }, ],
], password: [{
code: [{ required: true, trigger: "change", message: "请输入验证码" }], required: true,
trigger: "blur",
message: "请输入您的密码"
}, ],
code: [{
required: true,
trigger: "change",
message: "请输入验证码"
}],
}, },
loading: false, loading: false,
// //
@ -120,7 +92,7 @@ export default {
}, },
watch: { watch: {
$route: { $route: {
handler: function (route) { handler: function(route) {
this.redirect = route.query && route.query.redirect; this.redirect = route.query && route.query.redirect;
}, },
immediate: true, immediate: true,
@ -147,8 +119,7 @@ export default {
const rememberMe = Cookies.get("rememberMe"); const rememberMe = Cookies.get("rememberMe");
this.loginForm = { this.loginForm = {
username: username === undefined ? this.loginForm.username : username, username: username === undefined ? this.loginForm.username : username,
password: password: password === undefined ? this.loginForm.password : decrypt(password),
password === undefined ? this.loginForm.password : decrypt(password),
rememberMe: rememberMe === undefined ? false : Boolean(rememberMe), rememberMe: rememberMe === undefined ? false : Boolean(rememberMe),
}; };
}, },
@ -157,7 +128,9 @@ export default {
if (valid) { if (valid) {
this.loading = true; this.loading = true;
if (this.loginForm.rememberMe) { 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), { Cookies.set("password", encrypt(this.loginForm.password), {
expires: 30, expires: 30,
}); });
@ -172,7 +145,11 @@ export default {
this.$store this.$store
.dispatch("Login", this.loginForm) .dispatch("Login", this.loginForm)
.then(() => { .then(() => {
this.$router.push({ path: this.redirect || "/" }).catch(() => {});
this.$router.push({
path: this.redirect || "/"
}).catch(() => {});
this.getCommonQueue()
}) })
.catch(() => { .catch(() => {
this.loading = false; this.loading = false;
@ -183,57 +160,79 @@ 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> </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 {
.title {
margin: 0px auto 30px auto; margin: 0px auto 30px auto;
text-align: center; text-align: center;
color: #707070; color: #707070;
} }
.login-form { .login-form {
border-radius: 6px; border-radius: 6px;
background: #ffffff; background: #ffffff;
width: 400px; width: 400px;
padding: 25px 25px 5px 25px; padding: 25px 25px 5px 25px;
.el-input { .el-input {
height: 38px; height: 38px;
input { input {
height: 38px; height: 38px;
} }
} }
.input-icon { .input-icon {
height: 39px; height: 39px;
width: 14px; width: 14px;
margin-left: 2px; margin-left: 2px;
} }
} }
.login-tip {
.login-tip {
font-size: 13px; font-size: 13px;
text-align: center; text-align: center;
color: #bfbfbf; color: #bfbfbf;
} }
.login-code {
.login-code {
width: 33%; width: 33%;
height: 38px; height: 38px;
float: right; float: right;
img { img {
cursor: pointer; cursor: pointer;
vertical-align: middle; vertical-align: middle;
} }
} }
.el-login-footer {
.el-login-footer {
height: 40px; height: 40px;
line-height: 40px; line-height: 40px;
position: fixed; position: fixed;
@ -244,8 +243,9 @@ export default {
font-family: Arial; font-family: Arial;
font-size: 12px; font-size: 12px;
letter-spacing: 1px; letter-spacing: 1px;
} }
.login-code-img {
.login-code-img {
height: 38px; 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