Commit 91b1a9be authored by 小费同学阿's avatar 小费同学阿 💬

登录状态已过期

parent c61c0317
......@@ -8,6 +8,7 @@
:on-success="handleUploadSuccess"
:on-error="handleUploadError"
name="file"
:show-file-list="false"
:headers="headers"
style="display: none"
......
......@@ -34,10 +34,11 @@ export function checkRole(value) {
if (value && value instanceof Array && value.length > 0) {
const roles = store.getters && store.getters.roles
const permissionRoles = value
const super_admin = "admin";
// const super_admin = "admin";
const hasRole = roles.some(role => {
return super_admin === role || permissionRoles.includes(role)
// return super_admin === role || permissionRoles.includes(role)
return permissionRoles.includes(role)
})
if (!hasRole) {
......
......@@ -48,7 +48,7 @@
</div>
</el-form-item>
<el-form-item label="文章内容" prop="articleContent">
<editor v-model="form.articleContent" :min-height="192" />
<editor v-model="form.articleContent" style="height: 192px;" />
</el-form-item>
</el-form>
</div>
......@@ -69,6 +69,7 @@ import { checkRole } from '@/utils/permission'
import { selectDictLabel } from '@/utils/ruoyi'
import { getArticle, updateArticle } from '@/api/business/article'
import userAvatar from '@/views/system/user/profile/userAvatar.vue'
import { html2Text } from '@/utils'
export default {
name: 'ArticleEdit',
......@@ -85,6 +86,14 @@ export default {
}
},
data() {
const contentNotNull = (rule, value, callback) => {
const contentValue = html2Text(value)
if (contentValue.length === 0) {
callback(new Error('请输入内容详情'))
} else {
callback()
}
}
const weightValidator = (rule, value, callback) => {
if (value === 0) callback(new Error('权重不能为0'))
else callback()
......@@ -128,7 +137,8 @@ export default {
],
// 文章内容判空校验
articleContent: [
{ required: true, message: '请输入文章内容', trigger: 'change' }
{ required: true, message: '请输入文章内容', trigger: 'change' },
{ validator: contentNotNull, trigger: 'blur' }
]
}
}
......@@ -310,4 +320,8 @@ export default {
font-weight: bold;
color: #333333;
}
.dialog-footer{
margin-bottom: 20px;
margin-top: 60px;
}
</style>
......@@ -52,7 +52,7 @@
<el-form-item label="文章内容" prop="articleContent">
<editor
v-model.trim="form.articleContent"
:min-height="192"
style="height: 192px;"
@change="changeQuillEditor('articleContent')"
/>
</el-form-item>
......@@ -73,6 +73,7 @@
// 导入获取文章信息的接口
import { selectDictLabel } from '@/utils/ruoyi'
import { addArticle } from '@/api/business/article'
import { html2Text } from '@/utils'
export default {
name: 'ArticleInsert',
......@@ -86,6 +87,14 @@ export default {
}
},
data() {
const contentNotNull = (rule, value, callback) => {
const contentValue = html2Text(value)
if (contentValue.length === 0) {
callback(new Error('请输入内容详情'))
} else {
callback()
}
}
const weightValidator = (rule, value, callback) => {
if (value === 0) callback(new Error('权重不能为0'))
else callback()
......@@ -138,7 +147,8 @@ export default {
],
// 文章内容判空校验
articleContent: [
{ required: true, message: '请输入文章内容', trigger: 'change' }
{ required: true, message: '请输入文章内容', trigger: 'change' },
{ validator: contentNotNull, trigger: 'blur' }
]
}
}
......@@ -275,4 +285,8 @@ export default {
font-weight: bold;
color: #333333;
}
.dialog-footer{
margin-bottom: 20px;
margin-top: 60px;
}
</style>
......@@ -34,10 +34,10 @@ color: #333333;"
<el-form
ref="form"
:model="detailInfo"
hide-required-asterisk
:hide-required-asterisk="!isEdit"
:rules="formRules"
class="registration-add-form"
label-width="110px"
label-width="81px"
size="small"
>
<!--2--基本信息-->
......@@ -1912,6 +1912,10 @@ export default {
.el-form-item__content {
display: flex;
.el-input--small {
width: 100% !important;
}
.petChildBreed {
margin-left: 5px;
}
......
......@@ -190,6 +190,7 @@
</el-button>
<el-button
v-hasPermi="['business:record:edit']"
:disabled="checkRole(['pt-admin'])"
icon="el-icon-edit"
plain
size="mini"
......
......@@ -60,8 +60,8 @@
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button class="queryBtn" @click="choosePet">确 定</el-button>
<el-button class="resetBtn" @click="closeModle">取 消</el-button>
<!-- <el-button class="queryBtn" @click="choosePet">确 定</el-button>-->
<!-- <el-button class="resetBtn" @click="closeModle">取 消</el-button>-->
</div>
</el-dialog>
</template>
......
......@@ -53,7 +53,7 @@
</div>
<div>
<el-form-item label="体重" prop="petWeight">
<el-input v-model="registerForm.petWeight" placeholder="暂无数据" :disabled="true" maxlength="20" />
<el-input v-model="registerForm.petWeight" placeholder="暂无数据" :disabled="true" maxlength="20" />kg
</el-form-item>
</div>
<div>
......@@ -303,7 +303,7 @@
<div slot="footer" class="dialog-footer">
<div class="doctor-sign">
主治兽医
<img :src="baseURL + registerForm.doctorSignatureUrl"/>
<img :src="baseURL + registerForm.doctorSignatureUrl">
</div>
<el-button type="primary" @click="submit">确 定</el-button>
<el-button @click="cancle">取 消</el-button>
......
......@@ -322,7 +322,7 @@ export default {
console.log('这是确认不存在后调用新增挂号的数据返参', response)
this.$message({
type: 'success',
message: '预约成功!'
message: '预约成功'
})
this.$emit('registerModleClose', { type: 'addRegisterSuccess', id: response.data })
})
......
<template>
<div class="registration-add-module">
<div class="registration-title">新增挂号</div>
<div class="registration-title" />
<el-form ref="from" :model="form" :rules="rules" class="registration-add-form" label-width="6.5rem" size="small">
<div class="basicInformation">
<div class="title">宠物信息</div>
......
......@@ -9,7 +9,7 @@
font-family: Microsoft YaHei-Bold, Microsoft YaHei,serif;
font-weight: bold;
color: #333333;"
>{{$route.params.type === 'enter' ? '录入诊断' : '详情'}}</span>
>{{ $route.params.type === 'enter' ? '录入诊断' : '详情' }}</span>
</div>
<!-- 整体卡片内页面的样式--边距-->
<div style="padding: 20px 20px 20px 20px;">
......@@ -45,7 +45,7 @@ color: #333333;"
<div class="base-msg">
<div>
<!--基础信息右边的信息-->
<div class="base-inner">
<div class="base-inner" style="padding-left: 10px">
<!--宠物昵称-->
<el-row>
<el-col :span="8" class="form__left">
......@@ -181,7 +181,7 @@ color: #333333;"
</div>
</div>
<!-- 3-- 主人信息的页面--内部信息 -->
<div class="ownerMsg-inner">
<div class="ownerMsg-inner" style="padding-left: 10px">
<el-row>
<el-col :span="8" class="form__left">
<el-form-item label="宠主姓名">
......@@ -234,7 +234,7 @@ color: #333333;"
</el-col>
<el-col :span="8">
<el-form-item label="会员卡余额">
<el-input v-model="detailInfo.petOwnerBo.cardBalance" placeholder="暂无数据" disabled >
<el-input v-model="detailInfo.petOwnerBo.cardBalance" placeholder="暂无数据" disabled>
<template #suffix></template>
</el-input>
</el-form-item>
......@@ -277,7 +277,7 @@ color: #333333;"
<div class="base-msg">
<div>
<!--基础信息右边的信息-->
<div class="base-inner">
<div class="base-inner" style="padding-left: 10px">
<!--挂号方式-->
<el-row>
<el-col :span="8" class="form__left">
......@@ -397,7 +397,7 @@ color: #333333;"
<div class="base-msg">
<div>
<!--基础信息右边的信息-->
<div class="base-inner">
<div class="base-inner" style="padding-left: 10px">
<!--挂号方式-->
<el-row>
<el-col :span="8" class="form__left">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment