Browse Source

兽医PC端经验分享页面构建

master
王妍洁 2 weeks ago
parent
commit
8248767f60
  1. 24
      chenhai-ui/src/api/vet/article.js
  2. 41
      chenhai-ui/src/api/vet/product.js
  3. 8
      chenhai-ui/src/api/vet/qualification.js
  4. BIN
      chenhai-ui/src/assets/images/tongzhi.png
  5. BIN
      chenhai-ui/src/assets/images/tz.png
  6. BIN
      chenhai-ui/src/assets/images/tz1.png
  7. 2
      chenhai-ui/src/layout/components/Navbar.vue
  8. 12
      chenhai-ui/src/views/index.vue
  9. 7
      chenhai-ui/src/views/loginGld.vue
  10. 95
      chenhai-ui/src/views/syd.vue
  11. 145
      chenhai-ui/src/views/system/recommendation/index.vue
  12. 1971
      chenhai-ui/src/views/vet/article/index.vue
  13. 35
      chenhai-ui/src/views/vet/info/index.vue
  14. 153
      chenhai-ui/src/views/vet/knowledge/index.vue
  15. 4
      chenhai-ui/src/views/vet/notification/index.vue
  16. 2158
      chenhai-ui/src/views/vet/product/index.vue
  17. 157
      chenhai-ui/src/views/vet/qualification/index.vue
  18. 34
      chenhai-ui/src/views/vet/training/index.vue

24
chenhai-ui/src/api/vet/article.js

@ -18,6 +18,17 @@ export function listMyArticle(query) {
}) })
} }
// 获取草稿列表
export function listDraft() {
return request({
url: '/vet/article/draftList',
method: 'get'
})
}
// 查询兽医经验文章详细(包含相关文章) // 查询兽医经验文章详细(包含相关文章)
export function getArticle(id) { export function getArticle(id) {
return request({ return request({
@ -121,12 +132,13 @@ export function searchArticles(keyword) {
}) })
} }
export function getForumHome() {
return request({
url: '/vet/article/statistics',
method: 'get'
})
}
// 获取论坛统计
// export function getForumHome() {
// return request({
// url: '/vet/article/statistics',
// method: 'get'
// })
// }
// 论坛文章详情 // 论坛文章详情
export function getForumDetail(id) { export function getForumDetail(id) {

41
chenhai-ui/src/api/vet/product.js

@ -42,44 +42,3 @@ export function delProduct(id) {
method: 'delete' method: 'delete'
}) })
} }
// 提交审核
export function submitAudit(id) {
return request({
url: '/vet/product/submitAudit/' + id,
method: 'post'
})
}
// 审核产品
export function auditProduct(data) {
return request({
url: '/vet/product/audit',
method: 'post',
data: data
})
}
// 上架产品
export function publishProduct(id) {
return request({
url: '/vet/product/publish/' + id,
method: 'post'
})
}
// 下架产品
export function offlineProduct(id) {
return request({
url: '/vet/product/offline/' + id,
method: 'post'
})
}
// 取消审核
export function cancelAudit(id) {
return request({
url: '/vet/product/cancelAudit/' + id,
method: 'post'
})
}

8
chenhai-ui/src/api/vet/qualification.js

@ -96,6 +96,14 @@ export function getQualification(qualificationId, certId) {
}) })
} }
// 查看证书详情
export function listQualificationCertificates(qualificationId) {
return request({
url: '/vet/qualification/certificate/' + qualificationId + '/list',
method: 'get'
})
}
// 证书详情 // 证书详情
export function getQualificationCertificate(certId) { export function getQualificationCertificate(certId) {
return request({ return request({

BIN
chenhai-ui/src/assets/images/tongzhi.png

Before

Width: 200  |  Height: 200  |  Size: 6.8 KiB

After

Width: 200  |  Height: 200  |  Size: 7.0 KiB

BIN
chenhai-ui/src/assets/images/tz.png

Before

Width: 200  |  Height: 200  |  Size: 6.9 KiB

BIN
chenhai-ui/src/assets/images/tz1.png

Before

Width: 200  |  Height: 200  |  Size: 7.0 KiB

2
chenhai-ui/src/layout/components/Navbar.vue

@ -119,7 +119,7 @@ export default {
}).then(() => { }).then(() => {
const userRole = this.$store.state.user.roles[0]; const userRole = this.$store.state.user.roles[0];
this.$store.dispatch('LogOut').then(() => { this.$store.dispatch('LogOut').then(() => {
if (userRole === 'vetnotshenhe') {
if (userRole === 'vet' || userRole === 'vetnotshenhe') {
location.href = '/login'; location.href = '/login';
} else { } else {
location.href = '/loginGld'; location.href = '/loginGld';

12
chenhai-ui/src/views/index.vue

@ -1,8 +1,10 @@
<template> <template>
<!-- 跳转首页 --> <!-- 跳转首页 -->
<div class="type"> <div class="type">
<Syd v-if = "userRole === 'vetnotshenhe'"></Syd>
<Gld v-else></Gld>
<Syd v-if = "userRole === 'vet' || userRole === 'vetnotshenhe'"></Syd>
<!-- <Gld v-else></Gld>-->
<Gld v-else-if="userRole"></Gld>
<div v-else></div>
</div> </div>
</template> </template>
@ -21,8 +23,12 @@ export default {
} }
}, },
computed: { computed: {
// userRole() {
// return this.$store.state.user.roles[0];
// }
userRole() { userRole() {
return this.$store.state.user.roles[0];
const roles = this.$store.state.user?.roles || [];
return roles[0] || '';
} }
}, },
methods: { methods: {

7
chenhai-ui/src/views/loginGld.vue

@ -205,8 +205,7 @@ export default {
</script> </script>
<style rel="stylesheet/scss" lang="scss" scoped> <style rel="stylesheet/scss" lang="scss" scoped>
/* 登录页 */
//
.login { .login {
display: flex; display: flex;
justify-content: center; justify-content: center;
@ -218,7 +217,7 @@ export default {
position: relative; position: relative;
} }
/* 登录模块 */
//
.login-form { .login-form {
display: flex; display: flex;
width: 760px; width: 760px;
@ -233,7 +232,7 @@ export default {
border: 1px solid rgba(82, 196, 26, 0.2); border: 1px solid rgba(82, 196, 26, 0.2);
} }
/* 左侧登录部分 */
//
.login-left { .login-left {
flex: 1; flex: 1;
background: linear-gradient(135deg, rgba(82, 196, 26, 0.9) 0%, rgba(24, 144, 255, 0.9) 100%); background: linear-gradient(135deg, rgba(82, 196, 26, 0.9) 0%, rgba(24, 144, 255, 0.9) 100%);

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

@ -58,17 +58,15 @@
<el-step title="提交审核"></el-step> <el-step title="提交审核"></el-step>
</el-steps> </el-steps>
<!-- 选择经营范围 -->
<!-- 第一步选择经营范围 -->
<div v-if="activeStep === 0"> <div v-if="activeStep === 0">
<el-form ref="qualificationForm" :model="qualificationForm" :rules="rules" label-width="100px"> <el-form ref="qualificationForm" :model="qualificationForm" :rules="rules" label-width="100px">
<el-form-item label="真实姓名" prop="realName"> <el-form-item label="真实姓名" prop="realName">
<el-input v-model="qualificationForm.realName" placeholder="请输入您的真实姓名" /> <el-input v-model="qualificationForm.realName" placeholder="请输入您的真实姓名" />
</el-form-item> </el-form-item>
<el-form-item label="身份证号" prop="idCard"> <el-form-item label="身份证号" prop="idCard">
<el-input v-model="qualificationForm.idCard" placeholder="请输入身份证号" /> <el-input v-model="qualificationForm.idCard" placeholder="请输入身份证号" />
</el-form-item> </el-form-item>
<el-form-item label="资质类型" prop="qualificationType"> <el-form-item label="资质类型" prop="qualificationType">
<el-select <el-select
v-model="qualificationForm.qualificationType" v-model="qualificationForm.qualificationType"
@ -83,7 +81,6 @@
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="经营范围" prop="scopeIds"> <el-form-item label="经营范围" prop="scopeIds">
<el-select <el-select
v-model="qualificationForm.scopeIds" v-model="qualificationForm.scopeIds"
@ -105,21 +102,12 @@
</el-form> </el-form>
</div> </div>
<!-- 上传资质 -->
<!-- 第二步上传资质 -->
<div v-if="activeStep === 1"> <div v-if="activeStep === 1">
<div class="step-summary"> <div class="step-summary">
<div class="summary-item"> <div class="summary-item">
<span class="summary-label">资质类型</span> <span class="summary-label">资质类型</span>
<div class="scope-tags"> <div class="scope-tags">
<!-- <el-tag-->
<!-- v-for="qualificationType in qualificationForm.qualificationType"-->
<!-- :key="qualificationType"-->
<!-- type="info"-->
<!-- size="small"-->
<!-- class="scope-tag"-->
<!-- >-->
<!-- {{ getQualificationTypeLabel(qualificationForm.qualificationType) }}-->
<!-- </el-tag>-->
<el-tag <el-tag
type="info" type="info"
size="small" size="small"
@ -179,7 +167,6 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="24"> <el-col :span="24">
<el-form-item label="证书编号" :prop="'certificateslist.' + index + '.certificateNo'"> <el-form-item label="证书编号" :prop="'certificateslist.' + index + '.certificateNo'">
@ -235,7 +222,7 @@
</el-form> </el-form>
</div> </div>
<!-- 提交审核 -->
<!-- 第三步提交审核 -->
<div v-if="activeStep === 2"> <div v-if="activeStep === 2">
<div style="text-align: center; margin-bottom: 30px;"> <div style="text-align: center; margin-bottom: 30px;">
<i class="el-icon-circle-check" style="font-size: 60px; color: #67C23A;"></i> <i class="el-icon-circle-check" style="font-size: 60px; color: #67C23A;"></i>
@ -355,12 +342,9 @@ export default {
name: "Syd", name: "Syd",
data() { data() {
return { return {
//
tjzs: {},
//
tjzs: {}, //
title: "兽医资质审核", title: "兽医资质审核",
// flag: true,
flag: false,
flag: false, //
loading: false, loading: false,
activeStep: 0, activeStep: 0,
qualificationForm: { qualificationForm: {
@ -382,7 +366,6 @@ export default {
}, },
scopeOptions: [], scopeOptions: [],
qualificationTypeOptions: [], qualificationTypeOptions: [],
rules: { rules: {
realName: [ realName: [
{required: true, message: "请输入真实姓名", trigger: "blur"} {required: true, message: "请输入真实姓名", trigger: "blur"}
@ -405,14 +388,14 @@ export default {
this.getQualStatusAndHandle(); this.getQualStatusAndHandle();
}, },
methods: { methods: {
//
/** 获取通知数据 */
getcountSummary() { getcountSummary() {
getStatsCard().then(res => { getStatsCard().then(res => {
this.tjzs = res.data this.tjzs = res.data
}) })
}, },
//
/** 初始化选项 */
initOptions() { initOptions() {
const fetchData = async () => { const fetchData = async () => {
const qtypeRes = await getQualificationTypeOptions(); const qtypeRes = await getQualificationTypeOptions();
@ -424,26 +407,26 @@ export default {
fetchData(); fetchData();
}, },
//
/** 获取资质类型标签 */
getQualificationTypeLabel(value) { getQualificationTypeLabel(value) {
const option = this.qualificationTypeOptions.find(item => item.value === value); const option = this.qualificationTypeOptions.find(item => item.value === value);
return option ? option.label : value; return option ? option.label : value;
}, },
//
/** 获取经营范围标签 */
getScopeLabel(scopeId) { getScopeLabel(scopeId) {
const scope = this.scopeOptions.find(item => item.value === scopeId); const scope = this.scopeOptions.find(item => item.value === scopeId);
return scope ? scope.label : scopeId; return scope ? scope.label : scopeId;
}, },
//
/** 上一步 */
prevStep() { prevStep() {
if (this.activeStep > 0) { if (this.activeStep > 0) {
this.activeStep-- this.activeStep--
} }
}, },
//
/** 下一步 */
nextStep() { nextStep() {
if (this.activeStep === 0) { if (this.activeStep === 0) {
this.$refs.qualificationForm.validate(valid => { this.$refs.qualificationForm.validate(valid => {
@ -468,7 +451,7 @@ export default {
} }
}, },
//
/** 获取资质状态 */
getQualStatusAndHandle() { getQualStatusAndHandle() {
getQualificationStatus() getQualificationStatus()
.then(res => { .then(res => {
@ -479,7 +462,7 @@ export default {
}) })
}, },
//
/** 提交审核 */
submitQualification() { submitQualification() {
this.loading = true; this.loading = true;
@ -500,21 +483,25 @@ export default {
certificates: certificates, certificates: certificates,
}; };
submitAuditQualification(requestData)
.then(response => {
this.$message.success('提交成功,请等待审核');
this.flag = false;
setTimeout(() => {
this.$router.push('/VetQualification');
}, 300);
})
.catch(error => {
console.error('提交失败:', error);
this.$message.error(error.response?.data?.message || '提交失败,请重试');
})
.finally(() => {
this.loading = false;
});
submitAuditQualification(requestData).then(response => {
this.$message.success('提交成功,请等待审核');
this.flag = false;
setTimeout(() => {
// this.$router.push('/vet-info/VetPersonallnfo');
// this.$message.warning('')
this.$router.push({
path: '/vet-info/VetPersonallnfo',
query: { needCompleteInfo: 'true' }
});
}, 300);
})
.catch(error => {
console.error('提交失败:', error);
this.$message.error(error.response?.data?.message || '提交失败,请重试');
})
.finally(() => {
this.loading = false;
});
}, },
// //
@ -582,12 +569,7 @@ export default {
.shake { .shake {
animation: cardShake 1s infinite linear; animation: cardShake 1s infinite linear;
background-color: #fffde6 !important;
&:hover {
animation-play-state: paused;
background-color: #edeacd !important;
}
background-color: #f4b1bc !important;
} }
.info-card .info-icon { .info-card .info-icon {
@ -598,7 +580,7 @@ export default {
.info-card .info-title { .info-card .info-title {
font-size: 28px; font-size: 28px;
font-weight: bold; font-weight: bold;
color: #42B983;
color: #06358c;
margin-bottom: 0; margin-bottom: 0;
text-align: center; text-align: center;
cursor: pointer; cursor: pointer;
@ -796,15 +778,6 @@ export default {
} }
} }
//.shake {
// animation: cardShake 1s infinite linear;
//
// &:hover {
// animation-play-state: paused;
// }
//}
/* 证书上传样式 */ /* 证书上传样式 */
.certificate-upload-container { .certificate-upload-container {
max-height: 500px; max-height: 500px;

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

@ -10,24 +10,24 @@
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="规格" prop="specification">
<el-input
v-model="queryParams.specification"
placeholder="请输入规格"
clearable
size="small"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="当前价格" prop="price">
<el-input
v-model="queryParams.price"
placeholder="请输入当前价格"
clearable
size="small"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<!-- <el-form-item label="规格" prop="specification">-->
<!-- <el-input-->
<!-- v-model="queryParams.specification"-->
<!-- placeholder="请输入规格"-->
<!-- clearable-->
<!-- size="small"-->
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="当前价格" prop="price">-->
<!-- <el-input-->
<!-- v-model="queryParams.price"-->
<!-- placeholder="请输入当前价格"-->
<!-- clearable-->
<!-- size="small"-->
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!-- </el-form-item>-->
<el-form-item label="店铺名称" prop="storeName"> <el-form-item label="店铺名称" prop="storeName">
<el-input <el-input
v-model="queryParams.storeName" v-model="queryParams.storeName"
@ -98,6 +98,7 @@
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row> </el-row>
<el-table v-loading="loading" :data="recommendationList" @selection-change="handleSelectionChange"> <el-table v-loading="loading" :data="recommendationList" @selection-change="handleSelectionChange">
<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="images" width="100"> <el-table-column label="药品图片" align="center" prop="images" width="100">
@ -137,7 +138,7 @@
<el-table-column label="适用症状" align="center" prop="indications" :show-overflow-tooltip="true" /> <el-table-column label="适用症状" align="center" prop="indications" :show-overflow-tooltip="true" />
<el-table-column label="生产厂家" align="center" prop="manufacturer" :show-overflow-tooltip="true" /> <el-table-column label="生产厂家" align="center" prop="manufacturer" :show-overflow-tooltip="true" />
<el-table-column label="专家推荐" align="center" width="200">
<el-table-column label="专家推荐" align="center" width="100">
<template slot-scope="scope"> <template slot-scope="scope">
<div v-if="scope.row.expertId"> <div v-if="scope.row.expertId">
<div style="font-weight: bold;">{{ scope.row.expertName }}</div> <div style="font-weight: bold;">{{ scope.row.expertName }}</div>
@ -147,7 +148,7 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="推荐店铺" align="center" width="200">
<el-table-column label="推荐店铺" align="center" width="260">
<template slot-scope="scope"> <template slot-scope="scope">
<div v-if="scope.row.storeName"> <div v-if="scope.row.storeName">
<div style="font-weight: bold;">{{ scope.row.storeName }}</div> <div style="font-weight: bold;">{{ scope.row.storeName }}</div>
@ -157,21 +158,33 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" fixed="right" width="200">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-view"
@click="handleView(scope.row)"
v-hasPermi="['system:recommendation:query']"
class="info-btn view-btn"
>查看</el-button>
<el-button <el-button
size="mini" size="mini"
type="text" type="text"
icon="el-icon-edit" icon="el-icon-edit"
style="color: #42B983"
@click="handleUpdate(scope.row)" @click="handleUpdate(scope.row)"
v-hasPermi="['system:recommendation:edit']" v-hasPermi="['system:recommendation:edit']"
class="info-btn alter-btn"
>修改</el-button> >修改</el-button>
<el-button <el-button
size="mini" size="mini"
type="text" type="text"
icon="el-icon-delete" icon="el-icon-delete"
style="color: #f28888"
@click="handleDelete(scope.row)" @click="handleDelete(scope.row)"
v-hasPermi="['system:recommendation:remove']" v-hasPermi="['system:recommendation:remove']"
class = "info-btn delete-btn"
>删除</el-button> >删除</el-button>
</template> </template>
</el-table-column> </el-table-column>
@ -185,6 +198,48 @@
@pagination="getList" @pagination="getList"
/> />
<!-- 详情弹窗 -->
<el-dialog title="药品详情" :visible.sync="detailViews" width="600px" append-to-body>
<el-descriptions class="product-detail-desc" :column="2" border v-loading="detailLoading">
<el-descriptions-item label="药品名称">
{{ currentDetail.medicineName || '--' }}
</el-descriptions-item>
<el-descriptions-item label="产品类型">
{{ currentDetail.medicineType || '--' }}
</el-descriptions-item>
<el-descriptions-item label="规格">
{{ currentDetail.specification || '--' }}
</el-descriptions-item>
<el-descriptions-item label="当前价格">
{{ currentDetail.price || '--' }}
</el-descriptions-item>
<el-descriptions-item label="原价">
{{ currentDetail.originalPrice || '--' }}
</el-descriptions-item>
<el-descriptions-item label="已售数量">
{{ currentDetail.soldQuantity || '--' }}
</el-descriptions-item>
<el-descriptions-item label="销售类型">
{{ currentDetail.salesType || '--' }}
</el-descriptions-item>
<el-descriptions-item label="适用症状">
{{ currentDetail.indications || '--' }}
</el-descriptions-item>
<el-descriptions-item :span="2" label="生产厂家">
{{ currentDetail.manufacturer || '--' }}
</el-descriptions-item>
<el-descriptions-item label="推荐店铺">
<div v-if="currentDetail.storeName">
<div style="font-weight: bold;">{{ currentDetail.storeName }}</div>
<div style="font-size: 12px; color: #999;">{{ currentDetail.storeAddress || '-' }}</div>
</div>
</el-descriptions-item>
</el-descriptions>
<div slot="footer" class="dialog-footer">
<el-button @click="detailViews = false"> </el-button>
</div>
</el-dialog>
<!-- 添加或修改药品推荐对话框 --> <!-- 添加或修改药品推荐对话框 -->
<el-dialog :title="title" :visible.sync="open" width="900px" append-to-body> <el-dialog :title="title" :visible.sync="open" width="900px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="100px"> <el-form ref="form" :model="form" :rules="rules" label-width="100px">
@ -460,6 +515,7 @@ export default {
return { return {
// //
loading: true, loading: true,
detailLoading: false,
// //
ids: [], ids: [],
// //
@ -478,6 +534,11 @@ export default {
title: "", title: "",
// //
open: false, open: false,
detailViews: false,
//
currentDetail: {},
// //
activeTab: "basic", activeTab: "basic",
@ -897,6 +958,25 @@ export default {
this.multiple = !selection.length; this.multiple = !selection.length;
}, },
//
handleView(row) {
this.detailViews = true;
this.detailLoading = true;
this.currentDetail = {};
const id = row.id;
getRecommendation(id).then(response => {
if (response.code === 200) {
this.currentDetail = response.data;
} else {
this.$modal.msgError("获取详情失败");
}
this.detailLoading = false;
});
},
/** 新增按钮操作 */ /** 新增按钮操作 */
handleAdd() { handleAdd() {
this.reset(); this.reset();
@ -1009,4 +1089,27 @@ export default {
width: 100px; width: 100px;
height: 100px; height: 100px;
} }
/* 操作按钮 */
.info-btn {
padding: 6px 10px;
border-radius: 4px;
margin: 0 10px;
transition: all 0.3s ease;
}
.view-btn:hover {
background-color: rgb(216, 238, 248);
transform: translateY(-1px);
}
.alter-btn:hover{
background-color: rgb(230, 255, 238);
transform: translateY(-1px);
}
.delete-btn:hover {
background-color: rgba(245, 108, 108, 0.1);
transform: translateY(-1px);
}
</style> </style>

1971
chenhai-ui/src/views/vet/article/index.vue
File diff suppressed because it is too large
View File

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

@ -87,16 +87,16 @@
<!-- 表格部分 --> <!-- 表格部分 -->
<el-table v-loading="loading" :data="infoList" @selection-change="handleSelectionChange"> <el-table v-loading="loading" :data="infoList" @selection-change="handleSelectionChange">
<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="nickName" />
<el-table-column label="用户昵称" align="center" prop="nickName"/>
<el-table-column label="真实姓名" align="center" prop="realName" /> <el-table-column label="真实姓名" align="center" prop="realName" />
<el-table-column label="性别" align="center" prop="gender" /> <el-table-column label="性别" align="center" prop="gender" />
<el-table-column label="出生日期" align="center" prop="birthday">
<el-table-column label="出生日期" align="center" prop="birthday" width="100">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ parseTime(scope.row.birthday, '{y}-{m}-{d}') }}</span> <span>{{ parseTime(scope.row.birthday, '{y}-{m}-{d}') }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="身份证号" align="center" prop="idCard" width="180"/>
<el-table-column label="擅长领域" align="center" prop="specialty" />
<el-table-column label="身份证号" align="center" prop="idCard" width="130"/>
<el-table-column label="擅长领域" align="center" prop="specialty"/>
<el-table-column label="工作经验" align="center" prop="workExperience"/> <el-table-column label="工作经验" align="center" prop="workExperience"/>
<el-table-column label="职称" align="center" prop="title"/> <el-table-column label="职称" align="center" prop="title"/>
<el-table-column label="联系电话" align="center" prop="phone"/> <el-table-column label="联系电话" align="center" prop="phone"/>
@ -105,17 +105,16 @@
<el-table-column label="所属医院" align="center" prop="hospital" /> <el-table-column label="所属医院" align="center" prop="hospital" />
<el-table-column label="联系地址" align="center" prop="address" /> <el-table-column label="联系地址" align="center" prop="address" />
<el-table-column label="个人简介" align="center" prop="introduction" /> <el-table-column label="个人简介" align="center" prop="introduction" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" fixed="right" width="180">
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" fixed="right" width="200">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
size="mini" size="mini"
type="text" type="text"
icon="el-icon-view" icon="el-icon-view"
style="color: #e6a23c"
class = "info-btn view-btn" class = "info-btn view-btn"
@click="handleView(scope.row)" @click="handleView(scope.row)"
v-hasPermi="['vet:info:view']" v-hasPermi="['vet:info:view']"
>详情</el-button>
>查看</el-button>
<el-button <el-button
size="mini" size="mini"
type="text" type="text"
@ -345,6 +344,16 @@ export default {
created() { created() {
this.getList() this.getList()
}, },
mounted() {
//
if (this.$route.query.needCompleteInfo === 'true') {
this.$message.warning('请完善您的个人信息');
this.$router.replace({
...this.$route,
query: {}
});
}
},
methods: { methods: {
/** 查询兽医个人信息列表 */ /** 查询兽医个人信息列表 */
getList() { getList() {
@ -416,25 +425,19 @@ export default {
getfull(id).then(response => { getfull(id).then(response => {
if (response.code === 200) { if (response.code === 200) {
const data = response.data const data = response.data
console.log('详情返回数据:', data) //
console.log('详情返回数据:', data)
//
// data.vetInfo
if (data.vetInfo) { if (data.vetInfo) {
this.detailData = data.vetInfo this.detailData = data.vetInfo
// 使 qualifications
this.certificateList = data.qualifications || [] this.certificateList = data.qualifications || []
} else if (data.personalInfo) { } else if (data.personalInfo) {
//
this.detailData = data.personalInfo this.detailData = data.personalInfo
this.certificateList = data.certificates || data.qualifications || [] this.certificateList = data.certificates || data.qualifications || []
} else { } else {
// 使 data
this.detailData = data this.detailData = data
this.certificateList = data.qualifications || [] this.certificateList = data.qualifications || []
} }
//
if (this.certificateList.length === 0) { if (this.certificateList.length === 0) {
console.log('没有证书数据') console.log('没有证书数据')
} }
@ -546,8 +549,8 @@ export default {
transition: all 0.3s ease; transition: all 0.3s ease;
} }
.view-btn:hover{
background-color: rgba(243, 239, 231, 100);
.view-btn:hover {
background-color: rgb(216, 238, 248);
transform: translateY(-1px); transform: translateY(-1px);
} }

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

@ -62,11 +62,11 @@
<el-button <el-button
type="primary" type="primary"
plain plain
icon="el-icon-plus"
icon="el-icon-finished"
size="mini" size="mini"
@click="handleAdd" @click="handleAdd"
v-hasPermi="['vet:knowledge:add']" v-hasPermi="['vet:knowledge:add']"
>新增文章</el-button>
>发布文章</el-button>
</el-col> </el-col>
<el-col :span="1.5"> <el-col :span="1.5">
<el-button <el-button
@ -90,38 +90,38 @@
v-hasPermi="['vet:knowledge:audit']" v-hasPermi="['vet:knowledge:audit']"
>审核</el-button> >审核</el-button>
</el-col> </el-col>
<el-col :span="1.5">
<el-button
type="success"
plain
icon="el-icon-check"
size="mini"
:disabled="single"
@click="handlePublish"
v-hasPermi="['vet:knowledge:publish']"
>发布文章</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
plain
icon="el-icon-delete"
size="mini"
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['vet:knowledge:remove']"
>删除</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="info"
plain
icon="el-icon-download"
size="mini"
@click="handleExport"
v-hasPermi="['vet:knowledge:export']"
>导出</el-button>
</el-col>
<!-- <el-col :span="1.5">-->
<!-- <el-button-->
<!-- type="success"-->
<!-- plain-->
<!-- icon="el-icon-check"-->
<!-- size="mini"-->
<!-- :disabled="single"-->
<!-- @click="handlePublish"-->
<!-- v-hasPermi="['vet:knowledge:publish']"-->
<!-- >发布文章</el-button>-->
<!-- </el-col>-->
<!-- <el-col :span="1.5">-->
<!-- <el-button-->
<!-- type="danger"-->
<!-- plain-->
<!-- icon="el-icon-delete"-->
<!-- size="mini"-->
<!-- :disabled="multiple"-->
<!-- @click="handleDelete"-->
<!-- v-hasPermi="['vet:knowledge:remove']"-->
<!-- >删除</el-button>-->
<!-- </el-col>-->
<!-- <el-col :span="1.5">-->
<!-- <el-button-->
<!-- type="info"-->
<!-- plain-->
<!-- icon="el-icon-download"-->
<!-- size="mini"-->
<!-- @click="handleExport"-->
<!-- v-hasPermi="['vet:knowledge:export']"-->
<!-- >导出</el-button>-->
<!-- </el-col>-->
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row> </el-row>
@ -140,9 +140,14 @@
<image-preview :src="scope.row.coverImage" :width="50" :height="50" /> <image-preview :src="scope.row.coverImage" :width="50" :height="50" />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="文章标题" align="center" prop="title" min-width="200" show-overflow-tooltip />
<el-table-column label="文章副标题" align="center" prop="subtitle" min-width="200" show-overflow-tooltip />
<el-table-column label="文章内容" align="center" prop="content" min-width="200" show-overflow-tooltip />
<el-table-column label="文章标题" align="center" prop="title" min-width="100" show-overflow-tooltip/>
<el-table-column label="文章副标题" align="center" prop="subtitle" min-width="100" show-overflow-tooltip />
<!-- <el-table-column label="文章内容" align="center" prop="content" min-width="200" show-overflow-tooltip />-->
<el-table-column label="文章内容" align="center" prop="content" min-width="200" show-overflow-tooltip>
<template #default="scope">
<div v-html="scope.row.content"></div>
</template>
</el-table-column>
<el-table-column label="发布时间" align="center" prop="publishTime" min-width="200" show-overflow-tooltip /> <el-table-column label="发布时间" align="center" prop="publishTime" min-width="200" show-overflow-tooltip />
<el-table-column label="查看次数" align="center" prop="viewCount" min-width="200" show-overflow-tooltip /> <el-table-column label="查看次数" align="center" prop="viewCount" min-width="200" show-overflow-tooltip />
@ -179,21 +184,24 @@
<span v-else>-</span> <span v-else>-</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="280">
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" fixed="right" width="280">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
size="mini" size="mini"
type="text" type="text"
icon="el-icon-view" icon="el-icon-view"
@click="handleView(scope.row)" @click="handleView(scope.row)"
class="info-btn view-btn"
>查看</el-button> >查看</el-button>
<el-button <el-button
size="mini" size="mini"
type="text" type="text"
icon="el-icon-edit" icon="el-icon-edit"
style="color: #42B983"
@click="handleUpdate(scope.row)" @click="handleUpdate(scope.row)"
v-hasPermi="['vet:knowledge:edit']" v-hasPermi="['vet:knowledge:edit']"
v-if="scope.row.articleStatus === '0' && scope.row.auditStatus === '0'" v-if="scope.row.articleStatus === '0' && scope.row.auditStatus === '0'"
class="info-btn alter-btn"
>修改</el-button> >修改</el-button>
<el-button <el-button
size="mini" size="mini"
@ -228,6 +236,7 @@
@click="handleOffline(scope.row)" @click="handleOffline(scope.row)"
v-hasPermi="['vet:knowledge:publish']" v-hasPermi="['vet:knowledge:publish']"
v-if="scope.row.articleStatus === '1'" v-if="scope.row.articleStatus === '1'"
class="info-btn offline-btn"
>下架</el-button> >下架</el-button>
<!-- 上架按钮已下架状态显示 --> <!-- 上架按钮已下架状态显示 -->
<el-button <el-button
@ -243,9 +252,11 @@
size="mini" size="mini"
type="text" type="text"
icon="el-icon-delete" icon="el-icon-delete"
style="color: #f28888"
@click="handleDelete(scope.row)" @click="handleDelete(scope.row)"
v-hasPermi="['vet:knowledge:remove']" v-hasPermi="['vet:knowledge:remove']"
v-if="scope.row.articleStatus === '0'" v-if="scope.row.articleStatus === '0'"
class="info-btn delete-btn"
>删除</el-button> >删除</el-button>
</template> </template>
</el-table-column> </el-table-column>
@ -262,25 +273,25 @@
<!-- 新增/修改文章对话框 --> <!-- 新增/修改文章对话框 -->
<el-dialog :title="title" :visible.sync="open" width="800px" append-to-body> <el-dialog :title="title" :visible.sync="open" width="800px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px"> <el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="推荐专家" prop="expertId">
<el-select
v-model="form.expertId"
placeholder="请选择推荐专家"
clearable
filterable
style="width: 100%;"
>
<el-option
v-for="expert in expertList"
:key="expert.expertId"
:label="expert.realName"
:value="expert.expertId"
/>
</el-select>
<div style="font-size: 12px; color: #999; margin-top: 5px;">
提示选择为您推荐药品的专家
</div>
</el-form-item>
<el-form-item label="推荐专家" prop="expertId">
<el-select
v-model="form.expertId"
placeholder="请选择推荐专家"
clearable
filterable
style="width: 100%;"
>
<el-option
v-for="expert in expertList"
:key="expert.expertId"
:label="expert.realName"
:value="expert.expertId"
/>
</el-select>
<div style="font-size: 12px; color: #999; margin-top: 5px;">
提示选择为您推荐药品的专家
</div>
</el-form-item>
<el-form-item label="封面" prop="coverImage"> <el-form-item label="封面" prop="coverImage">
<image-upload v-model="form.coverImage" /> <image-upload v-model="form.coverImage" />
</el-form-item> </el-form-item>
@ -877,4 +888,32 @@ export default {
max-height: 400px; max-height: 400px;
overflow-y: auto; overflow-y: auto;
} }
/* 操作按钮 */
.info-btn {
padding: 6px 10px;
border-radius: 4px;
margin: 0 10px;
transition: all 0.3s ease;
}
.view-btn:hover {
background-color: rgb(216, 238, 248);
transform: translateY(-1px);
}
.offline-btn:hover{
background-color: rgba(243, 239, 231, 100);
transform: translateY(-1px);
}
.alter-btn:hover{
background-color: rgb(230, 255, 238);
transform: translateY(-1px);
}
.delete-btn:hover {
background-color: rgba(245, 108, 108, 0.1);
transform: translateY(-1px);
}
</style> </style>

4
chenhai-ui/src/views/vet/notification/index.vue

@ -513,8 +513,8 @@ export default {
} }
.info-icon { .info-icon {
width: 30px;
height: 30px;
width: 40px;
height: 40px;
margin-right: 15px; margin-right: 15px;
filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1)); filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
} }

2158
chenhai-ui/src/views/vet/product/index.vue
File diff suppressed because it is too large
View File

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

@ -64,39 +64,39 @@
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="primary"
plain
icon="el-icon-plus"
size="mini"
@click="handleAdd"
v-hasPermi="['vet:qualification:add']"
>新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="success"
plain
icon="el-icon-edit"
size="mini"
:disabled="single"
@click="handleUpdate"
v-hasPermi="['vet:qualification:edit']"
>修改</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
plain
icon="el-icon-delete"
size="mini"
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['vet:qualification:remove']"
>删除</el-button>
</el-col>
<!-- <el-row :gutter="10" class="mb8">-->
<!-- <el-col :span="1.5">-->
<!-- <el-button-->
<!-- type="primary"-->
<!-- plain-->
<!-- icon="el-icon-plus"-->
<!-- size="mini"-->
<!-- @click="handleAdd"-->
<!-- v-hasPermi="['vet:qualification:add']"-->
<!-- >新增</el-button>-->
<!-- </el-col>-->
<!-- <el-col :span="1.5">-->
<!-- <el-button-->
<!-- type="success"-->
<!-- plain-->
<!-- icon="el-icon-edit"-->
<!-- size="mini"-->
<!-- :disabled="single"-->
<!-- @click="handleUpdate"-->
<!-- v-hasPermi="['vet:qualification:edit']"-->
<!-- >修改</el-button>-->
<!-- </el-col>-->
<!-- <el-col :span="1.5">-->
<!-- <el-button-->
<!-- type="danger"-->
<!-- plain-->
<!-- icon="el-icon-delete"-->
<!-- size="mini"-->
<!-- :disabled="multiple"-->
<!-- @click="handleDelete"-->
<!-- v-hasPermi="['vet:qualification:remove']"-->
<!-- >删除</el-button>-->
<!-- </el-col>-->
<!-- <el-col :span="1.5">--> <!-- <el-col :span="1.5">-->
<!-- <el-button--> <!-- <el-button-->
<!-- type="warning"--> <!-- type="warning"-->
@ -107,9 +107,10 @@
<!-- v-hasPermi="['vet:qualification:export']"--> <!-- v-hasPermi="['vet:qualification:export']"-->
<!-- >导出</el-button>--> <!-- >导出</el-button>-->
<!-- </el-col>--> <!-- </el-col>-->
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<!-- <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>-->
<!-- </el-row>-->
<!-- 表格 -->
<el-table v-loading="loading" :data="qualificationList" @selection-change="handleSelectionChange"> <el-table v-loading="loading" :data="qualificationList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" /> <el-table-column type="selection" width="55" align="center" />
<!-- <el-table-column label="资质ID" align="center" prop="qualificationId" v-if="false" />--> <!-- <el-table-column label="资质ID" align="center" prop="qualificationId" v-if="false" />-->
@ -121,7 +122,7 @@
<span v-else style="color: #909399">-</span> <span v-else style="color: #909399">-</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="身份证号" align="center" prop="idCard" width="150">
<el-table-column label="身份证号" align="center" prop="idCard" width="180">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="scope.row.idCard">{{ scope.row.idCard }}</span> <span v-if="scope.row.idCard">{{ scope.row.idCard }}</span>
<span v-else style="color: #909399">-</span> <span v-else style="color: #909399">-</span>
@ -192,7 +193,7 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="备注" align="center" prop="remark" /> <el-table-column label="备注" align="center" prop="remark" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" fixed="right" width="300">
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" fixed="right" width="200">
<template slot-scope="scope"> <template slot-scope="scope">
<!-- 查看按钮 --> <!-- 查看按钮 -->
<el-button <el-button
@ -201,6 +202,7 @@
icon="el-icon-view" icon="el-icon-view"
@click="handleView(scope.row)" @click="handleView(scope.row)"
v-hasPermi="['vet:qualification:query']" v-hasPermi="['vet:qualification:query']"
class="info-btn view-btn"
>查看证书详情</el-button> >查看证书详情</el-button>
<!-- 修改按钮 --> <!-- 修改按钮 -->
@ -269,7 +271,7 @@
@pagination="getList" @pagination="getList"
/> />
<!-- 显示资质证书信息 -->
<!-- 显示资质证书信息弹窗 -->
<el-dialog :title="title" :visible.sync="openDetail" width="800px" append-to-body> <el-dialog :title="title" :visible.sync="openDetail" width="800px" append-to-body>
<div v-if="detailData" style="padding: 20px;"> <div v-if="detailData" style="padding: 20px;">
<div style="margin-top: 30px;"> <div style="margin-top: 30px;">
@ -344,17 +346,18 @@
</el-tag> </el-tag>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" fixed="right" width="300">
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" fixed="right" width="100">
<template slot-scope="scope"> <template slot-scope="scope">
<!-- 修改按钮 --> <!-- 修改按钮 -->
<el-button <el-button
v-if="!scope.row.auditStatus || scope.row.auditStatus === '0' || scope.row.auditStatus === '2'"
v-if="!detailData.auditStatus || detailData.auditStatus === '0' || detailData.auditStatus === '2'"
size="mini" size="mini"
type="text" type="text"
icon="el-icon-edit" icon="el-icon-edit"
style="color: #42B983" style="color: #42B983"
@click="handleUpdate(scope.row)" @click="handleUpdate(scope.row)"
v-hasPermi="['vet:qualification:edit']" v-hasPermi="['vet:qualification:edit']"
class = "info-btn alter-btn"
>修改</el-button> >修改</el-button>
</template> </template>
</el-table-column> </el-table-column>
@ -366,6 +369,7 @@
</div> </div>
</el-dialog> </el-dialog>
<!-- 图片预览弹窗 -->
<el-dialog :visible.sync="previewDialogVisible" width="60%" append-to-body> <el-dialog :visible.sync="previewDialogVisible" width="60%" append-to-body>
<div style="text-align: center; padding: 20px;"> <div style="text-align: center; padding: 20px;">
<img <img
@ -377,8 +381,7 @@
</div> </div>
</el-dialog> </el-dialog>
<!-- 添加或修改兽医资质对话框 -->
<!-- 添加或修改兽医资质弹窗 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body> <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px"> <el-form ref="form" :model="form" :rules="rules" label-width="80px">
<!-- <el-form-item label="真实姓名" prop="realName">--> <!-- <el-form-item label="真实姓名" prop="realName">-->
@ -456,6 +459,7 @@
<script> <script>
import { listQualification, getQualificationCertificate, delQualification, getQualificationCertificates, updateAndSubmitQualification} from "@/api/vet/qualification" import { listQualification, getQualificationCertificate, delQualification, getQualificationCertificates, updateAndSubmitQualification} from "@/api/vet/qualification"
import {listQualificationCertificates} from "../../../api/vet/qualification";
export default { export default {
name: "Qualification", name: "Qualification",
@ -542,7 +546,7 @@ export default {
this.getList() this.getList()
}, },
methods: { methods: {
/** 查询兽医资质列表 */
//
getList() { getList() {
this.loading = true this.loading = true
listQualification(this.queryParams).then(response => { listQualification(this.queryParams).then(response => {
@ -552,7 +556,7 @@ export default {
}) })
}, },
/** 获取证书状态标签 */
//
getCertStatusLabel(status) { getCertStatusLabel(status) {
const map = { const map = {
'0': '正常', '0': '正常',
@ -562,7 +566,7 @@ export default {
return map[status] || status || '-' return map[status] || status || '-'
}, },
/** 获取证书状态标签类型 */
//
getCertStatusType(status) { getCertStatusType(status) {
const map = { const map = {
'0': 'success', '0': 'success',
@ -572,7 +576,7 @@ export default {
return map[status] || 'info' return map[status] || 'info'
}, },
/** 获取审核状态标签类型 */
//
getAuditStatusType(status) { getAuditStatusType(status) {
const map = { const map = {
'0': 'info', // - '0': 'info', // -
@ -583,7 +587,7 @@ export default {
return map[status] || 'info' return map[status] || 'info'
}, },
/** 格式化资质类型显示 */
//
formatQualificationType(status) { formatQualificationType(status) {
const map = { const map = {
'1': '执业兽医师', '1': '执业兽医师',
@ -594,11 +598,12 @@ export default {
return map[status] || 'info' return map[status] || 'info'
}, },
/** 获取完整的图片URL */
// URL
getImageUrl(filePath) { getImageUrl(filePath) {
return `${this.baseUrl}${filePath}` return `${this.baseUrl}${filePath}`
}, },
//
isImageFile(filePath) { isImageFile(filePath) {
if (!filePath) return false; if (!filePath) return false;
const imageExts = ['.png','.jpg','.jpeg']; const imageExts = ['.png','.jpg','.jpeg'];
@ -606,20 +611,20 @@ export default {
return imageExts.includes(ext); return imageExts.includes(ext);
}, },
/** 判断是否为PDF文件 */
// PDF
isPdfFile(filePath) { isPdfFile(filePath) {
if (!filePath) return false; if (!filePath) return false;
const ext = filePath.substring(filePath.lastIndexOf('.')).toLowerCase(); const ext = filePath.substring(filePath.lastIndexOf('.')).toLowerCase();
return ext === '.pdf'; return ext === '.pdf';
}, },
/** 预览图片 */
//
previewCertificate(filePath) { previewCertificate(filePath) {
this.previewFileUrl = filePath; this.previewFileUrl = filePath;
this.previewDialogVisible = true; this.previewDialogVisible = true;
}, },
/** 下载文件 */
//
downloadFile(filePath) { downloadFile(filePath) {
const fullUrl = this.getImageUrl(filePath); const fullUrl = this.getImageUrl(filePath);
const link = document.createElement('a'); const link = document.createElement('a');
@ -726,7 +731,7 @@ export default {
// }) // })
// }, // },
/** 重新提交审核 */
//
resubmitForm() { resubmitForm() {
this.$refs["form"].validate(valid => { this.$refs["form"].validate(valid => {
if (valid) { if (valid) {
@ -854,14 +859,14 @@ export default {
// }) // })
// }, // },
/** 资质证书详情 */
//
handleView(row) { handleView(row) {
this.openDetail = true this.openDetail = true
this.detailData = row this.detailData = row
this.title = "资质证书详情" this.title = "资质证书详情"
this.certificateList = [] this.certificateList = []
this.detailLoading = true this.detailLoading = true
getQualificationCertificates(row.qualificationId).then(response => {
listQualificationCertificates(row.qualificationId).then(response => {
this.detailLoading = false this.detailLoading = false
if (response.code === 200) { if (response.code === 200) {
this.certificateList = response.rows || []; this.certificateList = response.rows || [];
@ -912,13 +917,13 @@ export default {
this.resetForm("form") this.resetForm("form")
}, },
/** 搜索按钮操作 */
//
handleQuery() { handleQuery() {
this.queryParams.pageNum = 1 this.queryParams.pageNum = 1
this.getList() this.getList()
}, },
/** 重置按钮操作 */
//
resetQuery() { resetQuery() {
this.resetForm("queryForm") this.resetForm("queryForm")
this.handleQuery() this.handleQuery()
@ -931,7 +936,7 @@ export default {
this.multiple = !selection.length this.multiple = !selection.length
}, },
/** 新增按钮操作 */
//
handleAdd() { handleAdd() {
this.reset() this.reset()
this.open = true this.open = true
@ -939,7 +944,7 @@ export default {
this.form.auditStatus = null this.form.auditStatus = null
}, },
/** 修改按钮操作 */
//
handleUpdate(row) { handleUpdate(row) {
this.reset() this.reset()
let certId = row.certId || row.certificateId || row.id let certId = row.certId || row.certificateId || row.id
@ -989,7 +994,7 @@ export default {
// }) // })
// }, // },
/** 删除按钮操作 */
//
handleDelete(row) { handleDelete(row) {
const qualificationIds = row.qualificationId || this.ids const qualificationIds = row.qualificationId || this.ids
this.$modal.confirm('是否确认删除兽医资质编号为"' + qualificationIds + '"的数据项?').then(function() { this.$modal.confirm('是否确认删除兽医资质编号为"' + qualificationIds + '"的数据项?').then(function() {
@ -1000,14 +1005,14 @@ export default {
}).catch(() => {}) }).catch(() => {})
}, },
/** 导出按钮操作 */
handleExport() {
this.download('vet/qualification/export', {
...this.queryParams
}, `qualification_${new Date().getTime()}.xlsx`)
},
//
// handleExport() {
// this.download('vet/qualification/export', {
// ...this.queryParams
// }, `qualification_${new Date().getTime()}.xlsx`)
// },
/** 根据字典值获取标签 */
//
getDictLabel(dictType, value) { getDictLabel(dictType, value) {
const dict = this.dict.type[dictType] const dict = this.dict.type[dictType]
if (dict && value) { if (dict && value) {
@ -1021,7 +1026,7 @@ export default {
</script> </script>
<style scoped> <style scoped>
/* 操作按钮样式优化 */
/* 操作按钮样式 */
.el-button--text { .el-button--text {
padding: 6px 10px; padding: 6px 10px;
margin: 0 2px; margin: 0 2px;
@ -1046,4 +1051,22 @@ export default {
::v-deep .qualification-detail-dialog table tr:last-child td { ::v-deep .qualification-detail-dialog table tr:last-child td {
border-bottom: none; border-bottom: none;
} }
/* 操作按钮 */
.info-btn {
padding: 6px 10px;
border-radius: 4px;
margin: 0 10px;
transition: all 0.3s ease;
}
.view-btn:hover {
background-color: rgb(216, 238, 248);
transform: translateY(-1px);
}
.alter-btn:hover{
background-color: rgb(230, 255, 238);
transform: translateY(-1px);
}
</style> </style>

34
chenhai-ui/src/views/vet/training/index.vue

@ -93,8 +93,8 @@
<span>{{ scope.row.publisherName || '-' }}</span> <span>{{ scope.row.publisherName || '-' }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="视频标题" align="center" prop="title" />
<el-table-column label="视频描述" align="center" prop="description" />
<el-table-column label="视频标题" align="center" prop="title" show-overflow-tooltip/>
<el-table-column label="视频描述" align="center" prop="description" show-overflow-tooltip/>
<el-table-column label="视频地址" align="center" prop="videoUrl" width="180" /> <el-table-column label="视频地址" align="center" prop="videoUrl" width="180" />
<el-table-column label="封面图片" align="center" prop="coverImage" width="100"> <el-table-column label="封面图片" align="center" prop="coverImage" width="100">
<template slot-scope="scope"> <template slot-scope="scope">
@ -135,15 +135,17 @@
</el-table-column> </el-table-column>
<!-- 操作列 --> <!-- 操作列 -->
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="300">
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" fixed="right" width="300">
<template slot-scope="scope"> <template slot-scope="scope">
<!-- 修改按钮 --> <!-- 修改按钮 -->
<el-button <el-button
size="mini" size="mini"
type="text" type="text"
icon="el-icon-edit" icon="el-icon-edit"
style="color: #42B983"
@click="handleUpdate(scope.row)" @click="handleUpdate(scope.row)"
v-hasPermi="['vet:training:edit']" v-hasPermi="['vet:training:edit']"
class="info-btn alter-btn"
>修改</el-button> >修改</el-button>
<!-- 提交审核按钮审核拒绝或无需审核状态 --> <!-- 提交审核按钮审核拒绝或无需审核状态 -->
@ -185,6 +187,7 @@
@click="handleOffline(scope.row.id)" @click="handleOffline(scope.row.id)"
v-hasPermi="['vet:training:offline']" v-hasPermi="['vet:training:offline']"
v-if="scope.row.status === '1'" v-if="scope.row.status === '1'"
class="info-btn offline-btn"
>下架</el-button> >下架</el-button>
<!-- 取消审核按钮 --> <!-- 取消审核按钮 -->
@ -203,8 +206,10 @@
size="mini" size="mini"
type="text" type="text"
icon="el-icon-delete" icon="el-icon-delete"
style="color: #f28888"
@click="handleDelete(scope.row)" @click="handleDelete(scope.row)"
v-hasPermi="['vet:training:remove']" v-hasPermi="['vet:training:remove']"
class="info-btn delete-btn"
>删除</el-button> >删除</el-button>
</template> </template>
</el-table-column> </el-table-column>
@ -1104,7 +1109,6 @@ export default {
</script> </script>
<style scoped> <style scoped>
/* 添加一些必要的样式 */
.video-url-cell { .video-url-cell {
display: flex; display: flex;
align-items: center; align-items: center;
@ -1117,4 +1121,26 @@ export default {
text-overflow: ellipsis; text-overflow: ellipsis;
white-space: nowrap; white-space: nowrap;
} }
.info-btn {
padding: 6px 10px;
border-radius: 4px;
margin: 0 10px;
transition: all 0.3s ease;
}
.offline-btn:hover{
background-color: rgba(243, 239, 231, 100);
transform: translateY(-1px);
}
.alter-btn:hover{
background-color: rgb(230, 255, 238);
transform: translateY(-1px);
}
.delete-btn:hover {
background-color: rgba(245, 108, 108, 0.1);
transform: translateY(-1px);
}
</style> </style>
Loading…
Cancel
Save