Browse Source

兽医PC端问题修复

master
王妍洁 1 week ago
parent
commit
cd6ff4e3c2
  1. 19
      chenhai-ui/src/views/login.vue
  2. 2
      chenhai-ui/src/views/syd.vue
  3. 2
      chenhai-ui/src/views/system/questions/index.vue
  4. 42
      chenhai-ui/src/views/system/recommendation/index.vue
  5. 62
      chenhai-ui/src/views/vet/experts/index.vue
  6. 22
      chenhai-ui/src/views/vet/info/index.vue
  7. 5
      chenhai-ui/src/views/vet/knowledge/index.vue
  8. 1
      chenhai-ui/src/views/vet/merchant/index.vue
  9. 6
      chenhai-ui/src/views/vet/qualification/index.vue

19
chenhai-ui/src/views/login.vue

@ -325,6 +325,21 @@ export default {
this.open = true
},
//
resetRegisterForm() {
this.registerForm = {
phone: "",
password: "",
confirmPassword: "",
clientType: "vet-pc"
};
this.registerPwdVisible = false;
this.confirmPwdVisible = false;
if (this.$refs.registerForm) {
this.$refs.registerForm.resetFields();
}
},
handleRegister() {
this.$refs.registerForm.validate(valid => {
if (valid) {
@ -337,7 +352,9 @@ export default {
this.open = false;
this.registerloading = false;
this.resetRegisterForm();
}).catch(() => {})
}).catch(() => {
this.registerloading = false;
})
})
}
})

2
chenhai-ui/src/views/syd.vue

@ -269,7 +269,7 @@
<el-input v-model="qualificationForm.realName" placeholder="请输入您的真实姓名" maxlength="10" minlength="2"/>
</el-form-item>
<el-form-item label="身份证号" prop="idCard">
<el-input v-model="qualificationForm.idCard" placeholder="请输入身份证号" maxlength="18"/>
<el-input v-model="qualificationForm.idCard" placeholder="请输入身份证号" minlength="18" maxlength="18"/>
</el-form-item>
<el-form-item label="资质类型" prop="qualificationType">
<el-select

2
chenhai-ui/src/views/system/questions/index.vue

@ -72,7 +72,7 @@
height="calc(100vh - 260px)"
>
<el-table-column type="selection" width="55" align="center"/>
<el-table-column label="用户名" align="center" prop="nickName" width="150" :show-overflow-tooltip="true"/>
<el-table-column label="用户名" align="center" prop="username" width="150" :show-overflow-tooltip="true"/>
<el-table-column label="问题标题" align="center" prop="title" width="150" :show-overflow-tooltip="true">
<template slot-scope="scope">
<el-tooltip :content="scope.row.title" placement="top">

42
chenhai-ui/src/views/system/recommendation/index.vue

@ -658,6 +658,9 @@ export default {
medicineType: [
{ required: true, message: "药品类型不能为空", trigger: "change" }
],
salesType: [
{ required: true, message: "销售类型不能为空", trigger: "change" }
],
price: [
{ required: true, message: "当前价格不能为空", trigger: "blur" },
{ pattern: /^\d+(\.\d{1,2})?$/, message: "请输入正确的价格格式", trigger: "blur" }
@ -1050,30 +1053,31 @@ export default {
},
/** 修改按钮操作 */
async handleUpdate(row) {
// async handleUpdate(row) {
handleUpdate(row) {
this.reset();
const id = row.id || this.ids[0];
getRecommendation(id).then(response => {
this.form = response.data;
//
if (this.form.images) {
this.medicineFileList = [{
name: 'medicine_image.jpg',
url: this.form.images,
status: 'success'
}];
}
//
if (this.form.imageUrl) {
const imageUrls = this.form.imageUrl.split(',');
this.carouselFileList = imageUrls.map((url, index) => ({
name: `carousel_${index + 1}.jpg`,
url: url.trim(),
status: 'success'
}));
}
// //
// if (this.form.images) {
// this.medicineFileList = [{
// name: 'medicine_image.jpg',
// url: this.form.images,
// status: 'success'
// }];
// }
//
// //
// if (this.form.imageUrl) {
// const imageUrls = this.form.imageUrl.split(',');
// this.carouselFileList = imageUrls.map((url, index) => ({
// name: `carousel_${index + 1}.jpg`,
// url: url.trim(),
// status: 'success'
// }));
// }
this.open = true;
this.title = "修改药品推荐";

62
chenhai-ui/src/views/vet/experts/index.vue

@ -240,7 +240,8 @@ export default {
//
open: false,
detailViews: false,
//
chatViews: false,
//
currentDetail: {},
//
@ -371,35 +372,36 @@ export default {
/** 聊天咨询按钮操作 */
handleChat(row) {
//
const userInfo = this.$store.getters.userInfo || {}
const roles = userInfo.roles || []
const userRole = roles[0] || '' //
console.log('当前用户角色:', roles, '主要角色:', userRole)
//
if (userRole === 'vetnotshenhe' || userRole === 'admin') {
// -
this.$router.push({
path: '@/views/chat/expert',
query: {
expertId: row.expertId,
expertName: row.realName,
//
mode: 'expert_initiate'
}
})
} else {
// muhu-
this.$router.push({
path: '/chat/index',
query: {
expertId: row.expertId,
expertName: row.realName
}
})
}
this.$modal.msgWarning("该功能正在开发中");
// //
// const userInfo = this.$store.getters.userInfo || {}
// const roles = userInfo.roles || []
// const userRole = roles[0] || '' //
//
// console.log(':', roles, ':', userRole)
//
// //
// if (userRole === 'vetnotshenhe' || userRole === 'admin') {
// // -
// this.$router.push({
// path: '@/views/chat/expert',
// query: {
// expertId: row.expertId,
// expertName: row.realName,
// //
// mode: 'expert_initiate'
// }
// })
// } else {
// // muhu-
// this.$router.push({
// path: '/chat/index',
// query: {
// expertId: row.expertId,
// expertName: row.realName
// }
// })
// }
},
/** 提交按钮 */
submitForm() {

22
chenhai-ui/src/views/vet/info/index.vue

@ -87,6 +87,11 @@
<!-- 表格部分 -->
<el-table v-loading="loading" :data="infoList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="头像" align="center" prop="avatar" width="100">
<template slot-scope="scope">
<image-preview :src="scope.row.avatar" :width="50" :height="50"/>
</template>
</el-table-column>
<el-table-column label="用户昵称" align="center" prop="nickName" />
<el-table-column label="真实姓名" align="center" prop="realName" width="150" :show-overflow-tooltip="true"/>
<el-table-column label="性别" align="center" prop="gender" />
@ -150,8 +155,11 @@
<!-- 添加或修改兽医个人信息对话框 -->
<el-dialog :title="title" :visible.sync="open" width="80%" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="头像" prop="avatar">
<image-upload v-model="form.avatar" :limit='1'/>
</el-form-item>
<el-form-item label="真实姓名" prop="realName">
<el-input v-model="form.realName" placeholder="请输入真实姓名" />
<el-input v-model="form.realName" placeholder="请输入真实姓名" minlength="2" maxlength="10"/>
</el-form-item>
<el-form-item label="性别" prop="gender">
<el-select v-model="form.gender" placeholder="请选择性别" clearable>
@ -181,7 +189,7 @@
<el-option v-for="dict in dict.type.expert_type" :key="dict.value" :label="dict.label" :value="dict.value"/>
</el-select>
</el-form-item>
<el-form-item label="身份证号" prop="idCard">
<el-form-item label="身份证号" prop="idCard" minlength="18" maxlength="18">
<el-input v-model="form.idCard" placeholder="请输入身份证号" />
</el-form-item>
<el-form-item label="擅长领域" prop="specialty">
@ -301,7 +309,6 @@ export default {
infoList: [],
//
certificateList: [],
//
title: "",
//
@ -318,6 +325,7 @@ export default {
pageNum: 1,
pageSize: 10,
userId: null,
avatar: null,
realName: null,
gender: null,
birthday: null,
@ -333,13 +341,16 @@ export default {
//
rules: {
realName: [
{ required: true, message: "真实姓名不能为空", trigger: "blur" }
{required: true, message: "真实姓名不能为空", trigger: "blur"},
{ min: 2, max: 10, message: "长度在2到10个字符", trigger: "blur" },
],
gender: [
{ required: true, message: "性别不能为空", trigger: "change" }
],
idCard: [
{ required: true, message: "身份证号不能为空", trigger: "blur" }
{required: true, message: "身份证号不能为空", trigger: "blur"},
{ pattern: /^[1-9]\d{5}(18|19|20)\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}(\d|X|x)$/, message: "身份证号码不合法", trigger: "blur" },
{ min: 1, max: 18, message: "长度在18个字符", trigger: "blur" },
]
}
}
@ -384,6 +395,7 @@ export default {
id: null,
userId: null,
realName: null,
avatar: null,
gender: null,
birthday: null,
idCard: null,

5
chenhai-ui/src/views/vet/knowledge/index.vue

@ -314,6 +314,9 @@
提示选择为您推荐药品的专家
</div>
</el-form-item>
<!-- <el-form-item label="推荐专家" prop="realName">-->
<!-- <el-input v-model="form.realName" placeholder="请选择推荐专家" />-->
<!-- </el-form-item>-->
<el-form-item label="封面" prop="coverImage">
<image-upload v-model="form.coverImage" />
</el-form-item>
@ -429,7 +432,7 @@ import {
offlineVetKnowledge
} from "@/api/vet/knowledge"
import { getDicts } from "@/api/system/dict/data"
import {listExperts} from "@/api/vet/experts"; //
import {listExperts} from "@/api/vet/experts";
export default {
name: "Knowledge",

1
chenhai-ui/src/views/vet/merchant/index.vue

@ -153,6 +153,7 @@
icon="el-icon-view"
@click="handleView(scope.row)"
class="info-btn view-btn"
v-if="scope.row.auditStatus === '2'"
>详情</el-button>
<el-button
size="mini"

6
chenhai-ui/src/views/vet/qualification/index.vue

@ -302,7 +302,7 @@
<span v-else style="color: #909399">-</span>
</template>
</el-table-column>
<el-table-column label="证书文件" prop="certificateFiles">
<el-table-column label="证书文件" prop="certificateFiles" align="center" width="100">
<template slot-scope="scope">
<span v-if="scope.row.certificateFiles">
<template v-if="isImageFile(scope.row.certificateFiles)">
@ -310,7 +310,7 @@
type="text"
icon="el-icon-view"
@click="previewCertificate(scope.row.certificateFiles)"
style="color: #409EFF;"
style="color: #409EFF;font-size: 20px"
>
</el-button>
</template>
@ -319,7 +319,7 @@
type="text"
icon="el-icon-download"
@click="downloadFile(scope.row.certificateFiles)"
style="color: #287c07;"
style="color: #287c07;font-size: 20px"
>
</el-button>
</template>

Loading…
Cancel
Save