Browse Source

兽医PC端修改

master
王妍洁 2 months ago
parent
commit
bc6351d99a
  1. 56
      chenhai-ui/src/api/vet/merchant.js
  2. 56
      chenhai-ui/src/api/vet/product.js
  3. BIN
      chenhai-ui/src/assets/images/xiaoxi.png
  4. BIN
      chenhai-ui/src/assets/images/zhixiang.png
  5. 289
      chenhai-ui/src/views/muhu/consultation/index.vue
  6. 89
      chenhai-ui/src/views/syd.vue
  7. 170
      chenhai-ui/src/views/system/questions/index.vue
  8. 225
      chenhai-ui/src/views/system/recommendation/index.vue
  9. 140
      chenhai-ui/src/views/vet/article/index.vue
  10. 155
      chenhai-ui/src/views/vet/comments/index.vue
  11. 281
      chenhai-ui/src/views/vet/experts/index.vue
  12. 183
      chenhai-ui/src/views/vet/info/index.vue
  13. 198
      chenhai-ui/src/views/vet/knowledge/index.vue
  14. 404
      chenhai-ui/src/views/vet/merchant/index.vue
  15. 211
      chenhai-ui/src/views/vet/notification/index.vue
  16. 790
      chenhai-ui/src/views/vet/product/index.vue
  17. 177
      chenhai-ui/src/views/vet/qualification/index.vue
  18. 193
      chenhai-ui/src/views/vet/training/index.vue
  19. 1
      chenhai-ui/vue.config.js

56
chenhai-ui/src/api/vet/merchant.js

@ -42,3 +42,59 @@ export function delMerchant(shopId) {
method: 'delete'
})
}
// Post /vet/merchant/audit 审核
export function audit(shopId) {
return request({
url: '/vet/merchant/audit/' + shopId,
method: 'post'
})
}
///vet/merchant/submitAudit/{shopId}提交审核
export function submitAudit(shopId) {
return request({
url: '/vet/merchant/submitAudit/' + shopId,
method: 'post'
})
}
// /vet/merchant/publish/{shopId}上架
export function publish(shopId) {
return request({
url: '/vet/merchant/publish/' + shopId,
method: 'post'
})
}
// /vet/merchant/offline/{shopId}下架
export function offline(shopId) {
return request({
url: '/vet/merchant/offline/' + shopId,
method: 'post'
})
}
// Get /vet/product/shop/{shopId} 详情
export function getShop(shopId) {
return request({
url: '/vet/product/shop/' + shopId,
method: 'get'
})
}
// /vet/merchant/resubmitAudit/{shopId}商家重新提交审核
export function resubmitAudit(shopId) {
return request({
url: '/vet/merchant/resubmitAudit/' + shopId,
method: 'post'
})
}
// /vet/merchant/cancelAudit/{shopId}取消审核
export function cancelAudit(shopId) {
return request({
url: '/vet/merchant/cancelAudit/' + shopId,
method: 'post'
})
}

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

@ -42,3 +42,59 @@ export function delProduct(id) {
method: 'delete'
})
}
// auditStatus审核状态 auditOpinion审核意见 shopStatus店铺状态
// /vet/product/submitAudit/{id}提交审核
export function submitAuditProduct(id) {
return request({
url: '/vet/product/submitAudit/' + id,
method: 'post'
})
}
// /vet/product/publish/{id}上架
export function publishProduct(id) {
return request({
url: '/vet/product/publish/' + id,
method: 'post'
})
}
// /vet/product/offline/{id}下架
export function offlineProduct(id) {
return request({
url: '/vet/product/offline/' + id,
method: 'post'
})
}
// /vet/product/cancelAudit/{id}取消审核
export function cancelAuditProduct(id) {
return request({
url: '/vet/product/cancelAudit/' + id,
method: 'post'
})
}
// /vet/product/audit/list 管理员查询所有产品信息列表
export function listAuditProduct(query) {
return request({
url: '/vet/product/audit/list',
method: 'get',
params: query
})
}
// /vet/product/batchSubmitAudit/{shopId}批量提交产品审核(按商家)
export function batchSubmitAuditProduct(shopId) {
return request({
url: '/vet/product/batchSubmitAudit/' + shopId,
method: 'post'
})
}
// /vet/product/resubmitAudit/{id}产品重新提交审核
export function resubmitAuditProduct(id) {
return request({
url: '/vet/product/resubmitAudit/' + id,
method: 'post'
})
}

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

After

Width: 200  |  Height: 200  |  Size: 7.8 KiB

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

Before

Width: 200  |  Height: 200  |  Size: 3.9 KiB

289
chenhai-ui/src/views/muhu/consultation/index.vue

@ -9,22 +9,22 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="是否含敏感词" prop="isSensitive">
<el-input
v-model="queryParams.isSensitive"
placeholder="请输入是否含敏感词"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="查看次数" prop="viewCount">
<el-input
v-model="queryParams.viewCount"
placeholder="请输入查看次数"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<!-- <el-form-item label="是否含敏感词" prop="isSensitive">-->
<!-- <el-input-->
<!-- v-model="queryParams.isSensitive"-->
<!-- placeholder="请输入是否含敏感词"-->
<!-- clearable-->
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="查看次数" prop="viewCount">-->
<!-- <el-input-->
<!-- v-model="queryParams.viewCount"-->
<!-- placeholder="请输入查看次数"-->
<!-- clearable-->
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!-- </el-form-item>-->
<el-form-item label="回复数量" prop="replyCount">
<el-input
v-model="queryParams.replyCount"
@ -89,60 +89,76 @@
<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" />
<image-preview :src="scope.row.avatar" :width="50" :height="50"/>
</template>
</el-table-column>
<el-table-column label="发布者" align="center" prop="farmerName" />
<el-table-column label="问诊标题" align="center" prop="title" />
<el-table-column label="病情描述" align="center" prop="description" />
<el-table-column label="牲畜种类" align="center" prop="animalType" />
<el-table-column label="牲畜年龄" align="center" prop="animalAge" />
<el-table-column label="牲畜性别" align="center" prop="animalGender" />
<el-table-column label="发布者" align="center" prop="farmerName" width="150" :show-overflow-tooltip="true"/>
<el-table-column label="问诊标题" align="center" prop="title" width="150" :show-overflow-tooltip="true"/>
<!-- <el-table-column label="病情描述" align="center" prop="description" />-->
<!-- <el-table-column label="牲畜种类" align="center" prop="animalType" />-->
<!-- <el-table-column label="牲畜年龄" align="center" prop="animalAge" />-->
<!-- <el-table-column label="牲畜性别" align="center" prop="animalGender" />-->
<el-table-column label="症状照片" align="center" prop="images" width="100">
<template slot-scope="scope">
<image-preview :src="scope.row.images" :width="50" :height="50" />
</template>
</el-table-column>
<el-table-column label="回复状态" align="center" prop="status" />
<el-table-column label="回复条数" align="center" prop="replyCount" />
<el-table-column label="问诊时间" align="center" prop="createdTime" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<el-table-column label="回复条数" align="center" prop="replyCount"/>
<el-table-column label="问诊时间" align="center" prop="createdTime" width="200"/>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" fixed="right" width="300">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-view"
@click="handleView(scope.row)"
v-hasPermi="['vet:comments:list']"
class="info-btn view-btn"
>详情</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-chat-dot-round"
@click="handleReply(scope.row)"
style="color: #07368a"
v-hasPermi="['vet:comments:list']"
class="info-btn chat-btn"
>回复</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
style="color: #42B983"
v-hasPermi="['muhu:consultation:edit']"
class="info-btn alter-btn"
>修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
style="color: #f56c6c"
v-hasPermi="['muhu:consultation:remove']"
class="info-btn delete-btn"
>删除</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<div class="pagestyle">
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
</div>
<!-- 添加或修改问诊单对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<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="title">
<el-input v-model="form.title" placeholder="请输入问诊标题" />
@ -169,19 +185,49 @@
</div>
</el-dialog>
<!-- 回复管理对话框 -->
<el-dialog
title="回复"
:visible.sync="replyOpen"
width="1000px"
append-to-body
:close-on-click-modal="false"
>
<comments-list
:consultation-id="currentConsultationId"
v-if="replyOpen"
/>
</el-dialog>
<!-- 回复管理对话框 -->
<el-dialog
title="回复"
:visible.sync="replyOpen"
width="80%"
append-to-body
:close-on-click-modal="false"
>
<comments-list
:consultation-id="currentConsultationId"
v-if="replyOpen"
/>
</el-dialog>
<!-- 详情弹窗 -->
<el-dialog title="咨询详情" :visible.sync="detailViews" width="80%" append-to-body>
<el-descriptions :column="3" border v-loading="detailLoading" >
<el-descriptions-item label="问诊标题" :span="3">
{{ currentDetail.title || '--' }}
</el-descriptions-item>
<el-descriptions-item label="病情描述" :span="3">
{{ currentDetail.description || '--' }}
</el-descriptions-item>
<el-descriptions-item label="牲畜种类">
{{ currentDetail.animalType || '--' }}
</el-descriptions-item>
<el-descriptions-item label="牲畜年龄">
{{ currentDetail.animalAge || '--' }}
</el-descriptions-item>
<el-descriptions-item label="牲畜性别">
{{ currentDetail.animalGender || '--' }}
</el-descriptions-item>
<el-descriptions-item label="症状照片" :span="1">
<image-preview :src="currentDetail.images" :width="50" :height="50" />
</el-descriptions-item>
<el-descriptions-item label="问诊时间" :span="2">
{{ currentDetail.createdTime || '--' }}
</el-descriptions-item>
</el-descriptions>
<div slot="footer" class="dialog-footer">
<el-button @click="detailViews = false"> </el-button>
</div>
</el-dialog>
</div>
</template>
@ -198,6 +244,7 @@ export default {
return {
//
loading: true,
detailLoading: false,
//
ids: [],
//
@ -218,6 +265,9 @@ export default {
title: "",
//
open: false,
detailViews: false,
//
currentDetail: {},
//
queryParams: {
pageNum: 1,
@ -310,6 +360,22 @@ export default {
console.log('点击回复,问诊单ID:', row.formId)
console.log('当前currentConsultationId:', this.currentConsultationId)
},
/** 详情按钮操作 */
handleView(row) {
this.detailViews = true;
this.detailLoading = true;
this.currentDetail = {};
const formId = row.formId;
getConsultation(formId).then(response => {
if (response.code === 200) {
this.currentDetail = response.data;
} else {
this.$modal.msgError("获取详情失败");
}
this.detailLoading = false;
});
},
/** 新增按钮操作 */
handleAdd() {
this.reset()
@ -365,3 +431,132 @@ export default {
}
}
</script>
<style scoped>
::v-deep .el-descriptions-item__cell{
width: 90px;
}
::v-deep .el-descriptions-row th{
text-align: center !important;color: #7b7c7f;
background: #faf7f7;
}
::v-deep .el-descriptions .is-bordered .el-descriptions-item__cell {
border: 1px solid #bcbbbb;
padding: 12px 10px;
}
::v-deep .pagestyle .el-input{
width: auto !important;
}
</style>
<style scoped lang="scss">
//
.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);
}
.chat-btn:hover {
background-color: rgb(225, 233, 246);
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);
}
// /
::v-deep .el-dialog {
border-radius: 12px;
overflow: hidden;
box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
animation: dialogFadeIn 0.3s ease;
}
::v-deep .el-dialog__header {
background: linear-gradient(135deg, #42b983 0%, #83df92 100%);
padding: 18px 24px;
border-bottom: none;
position: relative;
}
::v-deep .el-dialog__title {
font-size: 17px;
font-weight: 600;
color: white;
letter-spacing: 0.5px;
}
::v-deep .el-dialog__headerbtn:hover .el-dialog__close {
color: #ffd04b;
transform: rotate(90deg);
}
::v-deep .el-dialog__body {
padding: 28px 24px 20px;
background-color: #f8fafc;
max-height: 70vh;
overflow-y: auto;
}
::v-deep .el-form-item {
margin-bottom: 20px;
transition: all 0.3s;
}
::v-deep .el-form-item__label {
font-weight: 500;
color: #2d3748;
font-size: 14px;
transition: color 0.3s;
}
::v-deep .el-input,
::v-deep .el-textarea,
::v-deep .el-select {
width: 100%;
}
::v-deep .el-input__inner,
::v-deep .el-textarea__inner {
border-radius: 8px;
border: 1px solid #dcdfe6;
font-size: 14px;
transition: all 0.3s;
background-color: #fcfdfe;
}
::v-deep .el-input__inner:focus,
::v-deep .el-textarea__inner:focus {
border-color: #42B983;
box-shadow: 0 0 0 3px rgb(230, 255, 238);
background-color: white;
}
::v-deep .el-select .el-input__inner {
padding-right: 35px;
}
::v-deep .el-dialog__footer {
padding: 20px 24px;
background-color: #f8fafc;
border-top: 1px solid #eef2f7;
border-radius: 0 0 12px 12px;
}
</style>

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

@ -1,5 +1,64 @@
<template>
<div class="app-container">
<!-- 统计-->
<!-- <div>-->
<!-- <el-row :gutter="20">-->
<!-- <el-col :span="6">-->
<!-- <div>-->
<!-- <el-statistic-->
<!-- group-separator=","-->
<!-- :precision="2"-->
<!-- :value="value2"-->
<!-- :title="title"-->
<!-- ></el-statistic>-->
<!-- </div>-->
<!-- </el-col>-->
<!-- <el-col :span="6">-->
<!-- <div>-->
<!-- <el-statistic title="男女比">-->
<!-- <template slot="formatter">-->
<!-- 456/2-->
<!-- </template>-->
<!-- </el-statistic>-->
<!-- </div>-->
<!-- </el-col>-->
<!-- <el-col :span="6">-->
<!-- <div>-->
<!-- <el-statistic-->
<!-- group-separator=","-->
<!-- :precision="2"-->
<!-- decimal-separator="."-->
<!-- :value="value1"-->
<!-- :title="title"-->
<!-- >-->
<!-- <template slot="prefix">-->
<!-- <i class="el-icon-s-flag" style="color: red"></i>-->
<!-- </template>-->
<!-- <template slot="suffix">-->
<!-- <i class="el-icon-s-flag" style="color: blue"></i>-->
<!-- </template>-->
<!-- </el-statistic>-->
<!-- </div>-->
<!-- </el-col>-->
<!-- <el-col :span="6">-->
<!-- <div>-->
<!-- <el-statistic :value="like ? 521 : 520" title="Feedback">-->
<!-- <template slot="suffix">-->
<!-- <span @click="like = !like" class="like">-->
<!-- <i-->
<!-- class="el-icon-star-on"-->
<!-- style="color:red"-->
<!-- v-show="!!like"-->
<!-- ></i>-->
<!-- <i class="el-icon-star-off" v-show="!like"></i>-->
<!-- </span>-->
<!-- </template>-->
<!-- </el-statistic>-->
<!-- </div>-->
<!-- </el-col>-->
<!-- </el-row>-->
<!-- </div>-->
<!-- 消息通知 -->
<div class="info-container">
<div class="card-container">
@ -50,8 +109,13 @@
</div>
</div>
<!-- 可视化-->
<!-- 资质弹窗 -->
<el-dialog :title="title" :visible.sync="flag" width="800px" append-to-body>
<el-dialog :title="title" :visible.sync="flag" width="80%" append-to-body>
<el-steps :active="activeStep" finish-status="success" simple style="margin-bottom: 40px;">
<el-step title="选择经营范围"></el-step>
<el-step title="上传资质"></el-step>
@ -380,6 +444,12 @@ export default {
{required: true, type: 'array', message: "请选择至少一个经营范围", trigger: "change"}
],
},
//
platformUserValue: 12589.68, // 使
herdsmanCount: "456/2", //
vetCount: 89.50, //
shopCount: 521, //
refreshing: false, //
}
},
created() {
@ -1007,4 +1077,21 @@ export default {
.certificate-upload-container::-webkit-scrollbar-thumb:hover {
background: #a8a8a8;
}
//
.statistics-container {
padding: 20px;
background-color: #f5f7fa;
border-radius: 8px;
}
.statistic-card {
background: #fff;
padding: 16px;
border-radius: 4px;
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
}
.shop-icon {
cursor: pointer;
margin-left: 8px;
}
</style>

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

@ -1,16 +1,16 @@
<template>
<div class="app-container">
<!-- 搜索区域 -->
<div class="search-area">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="80px">
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
</div>
<!-- 操作按钮区域 -->
<!-- 搜索区域 -->
<!-- <div class="search-area">-->
<!-- <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="80px">-->
<!-- <el-form-item>-->
<!-- <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>-->
<!-- <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>-->
<!-- </el-form-item>-->
<!-- </el-form>-->
<!-- </div>-->
<!-- 操作按钮区域-->
<div class="operation-area">
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
@ -71,16 +71,16 @@
style="width: 100%"
height="calc(100vh - 260px)"
>
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="用户名" align="center" prop="nickName" width="120" />
<el-table-column label="问题标题" align="left" prop="title" min-width="150">
<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="title" width="150" :show-overflow-tooltip="true">
<template slot-scope="scope">
<el-tooltip :content="scope.row.title" placement="top">
<span class="title-text">{{ scope.row.title }}</span>
</el-tooltip>
</template>
</el-table-column>
<el-table-column label="内容" align="left" prop="content" min-width="200">
<el-table-column label="内容" align="center" prop="content" min-width="300">
<template slot-scope="scope">
<div class="content-preview" v-html="scope.row.content"></div>
</template>
@ -90,54 +90,62 @@
<image-preview :src="scope.row.images" :width="50" :height="50" />
</template>
</el-table-column>
<el-table-column label="标签" align="center" prop="tags" width="120">
<el-table-column label="标签" align="center" prop="tags" width="150">
<template slot-scope="scope">
<el-tag v-if="scope.row.tags" size="mini">{{ scope.row.tags }}</el-tag>
</template>
</el-table-column>
<el-table-column label="回复数" align="center" prop="answerCount" width="100"/>
<el-table-column label="浏览量" align="center" prop="viewCount" width="100"/>
<el-table-column label="创建时间" align="center" prop="createdAt" width="160" />
<el-table-column label="操作" align="center" width="180" fixed="right">
<el-table-column label="创建时间" align="center" prop="createdAt" width="150" />
<el-table-column label="操作" align="center" fixed="right" width="300">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
style="color: #42B983"
v-hasPermi="['system:questions:edit']"
class="info-btn alter-btn"
>编辑</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-chat-dot-round"
@click="openAnswersDialog(scope.row)"
style="color: #07368a"
v-hasPermi="['system:answers:view']"
class="info-btn chat-btn"
>回复</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
style="color: #f56c6c"
v-hasPermi="['system:questions:remove']"
class="info-btn delete-btn"
>删除</el-button>
</template>
</el-table-column>
</el-table>
<!-- 分页 -->
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<div class="pagestyle">
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
</div>
</div>
</div>
<!-- 添加或修改问题对话框 -->
<el-dialog :title="title" :visible.sync="open" width="800px" append-to-body>
<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="title">
<el-input v-model="form.title" placeholder="请输入问题标题" />
@ -162,7 +170,7 @@
<el-dialog
:title="'回复管理 - ' + currentQuestionTitle"
:visible.sync="answersDialogVisible"
width="90%"
width="80%"
top="5vh"
append-to-body
class="answers-dialog"
@ -471,4 +479,112 @@ export default {
border-bottom: 1px solid #ebeef5;
padding-bottom: 15px;
}
::v-deep .pagestyle .el-input{
width: auto !important;
}
</style>
<style lang="scss" scoped>
//
.info-btn {
padding: 6px 10px;
border-radius: 4px;
margin: 0 10px;
transition: all 0.3s ease;
}
.chat-btn:hover {
background-color: rgb(225, 233, 246);
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);
}
// /
::v-deep .el-dialog {
border-radius: 12px;
overflow: hidden;
box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
animation: dialogFadeIn 0.3s ease;
}
::v-deep .el-dialog__header {
background: linear-gradient(135deg, #42b983 0%, #83df92 100%);
padding: 18px 24px;
border-bottom: none;
position: relative;
}
::v-deep .el-dialog__title {
font-size: 17px;
font-weight: 600;
color: white;
letter-spacing: 0.5px;
}
::v-deep .el-dialog__headerbtn:hover .el-dialog__close {
color: #ffd04b;
transform: rotate(90deg);
}
::v-deep .el-dialog__body {
padding: 28px 24px 20px;
background-color: #f8fafc;
max-height: 70vh;
overflow-y: auto;
}
::v-deep .el-form-item {
margin-bottom: 20px;
transition: all 0.3s;
}
::v-deep .el-form-item__label {
font-weight: 500;
color: #2d3748;
font-size: 14px;
transition: color 0.3s;
}
::v-deep .el-input,
::v-deep .el-textarea,
::v-deep .el-select {
width: 100%;
}
::v-deep .el-input__inner,
::v-deep .el-textarea__inner {
border-radius: 8px;
border: 1px solid #dcdfe6;
font-size: 14px;
transition: all 0.3s;
background-color: #fcfdfe;
}
::v-deep .el-input__inner:focus,
::v-deep .el-textarea__inner:focus {
border-color: #42B983;
box-shadow: 0 0 0 3px rgb(230, 255, 238);
background-color: white;
}
::v-deep .el-select .el-input__inner {
padding-right: 35px;
}
::v-deep .el-dialog__footer {
padding: 20px 24px;
background-color: #f8fafc;
border-top: 1px solid #eef2f7;
border-radius: 0 0 12px 12px;
}
</style>

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

@ -111,32 +111,60 @@
<image-preview :src="scope.row.imageUrl" :width="50" :height="50" />
</template>
</el-table-column>
<el-table-column label="药品名称" align="center" prop="medicineName" :show-overflow-tooltip="true" />
<el-table-column label="药品类型" align="center" prop="medicineType">
<el-table-column label="药品名称" align="center" prop="medicineName" width="150" :show-overflow-tooltip="true"/>
<!-- <el-table-column label="药品类型" align="center" prop="medicineType">-->
<!-- <template slot-scope="scope">-->
<!-- <dict-tag :options="dict.type.medicine_type" :value="scope.row.medicineType" :class="getTypeTagType(scope.row.medicineType)"/>-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column label="药品类型" align="center" prop="medicineType" width="100">
<template slot-scope="scope">
<dict-tag :options="dict.type.medicine_type" :value="scope.row.medicineType"/>
<el-tag
:type="getTypeTagType(scope.row.medicineType)"
size="small"
>
{{ scope.row.medicineType }}
</el-tag>
</template>
</el-table-column>
<el-table-column label="规格" align="center" prop="specification" :show-overflow-tooltip="true" />
<el-table-column label="当前价格" align="center" prop="price">
<el-table-column label="规格" align="center" prop="specification" width="150"/>
<el-table-column label="价格" align="center" prop="price" width="120" sortable>
<template slot-scope="scope">
<span>¥{{ scope.row.price }}</span>
</template>
</el-table-column>
<el-table-column label="原价" align="center" prop="originalPrice">
<template slot-scope="scope">
<span v-if="scope.row.originalPrice">¥{{ scope.row.originalPrice }}</span>
<span v-else>-</span>
<div class="price-cell">
<div class="price-text" >¥{{ scope.row.price }}</div>
<div class="cost-price">原价: ¥{{ scope.row.originalPrice }}</div>
</div>
</template>
</el-table-column>
<!-- <el-table-column label="当前价格" align="center" prop="price">-->
<!-- <template slot-scope="scope">-->
<!-- <span>¥{{ scope.row.price }}</span>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column label="原价" align="center" prop="originalPrice">-->
<!-- <template slot-scope="scope">-->
<!-- <span v-if="scope.row.originalPrice">¥{{ scope.row.originalPrice }}</span>-->
<!-- <span v-else>-</span>-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column label="已售数量" align="center" prop="soldQuantity" />
<el-table-column label="销售类型" align="center" prop="salesType">
<!-- <el-table-column label="销售类型" align="center" prop="salesType">-->
<!-- <template slot-scope="scope">-->
<!-- <dict-tag :options="dict.type.sales_type" :value="scope.row.salesType"/>-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column label="销售类型" align="center" prop="salesType" width="100">
<template slot-scope="scope">
<dict-tag :options="dict.type.sales_type" :value="scope.row.salesType"/>
<el-tag
:type="getSalesTagType(scope.row.salesType)"
size="small"
>
{{ scope.row.salesType }}
</el-tag>
</template>
</el-table-column>
<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="indications" width="150" :show-overflow-tooltip="true"/>
<el-table-column label="生产厂家" align="center" prop="manufacturer" width="150" :show-overflow-tooltip="true"/>
<el-table-column label="专家推荐" align="center" width="100">
<template slot-scope="scope">
@ -167,7 +195,7 @@
@click="handleView(scope.row)"
v-hasPermi="['system:recommendation:query']"
class="info-btn view-btn"
>查看</el-button>
>详情</el-button>
<el-button
size="mini"
type="text"
@ -190,17 +218,25 @@
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<div class="pagestyle">
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
</div>
<!-- 详情弹窗 -->
<el-dialog title="药品详情" :visible.sync="detailViews" width="600px" append-to-body>
<el-descriptions class="product-detail-desc" :column="2" border v-loading="detailLoading">
<el-dialog title="药品详情" :visible.sync="detailViews" width="80%" append-to-body>
<el-descriptions :column="2" border v-loading="detailLoading">
<el-descriptions-item label="药品图片">
<image-preview :src="currentDetail.images" :width="50" :height="50" />
</el-descriptions-item>
<el-descriptions-item label="轮播图片">
<image-preview :src="currentDetail.imageUrl" :width="50" :height="50" />
</el-descriptions-item>
<el-descriptions-item label="药品名称">
{{ currentDetail.medicineName || '--' }}
</el-descriptions-item>
@ -241,7 +277,7 @@
</el-dialog>
<!-- 添加或修改药品推荐对话框 -->
<el-dialog :title="title" :visible.sync="open" width="900px" append-to-body>
<el-dialog :title="title" :visible.sync="open" width="80%" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
<el-tabs v-model="activeTab">
<el-tab-pane label="基本信息" name="basic">
@ -959,7 +995,6 @@ export default {
},
//
handleView(row) {
this.detailViews = true;
this.detailLoading = true;
@ -976,6 +1011,27 @@ export default {
});
},
/** 获取药品类型标签类型 */
getTypeTagType(type) {
const map = {
"处方药": 'danger',
"非处方药": 'warning',
"中成药": 'success',
"保健品": 'primary'
}
return map[type] || ''
},
/** 获取销售类型标签类型 */
getSalesTagType(type) {
const map = {
"热销": 'danger',
"新品": 'warning',
"推荐": 'success',
"普通": 'primary'
}
return map[type] || ''
},
/** 新增按钮操作 */
handleAdd() {
@ -1076,6 +1132,26 @@ export default {
</script>
<style scoped>
::v-deep .el-descriptions-item__cell{
width: 90px;
}
::v-deep .pagestyle .el-input{
width: auto !important;
}
::v-deep .el-descriptions-row th{
text-align: center !important;color: #7b7c7f;
background: #faf7f7;
}
::v-deep .el-descriptions .is-bordered .el-descriptions-item__cell {
border: 1px solid #bcbbbb;
padding: 12px 10px;
}
</style>
<style lang="scss" scoped>
/* 图片上传样式 */
.upload-demo {
width: 100%;
@ -1090,6 +1166,20 @@ export default {
height: 100px;
}
//
.price-cell {
.price-text {
font-weight: bold;
color: #f56c6c;
}
.cost-price {
font-size: 12px;
color: #999;
margin-top: 2px;
}
}
/* 操作按钮 */
.info-btn {
padding: 6px 10px;
@ -1112,4 +1202,83 @@ export default {
background-color: rgba(245, 108, 108, 0.1);
transform: translateY(-1px);
}
// /
::v-deep .el-dialog {
border-radius: 12px;
overflow: hidden;
box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
animation: dialogFadeIn 0.3s ease;
}
::v-deep .el-dialog__header {
background: linear-gradient(135deg, #42b983 0%, #83df92 100%);
padding: 18px 24px;
border-bottom: none;
position: relative;
}
::v-deep .el-dialog__title {
font-size: 17px;
font-weight: 600;
color: white;
letter-spacing: 0.5px;
}
::v-deep .el-dialog__headerbtn:hover .el-dialog__close {
color: #ffd04b;
transform: rotate(90deg);
}
::v-deep .el-dialog__body {
padding: 28px 24px 20px;
background-color: #f8fafc;
max-height: 70vh;
overflow-y: auto;
}
::v-deep .el-form-item {
margin-bottom: 20px;
transition: all 0.3s;
}
::v-deep .el-form-item__label {
font-weight: 500;
color: #2d3748;
font-size: 14px;
transition: color 0.3s;
}
::v-deep .el-input,
::v-deep .el-textarea,
::v-deep .el-select {
width: 100%;
}
::v-deep .el-input__inner,
::v-deep .el-textarea__inner {
border-radius: 8px;
border: 1px solid #dcdfe6;
font-size: 14px;
transition: all 0.3s;
background-color: #fcfdfe;
}
::v-deep .el-input__inner:focus,
::v-deep .el-textarea__inner:focus {
border-color: #42B983;
box-shadow: 0 0 0 3px rgb(230, 255, 238);
background-color: white;
}
::v-deep .el-select .el-input__inner {
padding-right: 35px;
}
::v-deep .el-dialog__footer {
padding: 20px 24px;
background-color: #f8fafc;
border-top: 1px solid #eef2f7;
border-radius: 0 0 12px 12px;
}
</style>

140
chenhai-ui/src/views/vet/article/index.vue

@ -219,13 +219,22 @@
</div>
<!-- 分页 -->
<pagination
v-show="total>0"
:total="total"
:page.sync="forumQueryParams.pageNum"
:limit.sync="forumQueryParams.pageSize"
@pagination="getList"
/>
<!-- <pagination-->
<!-- v-show="total>0"-->
<!-- :total="total"-->
<!-- :page.sync="forumQueryParams.pageNum"-->
<!-- :limit.sync="forumQueryParams.pageSize"-->
<!-- @pagination="getList"-->
<!-- />-->
<div class="pagestyle">
<pagination
v-show="total>0"
:total="total"
:page.sync="forumQueryParams.pageNum"
:limit.sync="forumQueryParams.pageSize"
@pagination="getList"
/>
</div>
</div>
</div>
@ -416,13 +425,22 @@
</div>
<!-- 分页 -->
<pagination
v-show="total>0"
:total="total"
:page.sync="myArticleQueryParams.pageNum"
:limit.sync="myArticleQueryParams.pageSize"
@pagination="getList"
/>
<!-- <pagination-->
<!-- v-show="total>0"-->
<!-- :total="total"-->
<!-- :page.sync="myArticleQueryParams.pageNum"-->
<!-- :limit.sync="myArticleQueryParams.pageSize"-->
<!-- @pagination="getList"-->
<!-- />-->
<div class="pagestyle">
<pagination
v-show="total>0"
:total="total"
:page.sync="myArticleQueryParams.pageNum"
:limit.sync="myArticleQueryParams.pageSize"
@pagination="getList"
/>
</div>
</div>
</div>
</div>
@ -433,7 +451,7 @@
<el-dialog
:title="title"
:visible.sync="open"
width="800px"
width="80%"
append-to-body
class="article-dialog"
:close-on-click-modal="false"
@ -513,7 +531,7 @@
<el-dialog
:title="detailData && detailData.article && detailData.article.title || '文章详情'"
:visible.sync="detailOpen"
width="900px"
width="80%"
append-to-body
class="detail-dialog"
@closed="handleDetailClosed"
@ -1489,10 +1507,6 @@ export default {
}
/* 详情弹窗 */
.detail-dialog {
max-height: 80vh;
}
.detail-dialog >>> .el-dialog__body {
max-height: calc(80vh - 100px);
overflow-y: auto;
@ -1656,4 +1670,90 @@ export default {
flex-wrap: wrap;
}
}
::v-deep .pagestyle .el-input{
width: auto !important;
}
</style>
<style lang="scss" scoped>
// /
::v-deep .el-dialog {
border-radius: 12px;
overflow: hidden;
box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
animation: dialogFadeIn 0.3s ease;
}
::v-deep .el-dialog__header {
background: linear-gradient(135deg, #42b983 0%, #83df92 100%);
padding: 18px 24px;
border-bottom: none;
position: relative;
}
::v-deep .el-dialog__title {
font-size: 17px;
font-weight: 600;
color: white;
letter-spacing: 0.5px;
}
::v-deep .el-dialog__headerbtn:hover .el-dialog__close {
color: #ffd04b;
transform: rotate(90deg);
}
::v-deep .el-dialog__body {
padding: 28px 24px 20px;
background-color: #f8fafc;
max-height: 70vh;
overflow-y: auto;
}
::v-deep .el-form-item {
margin-bottom: 20px;
transition: all 0.3s;
}
::v-deep .el-form-item__label {
font-weight: 500;
color: #2d3748;
font-size: 14px;
transition: color 0.3s;
}
::v-deep .el-input,
::v-deep .el-textarea,
::v-deep .el-select {
width: 100%;
}
::v-deep .el-input__inner,
::v-deep .el-textarea__inner {
border-radius: 8px;
border: 1px solid #dcdfe6;
font-size: 14px;
transition: all 0.3s;
background-color: #fcfdfe;
}
::v-deep .el-input__inner:focus,
::v-deep .el-textarea__inner:focus {
border-color: #42B983;
box-shadow: 0 0 0 3px rgb(230, 255, 238);
background-color: white;
}
::v-deep .el-select .el-input__inner {
padding-right: 35px;
}
::v-deep .el-dialog__footer {
padding: 20px 24px;
background-color: #f8fafc;
border-top: 1px solid #eef2f7;
border-radius: 0 0 12px 12px;
}
</style>

155
chenhai-ui/src/views/vet/comments/index.vue

@ -60,51 +60,64 @@
<image-preview :src="scope.row.avatar" :width="50" :height="50" />
</template>
</el-table-column>
<el-table-column label="回复者" align="center" prop="replyName" />
<el-table-column label="职称" align="center" prop="title" />
<el-table-column label="从属医院" align="center" prop="hospital" />
<el-table-column label="从业经验" align="center" prop="experience" />
<el-table-column label="回复内容" align="center" prop="content" />
<el-table-column label="回复者" align="center" prop="replyName" width="150"/>
<el-table-column label="职称" align="center" prop="title" width="150"/>
<el-table-column label="从属医院" align="center" prop="hospital" width="150" :show-overflow-tooltip="true"/>
<el-table-column label="从业经验" align="center" prop="experience"/>
<el-table-column label="回复内容" align="center" prop="content" width="150" :show-overflow-tooltip="true"/>
<el-table-column label="回复图片" align="center" prop="images" width="100">
<template slot-scope="scope">
<image-preview :src="scope.row.images" :width="50" :height="50" />
</template>
</el-table-column>
<!-- <el-table-column label="回复图片" align="center" prop="images" width="100">-->
<!-- <template slot-scope="scope">-->
<!-- <div v-for="(item,index) in JSON.parse(scope.row.images)">-->
<!-- <image-preview :src="item" :width="50" :height="50" />-->
<!-- </div>-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column label="回复时间" align="center" prop="updatedAt" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.createdAt, '{y}-{m}-{d}') }}</span>
</template>
</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="300">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
style="color: #42B983"
v-hasPermi="['vet:comments:edit']"
class="info-btn alter-btn"
>修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
style="color: #f56c6c"
v-hasPermi="['vet:comments:remove']"
class="info-btn delete-btn"
>删除</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<div class="pagestyle">
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
</div>
<!-- 添加或修改兽医回复对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<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="content">
<el-input v-model="form.content" placeholder="请输入回复内容" />
@ -153,6 +166,7 @@ export default {
title: "",
//
open: false,
// imgUrl:[],
//
queryParams: {
pageNum: 1,
@ -239,6 +253,9 @@ export default {
this.reset()
const id = row.id || this.ids
getComments(id).then(response => {
// console.log(1111,response)
// const imgUrl = JSON.parse(response.data.images)
// console.log(222,img)
this.form = response.data
this.open = true
this.title = "修改兽医回复"
@ -308,3 +325,113 @@ export default {
}
}
</script>
<style scoped>
::v-deep .pagestyle .el-input{
width: auto !important;
}
::v-deep .pagestyle .pagination-container{
background-color: #f8fafc;
}
</style>
<style scoped lang="scss">
//
.info-btn {
padding: 6px 10px;
border-radius: 4px;
margin: 0 10px;
transition: all 0.3s ease;
}
.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);
}
// /
::v-deep .el-dialog {
border-radius: 12px;
overflow: hidden;
box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
animation: dialogFadeIn 0.3s ease;
}
::v-deep .el-dialog__header {
background: linear-gradient(135deg, #42b983 0%, #83df92 100%);
padding: 18px 24px;
border-bottom: none;
position: relative;
}
::v-deep .el-dialog__title {
font-size: 17px;
font-weight: 600;
color: white;
letter-spacing: 0.5px;
}
::v-deep .el-dialog__headerbtn:hover .el-dialog__close {
color: #ffd04b;
transform: rotate(90deg);
}
::v-deep .el-dialog__body {
padding: 28px 24px 20px;
background-color: #f8fafc;
max-height: 70vh;
overflow-y: auto;
}
::v-deep .el-form-item {
margin-bottom: 20px;
transition: all 0.3s;
}
::v-deep .el-form-item__label {
font-weight: 500;
color: #2d3748;
font-size: 14px;
transition: color 0.3s;
}
::v-deep .el-input,
::v-deep .el-textarea,
::v-deep .el-select {
width: 100%;
}
::v-deep .el-input__inner,
::v-deep .el-textarea__inner {
border-radius: 8px;
border: 1px solid #dcdfe6;
font-size: 14px;
transition: all 0.3s;
background-color: #fcfdfe;
}
::v-deep .el-input__inner:focus,
::v-deep .el-textarea__inner:focus {
border-color: #42B983;
box-shadow: 0 0 0 3px rgb(230, 255, 238);
background-color: white;
}
::v-deep .el-select .el-input__inner {
padding-right: 35px;
}
::v-deep .el-dialog__footer {
padding: 20px 24px;
background-color: #f8fafc;
border-top: 1px solid #eef2f7;
border-radius: 0 0 12px 12px;
}
</style>

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

@ -1,6 +1,33 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="真实姓名" prop="realName">
<el-input
v-model="queryParams.realName"
placeholder="请输入真实姓名"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="在线状态" prop="isOnline">
<el-select
v-model="queryParams.isOnline"
placeholder="请选择在线状态"
clearable
@keyup.enter.native="handleQuery"
>
<el-option
v-for="dict in dict.type.is_online"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
@ -56,53 +83,69 @@
<image-preview :src="scope.row.avatar" :width="50" :height="50" />
</template>
</el-table-column>
<el-table-column label="真实姓名" align="center" prop="realName" />
<el-table-column label="联系电话" align="center" prop="iphone" />
<el-table-column label="电子邮箱" align="center" prop="email" />
<el-table-column label="职称" align="center" prop="title" />
<el-table-column label="从业经验" align="center" prop="workExperience" />
<el-table-column label="专家类型" align="center" prop="expert" />
<el-table-column label="擅长领域" align="center" prop="expertiseArea" />
<el-table-column label="工作单位" align="center" prop="address" />
<el-table-column label="简介" align="center" prop="introduction" />
<el-table-column label="真实姓名" align="center" prop="realName" width="150" :show-overflow-tooltip="true"/>
<el-table-column label="联系电话" align="center" prop="iphone" width="200"/>
<!-- <el-table-column label="电子邮箱" align="center" prop="email" />-->
<el-table-column label="职称" align="center" prop="title" width="150"/>
<!-- <el-table-column label="从业经验" align="center" prop="workExperience" />-->
<el-table-column label="专家类型" align="center" prop="expert" width="150"/>
<el-table-column label="擅长领域" align="center" prop="expertiseArea" width="150" :show-overflow-tooltip="true"/>
<!-- <el-table-column label="工作单位" align="center" prop="address" />-->
<!-- <el-table-column label="简介" align="center" prop="introduction" />-->
<el-table-column label="在线状态" align="center" prop="isOnline" />
<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="300">
<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
size="mini"
type="text"
icon="el-icon-chat-dot-round"
@click="handleChat(scope.row)"
style="color: #07368a"
v-hasPermi="['system:chat:view']"
class="info-btn chat-btn"
>聊天咨询</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
style="color: #42B983"
v-hasPermi="['vet:experts:edit']"
class="info-btn alter-btn"
>修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
style="color: #f56c6c"
v-hasPermi="['vet:experts:remove']"
class="info-btn delete-btn"
>删除</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<div class="pagestyle">
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
</div>
<!-- 添加或修改专家信息对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<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="realName">
<el-input v-model="form.realName" placeholder="请输入真实姓名" />
@ -110,9 +153,15 @@
<el-form-item label="擅长领域" prop="expertiseArea">
<el-input v-model="form.expertiseArea" placeholder="请输入擅长领域" />
</el-form-item>
<el-form-item label="联系方式" prop="contactInfo">
<el-input v-model="form.contactInfo" type="textarea" placeholder="请输入内容" />
<el-form-item label="联系电话" prop="iphone">
<el-input v-model="form.iphone" placeholder="请输入内容" />
</el-form-item>
<el-form-item label="电子邮箱" prop="email">
<el-input v-model="form.email" placeholder="请输入内容" />
</el-form-item>
<!-- <el-form-item label="联系方式" prop="contactInfo">-->
<!-- <el-input v-model="form.contactInfo" type="textarea" placeholder="请输入内容" />-->
<!-- </el-form-item>-->
<el-form-item label="在线状态" prop="isOnline">
<el-select v-model="form.isOnline" placeholder="请选择在线状态" clearable>
<el-option v-for="dict in dict.type.is_online" :key="dict.value" :label="dict.label" :value="dict.value" />
@ -124,6 +173,42 @@
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
<!-- 详情弹窗 -->
<el-dialog title="专家详情" :visible.sync="detailViews" width="80%" append-to-body>
<el-descriptions :column="2" border v-loading="detailLoading">
<el-descriptions-item label="真实姓名" :span="2">
{{ currentDetail.realName || '--' }}
</el-descriptions-item>
<el-descriptions-item label="联系电话">
{{ currentDetail.iphone || '--' }}
</el-descriptions-item>
<el-descriptions-item label="电子邮箱">
{{ currentDetail.email || '--' }}
</el-descriptions-item>
<el-descriptions-item label="职称">
{{ currentDetail.title || '--' }}
</el-descriptions-item>
<el-descriptions-item label="从业经验">
{{ currentDetail.workExperience || '--' }}
</el-descriptions-item>
<el-descriptions-item label="专家类型">
{{ currentDetail.expert || '--' }}
</el-descriptions-item>
<el-descriptions-item label="擅长领域">
{{ currentDetail.expertiseArea || '--' }}
</el-descriptions-item>
<el-descriptions-item label="工作单位" :span="2">
{{ currentDetail.address || '--' }}
</el-descriptions-item>
<el-descriptions-item label="简介" :span="2">
{{ currentDetail.introduction || '--' }}
</el-descriptions-item>
</el-descriptions>
<div slot="footer" class="dialog-footer">
<el-button @click="detailViews = false"> </el-button>
</div>
</el-dialog>
</div>
</template>
@ -137,6 +222,7 @@ export default {
return {
//
loading: true,
detailLoading: false,
//
ids: [],
//
@ -153,6 +239,10 @@ export default {
title: "",
//
open: false,
detailViews: false,
//
currentDetail: {},
//
queryParams: {
pageNum: 1,
@ -170,6 +260,8 @@ export default {
userId: null,
realName: null,
expertiseArea: null,
iphone: null,
email: null,
contactInfo: null,
isOnline: null,
sortOrder: null,
@ -219,6 +311,8 @@ export default {
realName: null,
expertiseArea: null,
contactInfo: null,
iphone: null,
email: null,
isOnline: null,
sortOrder: null,
status: null
@ -257,6 +351,24 @@ export default {
this.title = "修改专家信息"
})
},
/** 详情 */
handleView(row) {
this.detailViews = true;
this.detailLoading = true;
this.currentDetail = {};
const expertId = row.expertId;
getExperts(expertId).then(response => {
if (response.code === 200) {
this.currentDetail = response.data;
} else {
this.$modal.msgError("获取详情失败");
}
this.detailLoading = false;
});
},
/** 聊天咨询按钮操作 */
handleChat(row) {
//
@ -330,7 +442,27 @@ export default {
</script>
<style scoped>
/* 添加一些样式优化 */
::v-deep .el-descriptions-item__cell{
width: 90px;
}
::v-deep .el-descriptions-row th{
text-align: center !important;color: #7b7c7f;
background: #faf7f7;
}
::v-deep .el-descriptions .is-bordered .el-descriptions-item__cell {
border: 1px solid #bcbbbb;
padding: 12px 10px;
}
::v-deep .pagestyle .el-input{
width: auto !important;
}
</style>
<style scoped lang="scss">
//
.app-container {
padding: 20px;
}
@ -346,4 +478,111 @@ export default {
.el-button--mini {
margin-right: 5px;
}
//
.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);
}
.chat-btn:hover {
background-color: rgb(225, 233, 246);
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);
}
// /
::v-deep .el-dialog {
border-radius: 12px;
overflow: hidden;
box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
animation: dialogFadeIn 0.3s ease;
}
::v-deep .el-dialog__header {
background: linear-gradient(135deg, #42b983 0%, #83df92 100%);
padding: 18px 24px;
border-bottom: none;
position: relative;
}
::v-deep .el-dialog__title {
font-size: 17px;
font-weight: 600;
color: white;
letter-spacing: 0.5px;
}
::v-deep .el-dialog__headerbtn:hover .el-dialog__close {
color: #ffd04b;
transform: rotate(90deg);
}
::v-deep .el-dialog__body {
padding: 28px 24px 20px;
background-color: #f8fafc;
max-height: 70vh;
overflow-y: auto;
}
::v-deep .el-form-item {
margin-bottom: 20px;
transition: all 0.3s;
}
::v-deep .el-form-item__label {
font-weight: 500;
color: #2d3748;
font-size: 14px;
transition: color 0.3s;
}
::v-deep .el-input,
::v-deep .el-textarea,
::v-deep .el-select {
width: 100%;
}
::v-deep .el-input__inner,
::v-deep .el-textarea__inner {
border-radius: 8px;
border: 1px solid #dcdfe6;
font-size: 14px;
transition: all 0.3s;
background-color: #fcfdfe;
}
::v-deep .el-input__inner:focus,
::v-deep .el-textarea__inner:focus {
border-color: #42B983;
box-shadow: 0 0 0 3px rgb(230, 255, 238);
background-color: white;
}
::v-deep .el-select .el-input__inner {
padding-right: 35px;
}
::v-deep .el-dialog__footer {
padding: 20px 24px;
background-color: #f8fafc;
border-top: 1px solid #eef2f7;
border-radius: 0 0 12px 12px;
}
</style>

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

@ -10,14 +10,14 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="性别" prop="gender">
<el-input
v-model="queryParams.gender"
placeholder="请输入性别"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<!-- <el-form-item label="性别" prop="gender">-->
<!-- <el-input-->
<!-- v-model="queryParams.gender"-->
<!-- placeholder="请输入性别"-->
<!-- clearable-->
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!-- </el-form-item>-->
<el-form-item label="身份证号" prop="idCard">
<el-input
v-model="queryParams.idCard"
@ -26,14 +26,14 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="工作经验" prop="workExperience">
<el-input
v-model="queryParams.workExperience"
placeholder="请输入工作经验"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<!-- <el-form-item label="工作经验" prop="workExperience">-->
<!-- <el-input-->
<!-- v-model="queryParams.workExperience"-->
<!-- placeholder="请输入工作经验"-->
<!-- clearable-->
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!-- </el-form-item>-->
<el-form-item label="所属医院" prop="hospital">
<el-input
v-model="queryParams.hospital"
@ -87,25 +87,25 @@
<!-- 表格部分 -->
<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="nickName"/>
<el-table-column label="真实姓名" align="center" prop="realName" />
<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" />
<el-table-column label="出生日期" align="center" prop="birthday" width="100">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.birthday, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<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="idCard" width="200"/>
<el-table-column label="擅长领域" align="center" prop="specialty" width="150" :show-overflow-tooltip="true"/>
<el-table-column label="工作经验" align="center" prop="workExperience"/>
<el-table-column label="职称" align="center" prop="title"/>
<el-table-column label="联系电话" align="center" prop="phone"/>
<el-table-column label="电子邮箱" align="center" prop="email"/>
<el-table-column label="专家类型" align="center" prop="expertType"/>
<el-table-column label="所属医院" align="center" prop="hospital" />
<el-table-column label="联系地址" align="center" prop="address" />
<el-table-column label="个人简介" align="center" prop="introduction" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" fixed="right" width="200">
<el-table-column label="职称" align="center" prop="title" width="150"/>
<el-table-column label="联系电话" align="center" prop="phone" width="200"/>
<el-table-column label="电子邮箱" align="center" prop="email" width="200"/>
<el-table-column label="专家类型" align="center" prop="expertType" width="150"/>
<el-table-column label="所属医院" align="center" prop="hospital" width="150" :show-overflow-tooltip="true"/>
<el-table-column label="联系地址" align="center" prop="address" width="150" :show-overflow-tooltip="true"/>
<el-table-column label="个人简介" align="center" prop="introduction" width="150" :show-overflow-tooltip="true"/>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" fixed="right" width="300">
<template slot-scope="scope">
<el-button
size="mini"
@ -114,7 +114,7 @@
class = "info-btn view-btn"
@click="handleView(scope.row)"
v-hasPermi="['vet:info:view']"
>查看</el-button>
>详情</el-button>
<el-button
size="mini"
type="text"
@ -137,16 +137,18 @@
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<div class="pagestyle">
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
</div>
<!-- 添加或修改兽医个人信息对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<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="realName">
<el-input v-model="form.realName" placeholder="请输入真实姓名" />
@ -183,7 +185,7 @@
<el-input v-model="form.idCard" placeholder="请输入身份证号" />
</el-form-item>
<el-form-item label="擅长领域" prop="specialty">
<el-input v-model="form.specialty" type="textarea" placeholder="请输入内容" />
<el-input v-model="form.specialty" placeholder="请输入内容" />
</el-form-item>
<el-form-item label="工作经验" prop="workExperience">
<el-input v-model="form.workExperience" placeholder="请输入工作经验" />
@ -205,7 +207,7 @@
</el-dialog>
<!-- 详情对话框 -->
<el-dialog :title="detailTitle" :visible.sync="detailVisible" width="800px" append-to-body>
<el-dialog :title="detailTitle" :visible.sync="detailVisible" width="80%" append-to-body>
<div v-if="detailData" style="padding: 20px;">
<!-- 显示兽医基本信息 -->
<el-descriptions title="兽医基本信息" :column="2" border>
@ -228,7 +230,7 @@
<!-- 显示资质证书信息 -->
<div style="margin-top: 30px;">
<h3 style="margin-bottom: 15px; color: #333;">资质证书信息</h3>
<h3 style="margin-bottom: 15px;color: #303133;font-weight: bold;">资质证书信息</h3>
<el-alert
v-if="!certificateList || certificateList.length === 0"
title="暂无资质证书"
@ -540,8 +542,28 @@ export default {
}
</script>
<style scoped>
::v-deep .el-descriptions-item__cell{
width: 90px;
}
::v-deep .pagestyle .el-input{
width: auto !important;
}
::v-deep .el-descriptions-row th{
text-align: center !important;color: #7b7c7f;
background: #faf7f7;
}
::v-deep .el-descriptions .is-bordered .el-descriptions-item__cell {
border: 1px solid #bcbbbb;
padding: 12px 10px;
}
</style>
<style scoped lang="scss">
/* 操作按钮样式 */
//
.info-btn {
padding: 6px 10px;
border-radius: 4px;
@ -563,4 +585,83 @@ export default {
background-color: rgba(245, 108, 108, 0.1);
transform: translateY(-1px);
}
// /
::v-deep .el-dialog {
border-radius: 12px;
overflow: hidden;
box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
animation: dialogFadeIn 0.3s ease;
}
::v-deep .el-dialog__header {
background: linear-gradient(135deg, #42b983 0%, #83df92 100%);
padding: 18px 24px;
border-bottom: none;
position: relative;
}
::v-deep .el-dialog__title {
font-size: 17px;
font-weight: 600;
color: white;
letter-spacing: 0.5px;
}
::v-deep .el-dialog__headerbtn:hover .el-dialog__close {
color: #ffd04b;
transform: rotate(90deg);
}
::v-deep .el-dialog__body {
padding: 28px 24px 20px;
background-color: #f8fafc;
max-height: 70vh;
overflow-y: auto;
}
::v-deep .el-form-item {
margin-bottom: 20px;
transition: all 0.3s;
}
::v-deep .el-form-item__label {
font-weight: 500;
color: #2d3748;
font-size: 14px;
transition: color 0.3s;
}
::v-deep .el-input,
::v-deep .el-textarea,
::v-deep .el-select {
width: 100%;
}
::v-deep .el-input__inner,
::v-deep .el-textarea__inner {
border-radius: 8px;
border: 1px solid #dcdfe6;
font-size: 14px;
transition: all 0.3s;
background-color: #fcfdfe;
}
::v-deep .el-input__inner:focus,
::v-deep .el-textarea__inner:focus {
border-color: #42B983;
box-shadow: 0 0 0 3px rgb(230, 255, 238);
background-color: white;
}
::v-deep .el-select .el-input__inner {
padding-right: 35px;
}
::v-deep .el-dialog__footer {
padding: 20px 24px;
background-color: #f8fafc;
border-top: 1px solid #eef2f7;
border-radius: 0 0 12px 12px;
}
</style>

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

@ -38,16 +38,29 @@
</el-select>
</el-form-item>
<el-form-item label="审核状态" prop="auditStatus">
<!-- <el-select-->
<!-- v-model="queryParams.auditStatus"-->
<!-- placeholder="请选择审核状态"-->
<!-- clearable-->
<!-- >-->
<!-- <el-option-->
<!-- v-for="dict in auditStatusOptions"-->
<!-- :key="dict.dictValue"-->
<!-- :label="dict.dictLabel"-->
<!-- :value="dict.dictValue"-->
<!-- />-->
<!-- </el-select>-->
<el-select
v-model="queryParams.auditStatus"
placeholder="请选择审核状态"
clearable
>
<el-option
v-for="dict in auditStatusOptions"
:key="dict.dictValue"
:label="dict.dictLabel"
:value="dict.dictValue"
v-for="dict in dict.type.audit_status.filter(item => item.value < 4)"
:key="dict.value"
:label="dict.label"
:value="dict.value"
@keyup.enter.native="handleQuery"
/>
</el-select>
</el-form-item>
@ -184,7 +197,7 @@
<span v-else>-</span>
</template>
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" fixed="right" width="280">
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" fixed="right" width="300">
<template slot-scope="scope">
<el-button
size="mini"
@ -192,7 +205,7 @@
icon="el-icon-view"
@click="handleView(scope.row)"
class="info-btn view-btn"
>查看</el-button>
>详情</el-button>
<el-button
size="mini"
type="text"
@ -207,32 +220,38 @@
size="mini"
type="text"
icon="el-icon-s-promotion"
style="color: #dab708"
@click="handleSubmitAudit(scope.row.id)"
v-hasPermi="['vet:knowledge:submit']"
v-if="scope.row.articleStatus === '0' && scope.row.auditStatus === '0'"
class="info-btn submit-btn"
>提交审核</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-finished"
@click="handleAuditDialog(scope.row.id)"
style="color: #072eed"
v-hasPermi="['vet:knowledge:audit']"
v-if="scope.row.auditStatus === '1' && userRole !== 'vet'"
v-if="(scope.row.auditStatus === '1' || scope.row.auditStatus === '0') && userRole !== 'vet'"
class="info-btn audit-btn"
>审核</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-check"
@click="handlePublish(scope.row.id)"
style="color: #05ba9d"
v-hasPermi="['vet:knowledge:publish']"
v-if="scope.row.auditStatus === '2' && scope.row.articleStatus === '0'"
class="info-btn release-btn"
>发布</el-button>
<!-- 下架按钮已发布状态显示 -->
<el-button
size="mini"
type="text"
icon="el-icon-bottom"
style="color: #E6A23C"
style="color: #636361"
@click="handleOffline(scope.row)"
v-hasPermi="['vet:knowledge:publish']"
v-if="scope.row.articleStatus === '1'"
@ -243,10 +262,11 @@
size="mini"
type="text"
icon="el-icon-top"
style="color: #67C23A"
style="color: #f46a0c"
@click="handleOnline(scope.row)"
v-hasPermi="['vet:knowledge:publish']"
v-if="scope.row.articleStatus === '2'"
class="info-btn publish-btn"
>上架</el-button>
<el-button
size="mini"
@ -262,16 +282,18 @@
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<div class="pagestyle">
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
</div>
<!-- 新增/修改文章对话框 -->
<el-dialog :title="title" :visible.sync="open" width="800px" append-to-body>
<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="expertId">
<el-select
@ -334,7 +356,7 @@
</el-dialog>
<!-- 审核对话框 -->
<el-dialog title="文章审核" :visible.sync="auditOpen" width="500px" append-to-body>
<el-dialog title="文章审核" :visible.sync="auditOpen" width="80%" append-to-body>
<el-form ref="auditForm" :model="auditForm" label-width="80px">
<el-form-item label="审核结果" prop="auditStatus" required>
<el-radio-group v-model="auditForm.auditStatus">
@ -360,7 +382,7 @@
</el-dialog>
<!-- 查看详情对话框 -->
<el-dialog title="文章详情" :visible.sync="viewOpen" width="900px" append-to-body>
<el-dialog title="文章详情" :visible.sync="viewOpen" width="80%" append-to-body>
<el-descriptions :column="2" border>
<el-descriptions-item label="文章标题">{{ viewData.title }}</el-descriptions-item>
<el-descriptions-item label="文章分类">
@ -411,6 +433,7 @@ import {listExperts} from "@/api/vet/experts"; // 导入字典接口
export default {
name: "Knowledge",
dicts: ['audit_status'],
data() {
return {
//
@ -429,6 +452,8 @@ export default {
knowledgeList: [],
//
title: "",
//
userRole: '',
//
open: false,
//
@ -583,7 +608,7 @@ export default {
'1': 'warning', // -
'2': 'success', // - 绿
'3': 'danger', // -
'4': 'danger' // -
// '4': 'danger' // -
}
return map[status] || 'info'
},
@ -595,7 +620,7 @@ export default {
'1': '审核中',
'2': '审核通过',
'3': '审核驳回',
'4': '敏感内容驳回'
// '4': ''
}
return map[status] || status
},
@ -880,6 +905,26 @@ export default {
</script>
<style scoped>
::v-deep .el-descriptions-item__cell{
width: 90px;
}
::v-deep .pagestyle .el-input{
width: auto !important;
}
::v-deep .el-descriptions-row th{
text-align: center !important;color: #7b7c7f;
background: #faf7f7;
}
::v-deep .el-descriptions .is-bordered .el-descriptions-item__cell {
border: 1px solid #bcbbbb;
padding: 12px 10px;
}
</style>
<style scoped lang="scss">
.content-view {
padding: 10px;
border: 1px solid #ebeef5;
@ -889,7 +934,7 @@ export default {
overflow-y: auto;
}
/* 操作按钮 */
//
.info-btn {
padding: 6px 10px;
border-radius: 4px;
@ -902,11 +947,6 @@ export default {
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);
@ -916,4 +956,108 @@ export default {
background-color: rgba(245, 108, 108, 0.1);
transform: translateY(-1px);
}
.submit-btn:hover {
background-color: rgb(253, 250, 232);
transform: translateY(-1px);
}
.publish-btn:hover {
background-color: rgb(253, 238, 228);
transform: translateY(-1px);
}
.offline-btn:hover {
background-color: rgb(237, 237, 235);
transform: translateY(-1px);
}
.audit-btn:hover {
background-color: rgb(215, 223, 246);
transform: translateY(-1px);
}
.release-btn:hover {
background-color: rgb(216, 250, 247);
transform: translateY(-1px);
}
// /
::v-deep .el-dialog {
border-radius: 12px;
overflow: hidden;
box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
animation: dialogFadeIn 0.3s ease;
}
::v-deep .el-dialog__header {
background: linear-gradient(135deg, #42b983 0%, #83df92 100%);
padding: 18px 24px;
border-bottom: none;
position: relative;
}
::v-deep .el-dialog__title {
font-size: 17px;
font-weight: 600;
color: white;
letter-spacing: 0.5px;
}
::v-deep .el-dialog__headerbtn:hover .el-dialog__close {
color: #ffd04b;
transform: rotate(90deg);
}
::v-deep .el-dialog__body {
padding: 28px 24px 20px;
background-color: #f8fafc;
max-height: 70vh;
overflow-y: auto;
}
::v-deep .el-form-item {
margin-bottom: 20px;
transition: all 0.3s;
}
::v-deep .el-form-item__label {
font-weight: 500;
color: #2d3748;
font-size: 14px;
transition: color 0.3s;
}
::v-deep .el-input,
::v-deep .el-textarea,
::v-deep .el-select {
width: 100%;
}
::v-deep .el-input__inner,
::v-deep .el-textarea__inner {
border-radius: 8px;
border: 1px solid #dcdfe6;
font-size: 14px;
transition: all 0.3s;
background-color: #fcfdfe;
}
::v-deep .el-input__inner:focus,
::v-deep .el-textarea__inner:focus {
border-color: #42B983;
box-shadow: 0 0 0 3px rgb(230, 255, 238);
background-color: white;
}
::v-deep .el-select .el-input__inner {
padding-right: 35px;
}
::v-deep .el-dialog__footer {
padding: 20px 24px;
background-color: #f8fafc;
border-top: 1px solid #eef2f7;
border-radius: 0 0 12px 12px;
}
</style>

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

@ -25,38 +25,38 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="关联用户ID" prop="userId">
<el-input
v-model="queryParams.userId"
placeholder="请输入关联用户ID"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="创建时间" prop="createdAt">
<el-date-picker clearable
v-model="queryParams.createdAt"
type="date"
value-format="yyyy-MM-dd"
placeholder="请选择创建时间">
</el-date-picker>
</el-form-item>
<el-form-item label="更新时间" prop="updatedAt">
<el-date-picker clearable
v-model="queryParams.updatedAt"
type="date"
value-format="yyyy-MM-dd"
placeholder="请选择更新时间">
</el-date-picker>
</el-form-item>
<el-form-item label="是否启用" prop="isActive">
<el-input
v-model="queryParams.isActive"
placeholder="请输入是否启用"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<!-- <el-form-item label="关联用户ID" prop="userId">-->
<!-- <el-input-->
<!-- v-model="queryParams.userId"-->
<!-- placeholder="请输入关联用户ID"-->
<!-- clearable-->
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="创建时间" prop="createdAt">-->
<!-- <el-date-picker clearable-->
<!-- v-model="queryParams.createdAt"-->
<!-- type="date"-->
<!-- value-format="yyyy-MM-dd"-->
<!-- placeholder="请选择创建时间">-->
<!-- </el-date-picker>-->
<!-- </el-form-item>-->
<!-- <el-form-item label="更新时间" prop="updatedAt">-->
<!-- <el-date-picker clearable-->
<!-- v-model="queryParams.updatedAt"-->
<!-- type="date"-->
<!-- value-format="yyyy-MM-dd"-->
<!-- placeholder="请选择更新时间">-->
<!-- </el-date-picker>-->
<!-- </el-form-item>-->
<!-- <el-form-item label="是否启用" prop="isActive">-->
<!-- <el-input-->
<!-- v-model="queryParams.isActive"-->
<!-- placeholder="请输入是否启用"-->
<!-- clearable-->
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!-- </el-form-item>-->
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
@ -72,7 +72,7 @@
size="mini"
@click="handleAdd"
v-hasPermi="['vet:merchant:add']"
>新增</el-button>
>店铺资质</el-button>
</el-col>
<el-col :span="1.5">
<el-button
@ -111,38 +111,104 @@
<el-table v-loading="loading" :data="merchantList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="店铺ID,主键" align="center" prop="shopId" />
<el-table-column label="店铺名称" align="center" prop="shopName" />
<el-table-column label="店铺地址" align="center" prop="shopAddress" />
<el-table-column label="联系电话" align="center" prop="phone" />
<el-table-column label="关联用户ID" align="center" prop="userId" />
<el-table-column label="创建时间" align="center" prop="createdAt" width="180">
<!-- <el-table-column label="店铺ID,主键" align="center" prop="shopId" />-->
<el-table-column label="店铺logo" align="center" prop="shopLogo" width="100">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.createdAt, '{y}-{m}-{d}') }}</span>
<image-preview :src="scope.row.shopLogo" :width="50" :height="50"/>
</template>
</el-table-column>
<el-table-column label="更新时间" align="center" prop="updatedAt" width="180">
<el-table-column label="店铺名称" align="center" prop="shopName"/>
<el-table-column label="店铺地址" align="center" prop="shopAddress" width="150" :show-overflow-tooltip="true"/>
<el-table-column label="联系电话" align="center" prop="phone" width="200"/>
<el-table-column label="营业执照" align="center" prop="businessLicenseImage" width="100">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.updatedAt, '{y}-{m}-{d}') }}</span>
<image-preview :src="scope.row.businessLicenseImage" :width="50" :height="50"/>
</template>
</el-table-column>
<el-table-column label="是否启用" align="center" prop="isActive" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<el-table-column label="审核状态" prop="auditStatus" width="120" align="center">
<template slot-scope="scope">
<el-tag :type="getAuditStatusTagType(scope.row.auditStatus)" size="small">
{{ getAuditStatusText(scope.row.auditStatus) }}
</el-tag>
</template>
</el-table-column>
<!-- <el-table-column label="关联用户ID" align="center" prop="userId" />-->
<!-- <el-table-column label="创建时间" align="center" prop="createdAt" width="180">-->
<!-- <template slot-scope="scope">-->
<!-- <span>{{ parseTime(scope.row.createdAt, '{y}-{m}-{d}') }}</span>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column label="更新时间" align="center" prop="updatedAt" width="180">-->
<!-- <template slot-scope="scope">-->
<!-- <span>{{ parseTime(scope.row.updatedAt, '{y}-{m}-{d}') }}</span>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column label="是否启用" align="center" prop="isActive"/>-->
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" fixed="right" width="300">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-view"
@click="handleView(scope.row)"
class="info-btn view-btn"
>详情</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
style="color: #42B983"
v-hasPermi="['vet:merchant:edit']"
v-if="scope.row.auditStatus === '0' || scope.row.auditStatus === '3'"
class="info-btn alter-btn"
>修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
style="color: #f56c6c"
v-hasPermi="['vet:merchant:remove']"
class="info-btn delete-btn"
>删除</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-s-promotion"
style="color: #dab708"
@click="handleSubmitAudit(scope.row)"
v-hasPermi="['vet:product:submit']"
v-if="scope.row.auditStatus === '0'"
class="info-btn submit-btn"
>
提交审核
</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-close"
style="color: #5607b3"
@click="handleCancelAudit(scope.row)"
v-hasPermi="['vet:product:edit']"
v-if="scope.row.auditStatus === '1'"
class="info-btn cancel-btn"
>
取消审核
</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-s-promotion"
style="color: #c108af"
@click="handleResubmitAudit(scope.row)"
v-hasPermi="['vet:product:submit']"
v-if="scope.row.auditStatus === '3'"
class="info-btn resubmit-btn"
>
重新提交
</el-button>
</template>
</el-table-column>
</el-table>
@ -156,8 +222,11 @@
/>
<!-- 添加或修改商家信息对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<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="店铺logo" prop="shopLogo">
<image-upload :limit=1 v-model="form.shopLogo" />
</el-form-item>
<el-form-item label="店铺名称" prop="shopName">
<el-input v-model="form.shopName" placeholder="请输入店铺名称" />
</el-form-item>
@ -167,46 +236,70 @@
<el-form-item label="联系电话" prop="phone">
<el-input v-model="form.phone" placeholder="请输入联系电话" />
</el-form-item>
<el-form-item label="关联用户ID" prop="userId">
<el-input v-model="form.userId" placeholder="请输入关联用户ID" />
</el-form-item>
<el-form-item label="创建时间" prop="createdAt">
<el-date-picker clearable
v-model="form.createdAt"
type="date"
value-format="yyyy-MM-dd"
placeholder="请选择创建时间">
</el-date-picker>
</el-form-item>
<el-form-item label="更新时间" prop="updatedAt">
<el-date-picker clearable
v-model="form.updatedAt"
type="date"
value-format="yyyy-MM-dd"
placeholder="请选择更新时间">
</el-date-picker>
</el-form-item>
<el-form-item label="是否启用" prop="isActive">
<el-input v-model="form.isActive" placeholder="请输入是否启用" />
<el-form-item label="营业执照" prop="businessLicenseImage">
<image-upload :limit=1 v-model="form.businessLicenseImage"/>
</el-form-item>
<!-- <el-form-item label="关联用户ID" prop="userId">-->
<!-- <el-input v-model="form.userId" placeholder="请输入关联用户ID" />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="创建时间" prop="createdAt">-->
<!-- <el-date-picker clearable-->
<!-- v-model="form.createdAt"-->
<!-- type="date"-->
<!-- value-format="yyyy-MM-dd"-->
<!-- placeholder="请选择创建时间">-->
<!-- </el-date-picker>-->
<!-- </el-form-item>-->
<!-- <el-form-item label="更新时间" prop="updatedAt">-->
<!-- <el-date-picker clearable-->
<!-- v-model="form.updatedAt"-->
<!-- type="date"-->
<!-- value-format="yyyy-MM-dd"-->
<!-- placeholder="请选择更新时间">-->
<!-- </el-date-picker>-->
<!-- </el-form-item>-->
<!-- <el-form-item label="是否启用" prop="isActive">-->
<!-- <el-input v-model="form.isActive" placeholder="请输入是否启用" />-->
<!-- </el-form-item>-->
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
<!-- 详情弹窗 -->
<el-dialog
title="产品信息"
:visible.sync="replyOpen"
width="80%"
append-to-body
:close-on-click-modal="false"
>
<product-list
:shop-id="shopId"
v-if="replyOpen"
/>
</el-dialog>
</div>
</template>
<script>
import { listMerchant, getMerchant, delMerchant, addMerchant, updateMerchant } from "@/api/vet/merchant"
import { listMerchant, getMerchant, delMerchant, addMerchant, updateMerchant, submitAudit, resubmitAudit, cancelAudit } from "@/api/vet/merchant"
import ProductList from '@/views/vet/product/index.vue'
export default {
name: "Merchant",
components: {
ProductList
},
data() {
return {
//
loading: true,
shopId:null,
//
ids: [],
//
@ -223,6 +316,8 @@ export default {
title: "",
//
open: false,
//
replyOpen: false,
//
queryParams: {
pageNum: 1,
@ -305,6 +400,16 @@ export default {
this.single = selection.length!==1
this.multiple = !selection.length
},
//
handleView(row) {
console.log('查看的店铺信息:', row)
console.log('shopId:', row.shopId)
this.shopRow = row
this.shopId = row.shopId
this.replyOpen = true
},
/** 新增按钮操作 */
handleAdd() {
this.reset()
@ -356,7 +461,172 @@ export default {
this.download('vet/merchant/export', {
...this.queryParams
}, `merchant_${new Date().getTime()}.xlsx`)
},
/** 获取审核状态文本 */
getAuditStatusText(auditStatus) {
const map = {
"0": '待审核',
"1": '审核中',
"2": '审核通过',
"3": '审核拒绝'
}
return map[auditStatus] || auditStatus
},
/** 获取审核状态标签类型 */
getAuditStatusTagType(auditStatus) {
const map = {
"0": 'warning',
"1": 'primary',
"2": 'success',
"3": 'danger'
}
return map[auditStatus] || ''
},
//
handleSubmitAudit(row) {
submitAudit(row.shopId).then(response => {
this.$modal.msgSuccess("提交成功")
this.getList()
})
},
//
handleCancelAudit(row) {
cancelAudit(row.shopId).then(response => {
this.$modal.msgSuccess("取消成功")
this.getList()
})
},
//
handleResubmitAudit(row) {
resubmitAudit(row.shopId).then(response => {
this.$modal.msgSuccess("重新提交成功")
this.getList()
})
}
}
}
</script>
<style lang="scss" scoped>
//
.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);
}
.submit-btn:hover {
background-color: rgb(253, 250, 232);
transform: translateY(-1px);
}
.cancel-btn:hover {
background-color: rgb(244, 237, 251);
transform: translateY(-1px);
}
.resubmit-btn:hover {
background-color: rgb(248, 232, 250);
transform: translateY(-1px);
}
// /
::v-deep .el-dialog {
border-radius: 12px;
overflow: hidden;
box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
animation: dialogFadeIn 0.3s ease;
}
::v-deep .el-dialog__header {
background: linear-gradient(135deg, #42b983 0%, #83df92 100%);
padding: 18px 24px;
border-bottom: none;
position: relative;
}
::v-deep .el-dialog__title {
font-size: 17px;
font-weight: 600;
color: white;
letter-spacing: 0.5px;
}
::v-deep .el-dialog__headerbtn:hover .el-dialog__close {
color: #ffd04b;
transform: rotate(90deg);
}
::v-deep .el-dialog__body {
padding: 28px 24px 20px;
background-color: #f8fafc;
max-height: 70vh;
overflow-y: auto;
}
::v-deep .el-form-item {
margin-bottom: 20px;
transition: all 0.3s;
}
::v-deep .el-form-item__label {
font-weight: 500;
color: #2d3748;
font-size: 14px;
transition: color 0.3s;
}
::v-deep .el-input,
::v-deep .el-textarea,
::v-deep .el-select {
width: 100%;
}
::v-deep .el-input__inner,
::v-deep .el-textarea__inner {
border-radius: 8px;
border: 1px solid #dcdfe6;
font-size: 14px;
transition: all 0.3s;
background-color: #fcfdfe;
}
::v-deep .el-input__inner:focus,
::v-deep .el-textarea__inner:focus {
border-color: #42B983;
box-shadow: 0 0 0 3px rgb(230, 255, 238);
background-color: white;
}
::v-deep .el-select .el-input__inner {
padding-right: 35px;
}
::v-deep .el-dialog__footer {
padding: 20px 24px;
background-color: #f8fafc;
border-top: 1px solid #eef2f7;
border-radius: 0 0 12px 12px;
}
</style>

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

@ -111,42 +111,46 @@
<!-- 消息轮播 -->
<div class="carousel-container" v-if="unreadCarouselList.length > 0">
<el-carousel
height="100px"
direction="vertical"
autoplay
:interval="3000"
indicator-position="none"
class="vertical-carousel"
>
<el-carousel height="100px" direction="vertical" autoplay :interval="3000" indicator-position="none" class="vertical-carousel">
<el-carousel-item v-for="item in unreadCarouselList" :key="item.id">
<div
class="carousel-item"
:style="{'background-color': getCarouselBgColor(item.remindLevel)}"
>
<div class="carousel-title">📢 {{ item.title }}</div>
<div class="carousel-content">
<img class="info-icon" :src="require('@/assets/images/zhixiang.png')">
<div class="carousel-text" v-html="item.content"></div>
<div class="carousel-item" :style="{'background-color': getCarouselBgColor(item.remindLevel)}">
<div class="carousel-wrap">
<img class="info-icon" :src="require('@/assets/images/xiaoxi.png')">
<div class="content-wrapper">
<div class="carousel-title">{{ item.title }}</div>
<div class="carousel-content">
<div class="carousel-text" v-html="item.content"></div>
</div>
</div>
</div>
</div>
</el-carousel-item>
</el-carousel>
</div>
<el-row :gutter="10" class="mb8">
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<!-- 表格部分 -->
<el-table v-loading="loading" :data="notificationList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<!-- <el-table-column type="index" width="55" align="center" label="序号"/>-->
<!-- <el-table-column label="主键ID" align="center" prop="id" />-->
<!-- <el-table-column label="接收用户ID" align="center" prop="userId" />-->
<el-table-column label="通知标题" align="center" prop="title" />
<el-table-column label="通知内容" align="center" prop="content">
<el-table-column label="通知标题" align="center" prop="title" width="200"/>
<el-table-column label="通知内容" align="center" prop="content" width="300">
<template #default="scope">
<div v-html="scope.row.content"></div>
</template>
</el-table-column>
<el-table-column label="通知类型" align="center" prop="type" />
<el-table-column label="通知类型" align="center" prop="type" width="150">
<template #default="scope">
<el-tag :type="scope.row.type === 'CERT_EXPIRE_REMIND' ? 'danger': 'primary'">
{{ scope.row.type === 'CERT_EXPIRE_REMIND' ? '证书过期提醒' : scope.row.type}}
</el-tag>
</template>
</el-table-column>
<!-- <el-table-column label="关联ID" align="center" prop="relatedId" />-->
<el-table-column label="是否已读" align="center" prop="isRead">
<template #default="scope">
@ -155,7 +159,7 @@
</el-tag>
</template>
</el-table-column>
<el-table-column label="提醒级别" align="center" prop="remindLevel">
<el-table-column label="提醒级别" align="center" prop="remindLevel" width="100">
<template #default="scope">
<el-tag
:type="scope.row.remindLevel === 3 ? 'danger' :
@ -165,19 +169,19 @@
</el-tag>
</template>
</el-table-column>
<el-table-column label="阅读时间" align="center" prop="readTime" width="180">
<el-table-column label="阅读时间" align="center" prop="readTime" width="100">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.readTime, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<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="300">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-circle-check"
style="color: #42B983"
class="notification-btn read-btn"
style="color: #32a370"
class="info-btn read-btn"
@click="handleMarkRead(scope.row)"
v-hasPermi="['vet:certificate:edit']"
v-show="scope.row.isRead === 0"
@ -187,7 +191,7 @@
<!-- type="text"-->
<!-- icon="el-icon-edit"-->
<!-- style="color: #42B983"-->
<!-- class = "notification-btn alter-btn"-->
<!-- class = "info-btn alter-btn"-->
<!-- @click="handleUpdate(scope.row)"-->
<!-- v-hasPermi="['vet:certificate:edit']"-->
<!-- >修改</el-button>-->
@ -196,7 +200,7 @@
<!-- type="text"-->
<!-- icon="el-icon-delete"-->
<!-- style="color: #f28888"-->
<!-- class = "notification-btn delete-btn"-->
<!-- class = "info-btn delete-btn"-->
<!-- @click="handleDelete(scope.row)"-->
<!-- v-hasPermi="['vet:certificate:remove']"-->
<!-- >删除</el-button>-->
@ -464,17 +468,18 @@ export default {
</script>
<style scoped lang="scss">
/* 消息轮播 */
//
.carousel-container {
margin-bottom: 20px;
border: 1px solid #e4e7ed;
border-radius: 12px;
border-radius: 16px;
overflow: hidden;
box-shadow:
0 4px 20px rgba(0, 0, 0, 0.08),
inset 0 1px 1px rgba(255, 255, 255, 0.8);
background: linear-gradient(135deg, #f9fafb 0%, #ffffff 100%);
0 6px 24px rgba(0, 0, 0, 0.06),
inset 0 1px 0 rgba(255, 255, 255, 0.9);
background: linear-gradient(135deg, #fafbfc 0%, #ffffff 100%);
position: relative;
transition: all 0.3s ease;
&::before {
content: '';
@ -482,13 +487,18 @@ export default {
top: 0;
left: 0;
right: 0;
height: 1px;
height: 2px;
background: linear-gradient(90deg,
transparent 0%,
rgba(0, 0, 0, 0.05) 50%,
#e2e8f0 50%,
transparent 100%);
z-index: 1;
}
&:hover {
box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
transform: translateY(-1px);
}
}
.vertical-carousel {
@ -496,118 +506,134 @@ export default {
height: 100%;
line-height: normal;
background: transparent;
transition: all 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
}
}
.carousel-item {
padding: 10px 22px;
padding: 16px 24px;
height: 100%;
box-sizing: border-box;
color: #333;
position: relative;
.status-row {
.carousel-wrap {
height: 100%;
display: flex;
align-items: center;
margin-bottom: 12px;
gap: 20px;
transition: all 0.3s ease;
}
.info-icon {
width: 40px;
height: 40px;
margin-right: 15px;
filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
width: 60px;
height: 60px;
flex-shrink: 0;
filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.08));
transition: all 0.3s ease;
}
.content-wrapper {
flex: 1;
height: 100%;
display: flex;
flex-direction: column;
justify-content: center;
}
.carousel-title {
font-weight: 700;
font-size: 18px;
font-weight: 600;
font-size: 17px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
color: #1f2937;
letter-spacing: 0.3px;
padding-bottom: 12px;
color: #111827;
letter-spacing: 0.2px;
padding-bottom: 8px;
position: relative;
margin: 0;
&::after {
content: '';
position: absolute;
bottom: 0;
left: 0;
right: 0;
height: 1px;
background: linear-gradient(90deg,
transparent 0%,
rgba(0, 0, 0, 0.12) 20%,
rgba(0, 0, 0, 0.12) 80%,
transparent 100%);
box-shadow: 0 1px 1px rgba(255, 255, 255, 0.5);
width: 50px;
height: 2px;
background: #8a9692;
border-radius: 1px;
}
}
.carousel-content {
font-size: 14px;
height: 40px;
height: auto;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
color: #4b5563;
line-height: 1.7;
color: #374151;
line-height: 1.8;
font-weight: 400;
margin-top: 8px;
background: #f8f9fa;
border-radius: 8px;
border: 1px solid rgba(0, 0, 0, 0.06);
display: flex;
align-items: center;
.info-icon {
width: 50px;
height: 50px;
margin-right: 16px;
flex-shrink: 0;
align-self: center;
}
padding: 0;
background: transparent;
border: none;
display: block;
.carousel-text {
flex: 1;
display: flex;
align-items: center;
min-height: 50px;
min-height: auto;
padding: 0;
}
}
//
&[style*="background-color: #f0f9f0"] {
background: linear-gradient(180deg, #f0f9f0 0%, #f8fdf8 100%);
}
&[style*="background-color: #fffbeb"] {
background: linear-gradient(180deg, #fffbeb 0%, #fffdf0 100%);
}
&[style*="background-color: #fff2f2"] {
background: linear-gradient(180deg, #fff2f2 0%, #fef2f2 100%);
}
}
//
@media (max-width: 768px) {
.carousel-container {
border-radius: 10px;
border-radius: 14px;
margin-bottom: 16px;
}
.carousel-item {
padding: 14px 18px;
padding: 14px 20px;
.carousel-content {
.carousel-wrap {
padding: 12px;
gap: 16px;
}
.info-icon {
width: 40px;
height: 40px;
margin-right: 12px;
}
.info-icon {
width: 50px;
height: 50px;
}
.carousel-text {
min-height: 40px;
}
.carousel-title {
font-size: 16px;
padding-bottom: 6px;
}
.carousel-content {
font-size: 13px;
line-height: 1.7;
}
}
}
/* 操作按钮 */
.notification-btn {
//
.info-btn {
padding: 6px 10px;
border-radius: 4px;
margin: 0 10px;
@ -620,13 +646,10 @@ export default {
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);
::v-deep .el-input__inner:focus,
::v-deep .el-textarea__inner:focus {
border-color: #42B983;
box-shadow: 0 0 0 3px rgb(230, 255, 238);
background-color: white;
}
</style>

790
chenhai-ui/src/views/vet/product/index.vue

@ -244,7 +244,7 @@
<image-preview :src="scope.row.mainImage" :width="50" :height="50"/>
</template>
</el-table-column>
<el-table-column label="类型" align="center" prop="type" width="100">
<el-table-column label="产品类型" align="center" prop="type" width="100">
<template slot-scope="scope">
<el-tag
:type="getTypeTagType(scope.row.type)"
@ -254,7 +254,7 @@
</el-tag>
</template>
</el-table-column>
<el-table-column label="分类" align="center" prop="category" width="120">
<el-table-column label="产品分类" align="center" prop="category" width="120">
<template slot-scope="scope">
<el-tag
:type="getCategoryTagType(scope.row.category)"
@ -286,7 +286,7 @@
</template>
</el-table-column>
<el-table-column label="生产厂家" align="center" prop="manufacturer" width="150" show-overflow-tooltip/>
<el-table-column label="状态" prop="status" width="100" align="center">
<el-table-column label="产品状态" prop="status" width="100" align="center">
<template slot-scope="scope">
<el-tag :type="getStatusTagType(scope.row.status)" size="small">
{{ getStatusText(scope.row.status) }}
@ -329,132 +329,263 @@
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" fixed="right" width="300">
<!-- <template slot-scope="scope">-->
<!-- <el-button-->
<!-- size="mini"-->
<!-- type="text"-->
<!-- icon="el-icon-edit"-->
<!-- @click="handleUpdate(scope.row)"-->
<!-- v-hasPermi="['vet:product:edit']"-->
<!-- >修改</el-button>-->
<!-- <el-button-->
<!-- size="mini"-->
<!-- type="text"-->
<!-- icon="el-icon-delete"-->
<!-- @click="handleDelete(scope.row)"-->
<!-- v-hasPermi="['vet:product:remove']"-->
<!-- >删除</el-button>-->
<!-- </template>-->
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-view"
@click="handleDetail(scope.row)"
class="info-btn view-btn"
>
详情
</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-edit"
style="color: #42B983"
@click="handleUpdate(scope.row)"
class="info-btn alter-btn"
v-hasPermi="['vet:product:edit']"
>修改</el-button>
v-if="scope.row.status === '0' && (scope.row.auditStatus === '0' || scope.row.auditStatus === '3')"
>
编辑
</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
style="color: #f56c6c"
@click="handleDelete(scope.row)"
class="info-btn delete-btn"
v-hasPermi="['vet:product:remove']"
>删除</el-button>
>
删除
</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-s-promotion"
style="color: #dab708"
@click="handleSubmitAudit(scope.row)"
class="info-btn submit-btn"
v-hasPermi="['vet:product:submit']"
v-if="scope.row.status === '0' && scope.row.auditStatus === '0'"
>
提交审核
</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-top"
style="color: #f46a0c"
@click="handlePublish(scope.row)"
class="info-btn publish-btn"
v-hasPermi="['vet:product:publish']"
v-if="scope.row.auditStatus === '2' && scope.row.status === '0'"
>
上架
</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-bottom"
style="color: #636361"
@click="handleOffline(scope.row)"
class="info-btn offline-btn"
v-hasPermi="['vet:product:offline']"
v-if="scope.row.status === '1'"
>
下架
</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-close"
style="color: #5607b3"
@click="handleCancelAudit(scope.row)"
class="info-btn cancel-btn"
v-hasPermi="['vet:product:edit']"
v-if="scope.row.status === '0' && scope.row.auditStatus === '1'"
>
取消审核
</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-s-promotion"
style="color: #c108af"
@click="handleResubmitAudit(scope.row)"
class="info-btn resubmit-btn"
v-hasPermi="['vet:product:submit']"
v-if="scope.row.status === '0' && scope.row.auditStatus === '3'"
>
重新提交
</el-button>
</template>
<!-- <template slot-scope="scope">-->
<!-- <el-button-->
<!-- size="mini"-->
<!-- type="text"-->
<!-- icon="el-icon-view"-->
<!-- @click="handleDetail(scope.row)"-->
<!-- >-->
<!-- 详情-->
<!-- </el-button>-->
<!-- <el-button-->
<!-- size="mini"-->
<!-- type="text"-->
<!-- icon="el-icon-edit"-->
<!-- style="color: #42B983"-->
<!-- @click="handleUpdate(scope.row)"-->
<!-- v-hasPermi="['vet:product:edit']"-->
<!-- v-if="scope.row.status === '0' && (scope.row.auditStatus === '0' || scope.row.auditStatus === '3')"-->
<!-- >-->
<!-- 编辑-->
<!-- </el-button>-->
</el-table-column>
</el-table>
<!-- &lt;!&ndash; 删除按钮 &ndash;&gt;-->
<!-- <el-button-->
<!-- size="mini"-->
<!-- type="text"-->
<!-- icon="el-icon-delete"-->
<!-- style="color: #f56c6c"-->
<!-- @click="handleDelete(scope.row)"-->
<!-- v-hasPermi="['vet:product:remove']"-->
<!-- >-->
<!-- 删除-->
<!-- </el-button>-->
<!-- 分页 -->
<div class="pagestyle">
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
</div>
<!-- &lt;!&ndash; 提交审核按钮草稿状态显示 &ndash;&gt;-->
<!-- <el-button-->
<!-- size="mini"-->
<!-- type="text"-->
<!-- icon="el-icon-s-promotion"-->
<!-- style="color: #dab708"-->
<!-- @click="handleSubmitAudit(scope.row)"-->
<!-- v-hasPermi="['vet:product:submit']"-->
<!-- v-if="scope.row.status === '0' && scope.row.auditStatus === '0'"-->
<!-- >-->
<!-- 提交审核-->
<!-- </el-button>-->
<!-- &lt;!&ndash; 上架按钮审核通过且未上架状态显示 &ndash;&gt;-->
<!-- <el-button-->
<!-- size="mini"-->
<!-- type="text"-->
<!-- icon="el-icon-top"-->
<!-- style="color: #f46a0c"-->
<!-- @click="handlePublish(scope.row)"-->
<!-- v-hasPermi="['vet:product:publish']"-->
<!-- v-if="scope.row.auditStatus === '2' && scope.row.status === '0'"-->
<!-- >-->
<!-- 上架-->
<!-- </el-button>-->
<!-- &lt;!&ndash; 下架按钮已上架状态显示 &ndash;&gt;-->
<!-- <el-button-->
<!-- size="mini"-->
<!-- type="text"-->
<!-- icon="el-icon-bottom"-->
<!-- style="color: #636361"-->
<!-- @click="handleOffline(scope.row)"-->
<!-- v-hasPermi="['vet:product:offline']"-->
<!-- v-if="scope.row.status === '1'"-->
<!-- >-->
<!-- 下架-->
<!-- </el-button>-->
<!-- &lt;!&ndash; 取消审核按钮待审核状态且编辑权限显示 &ndash;&gt;-->
<!-- <el-button-->
<!-- size="mini"-->
<!-- type="text"-->
<!-- icon="el-icon-close"-->
<!-- style="color: #5607b3"-->
<!-- @click="handleCancelAudit(scope.row)"-->
<!-- v-hasPermi="['vet:product:edit']"-->
<!-- v-if="scope.row.status === '0' && scope.row.auditStatus === '1'"-->
<!-- >-->
<!-- 取消审核-->
<!-- </el-button>-->
<!-- 新增产品弹窗 -->
<!-- <el-dialog title="新增产品" :visible.sync="open" width="80%" append-to-body>-->
<!-- <el-form ref="form" :model="form" :rules="rules" label-width="120px">-->
<!-- &lt;!&ndash; 步骤条 &ndash;&gt;-->
<!-- <el-steps :active="activeStep" finish-status="success" style="margin-bottom:20px;">-->
<!-- <el-step title="基础信息" icon="el-icon-edit"></el-step>-->
<!-- <el-step title="价格库存" icon="el-icon-upload"></el-step>-->
<!-- <el-step title="详细说明" icon="el-icon-s-promotion"></el-step>-->
<!-- </el-steps>-->
<!-- <el-button-->
<!-- size="mini"-->
<!-- type="text"-->
<!-- icon="el-icon-s-promotion"-->
<!-- style="color: #ae059e"-->
<!-- @click="handleResubmitAudit(scope.row)"-->
<!-- v-hasPermi="['vet:product:submit']"-->
<!-- v-if="scope.row.status === '0' && scope.row.auditStatus === '3'"-->
<!-- >-->
<!-- 重新提交-->
<!-- </el-button>-->
<!-- </template>-->
</el-table-column>
</el-table>
<!-- &lt;!&ndash; 步骤1基础信息 &ndash;&gt;-->
<!-- <div v-if="activeStep === 0">-->
<!-- <el-form-item label="产品名称" prop="name">-->
<!-- <el-input v-model="form.name" placeholder="请输入产品名称"/>-->
<!-- </el-form-item>-->
<!-- <el-form-item label="产品类型" prop="type">-->
<!-- <el-select v-model="form.type" placeholder="请选择产品类型" clearable>-->
<!-- <el-option-->
<!-- v-for="dict in dict.type.medicine_type"-->
<!-- :key="dict.value"-->
<!-- :label="dict.label"-->
<!-- :value="dict.value"-->
<!-- />-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<!-- <el-form-item label="产品分类" prop="category">-->
<!-- <el-select v-model="form.category" placeholder="请选择产品分类" clearable>-->
<!-- <el-option-->
<!-- v-for="dict in dict.type.vet_product_category"-->
<!-- :key="dict.value"-->
<!-- :label="dict.label"-->
<!-- :value="dict.value"-->
<!-- />-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<!-- <el-form-item label="生产厂家" prop="manufacturer">-->
<!-- <el-input v-model="form.manufacturer" placeholder="请输入生产厂家"/>-->
<!-- </el-form-item>-->
<!-- <el-form-item label="批准文号" prop="approvalNumber">-->
<!-- <el-input v-model="form.approvalNumber" placeholder="请输入批准文号"/>-->
<!-- </el-form-item>-->
<!-- <el-form-item label="适用动物:如犬、猫、猪等" prop="treatAnimals">-->
<!-- <el-input v-model="form.treatAnimals" type="textarea" placeholder="请输入内容"/>-->
<!-- </el-form-item>-->
<!-- <el-form-item label="治疗疾病" prop="treatDiseases">-->
<!-- <el-input v-model="form.treatDiseases" type="textarea" placeholder="请输入内容"/>-->
<!-- </el-form-item>-->
<!-- <el-form-item label="相关图片" prop="mainImage">-->
<!-- <image-upload v-model="form.mainImage"/>-->
<!-- </el-form-item>-->
<!-- </div>-->
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<!-- &lt;!&ndash; 步骤2价格库存 &ndash;&gt;-->
<!-- <div v-if="activeStep === 1">-->
<!-- <el-form-item label="规格" prop="specification">-->
<!-- <el-input v-model="form.specification" placeholder="请输入规格" />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="单位" prop="unit">-->
<!-- <el-input v-model="form.unit" placeholder="请输入单位" />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="销售价格" prop="price">-->
<!-- <el-input-number-->
<!-- v-model="form.price"-->
<!-- :precision="2"-->
<!-- :step="0.1"-->
<!-- :min="0"-->
<!-- placeholder="请输入销售价格"-->
<!-- ></el-input-number>-->
<!-- </el-form-item>-->
<!-- <el-form-item label="成本价" prop="costPrice">-->
<!-- <el-input-number-->
<!-- v-model="form.costPrice"-->
<!-- :precision="2"-->
<!-- :step="0.1"-->
<!-- :min="0"-->
<!-- placeholder="请输入成本价"-->
<!-- ></el-input-number>-->
<!-- </el-form-item>-->
<!-- <el-form-item label="库存数量" prop="stock">-->
<!-- <el-input-number-->
<!-- v-model="form.stock"-->
<!-- :min="1"-->
<!-- :step="1"-->
<!-- label="库存数量"-->
<!-- ></el-input-number>-->
<!-- </el-form-item>-->
<!-- <el-form-item label="最低库存预警" prop="minStock">-->
<!-- <el-input-number-->
<!-- v-model="form.minStock"-->
<!-- :min="0"-->
<!-- :step="1"-->
<!-- label="最低库存预警"-->
<!-- ></el-input-number>-->
<!-- </el-form-item>-->
<!-- </div>-->
<!-- 添加或修改兽医产品信息对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<!-- &lt;!&ndash; 步骤3详细说明 &ndash;&gt;-->
<!-- <div v-if="activeStep === 2">-->
<!-- <el-form-item label="主要成分" prop="ingredients">-->
<!-- <el-input v-model="form.ingredients" type="textarea" placeholder="请输入内容" />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="适应症" prop="indications">-->
<!-- <el-input v-model="form.indications" type="textarea" placeholder="请输入内容" />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="治疗方案/内容">-->
<!-- <editor v-model="form.treatmentContent" :min-height="192"/>-->
<!-- </el-form-item>-->
<!-- <el-form-item label="治疗周期" prop="treatmentDuration">-->
<!-- <el-input v-model="form.treatmentDuration" placeholder="请输入治疗周期" />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="注意事项" prop="precautions">-->
<!-- <el-input v-model="form.precautions" type="textarea" placeholder="请输入内容" />-->
<!-- </el-form-item>-->
<!-- </div>-->
<!-- &lt;!&ndash; 步骤操作按钮 &ndash;&gt;-->
<!-- <div style="text-align: center; margin-top: 30px;">-->
<!-- <el-button @click="prevStep" v-if="activeStep > 0">上一步</el-button>-->
<!-- <el-button-->
<!-- type="primary"-->
<!-- @click="nextStep"-->
<!-- v-if="activeStep < 2"-->
<!-- >下一步</el-button>-->
<!-- <el-button-->
<!-- type="primary"-->
<!-- @click="submitForm"-->
<!-- v-if="activeStep === 2"-->
<!-- >提交</el-button>-->
<!-- <el-button @click=cancel>取消</el-button>-->
<!-- </div>-->
<!-- </el-form>-->
<!-- </el-dialog>-->
<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="name">
<el-input v-model="form.name" placeholder="请输入产品名称" />
@ -554,19 +685,200 @@
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
<!-- 修改弹窗-->
<!-- <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-item label="产品名称" prop="name">-->
<!-- <el-input v-model="form.name" placeholder="请输入产品名称" />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="产品类型" prop="type">-->
<!-- <el-select v-model="form.type" placeholder="请选择产品类型" clearable>-->
<!-- <el-option v-for="dict in dict.type.medicine_type" :key="dict.value" :label="dict.label" :value="dict.value" />-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<!-- <el-form-item label="产品分类" prop="category">-->
<!-- <el-select v-model="form.category" placeholder="请选择产品分类" clearable>-->
<!-- <el-option v-for="dict in dict.type.vet_product_category" :key="dict.value" :label="dict.label" :value="dict.value" />-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<!-- <el-form-item label="规格" prop="specification">-->
<!-- <el-input v-model="form.specification" placeholder="请输入规格" />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="单位" prop="unit">-->
<!-- <el-input v-model="form.unit" placeholder="请输入单位" />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="生产厂家" prop="manufacturer">-->
<!-- <el-input v-model="form.manufacturer" placeholder="请输入生产厂家" />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="批准文号" prop="approvalNumber">-->
<!-- <el-input v-model="form.approvalNumber" placeholder="请输入批准文号" />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="主要成分" prop="ingredients">-->
<!-- <el-input v-model="form.ingredients" type="textarea" placeholder="请输入内容" />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="适应症" prop="indications">-->
<!-- <el-input v-model="form.indications" type="textarea" placeholder="请输入内容" />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="用法用量" prop="usageDosage">-->
<!-- <el-input v-model="form.usageDosage" type="textarea" placeholder="请输入内容" />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="销售价格" prop="price">-->
<!-- <el-input v-model="form.price" placeholder="请输入销售价格" />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="成本价" prop="costPrice">-->
<!-- <el-input v-model="form.costPrice" placeholder="请输入成本价" />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="库存数量" prop="stock">-->
<!-- <el-input v-model="form.stock" placeholder="请输入库存数量" />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="最低库存预警" prop="minStock">-->
<!-- <el-input v-model="form.minStock" placeholder="请输入最低库存预警" />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="相关图片" prop="mainImage">-->
<!-- <image-upload v-model="form.mainImage"/>-->
<!-- </el-form-item>-->
<!-- &lt;!&ndash; <el-form-item label="多张图片URL,JSON格式" prop="images">&ndash;&gt;-->
<!-- &lt;!&ndash; <el-input v-model="form.images" type="textarea" placeholder="请输入内容" />&ndash;&gt;-->
<!-- &lt;!&ndash; </el-form-item>&ndash;&gt;-->
<!-- <el-form-item label="适用动物:如犬、猫、猪等" prop="treatAnimals">-->
<!-- <el-input v-model="form.treatAnimals" type="textarea" placeholder="请输入内容" />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="治疗疾病" prop="treatDiseases">-->
<!-- <el-input v-model="form.treatDiseases" type="textarea" placeholder="请输入内容" />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="治疗方案/内容">-->
<!-- <editor v-model="form.treatmentContent" :min-height="192"/>-->
<!-- </el-form-item>-->
<!-- <el-form-item label="治疗周期" prop="treatmentDuration">-->
<!-- <el-input v-model="form.treatmentDuration" placeholder="请输入治疗周期" />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="注意事项" prop="precautions">-->
<!-- <el-input v-model="form.precautions" type="textarea" placeholder="请输入内容" />-->
<!-- </el-form-item>-->
<!-- &lt;!&ndash; <el-form-item label="删除标识:0-正常/1-删除" prop="isDeleted">&ndash;&gt;-->
<!-- &lt;!&ndash; <el-input v-model="form.isDeleted" placeholder="请输入删除标识:0-正常/1-删除" />&ndash;&gt;-->
<!-- &lt;!&ndash; </el-form-item>&ndash;&gt;-->
<!-- &lt;!&ndash; <el-form-item label="诊所ID" prop="clinicId">&ndash;&gt;-->
<!-- &lt;!&ndash; <el-input v-model="form.clinicId" placeholder="请输入诊所ID" />&ndash;&gt;-->
<!-- &lt;!&ndash; </el-form-item>&ndash;&gt;-->
<!-- &lt;!&ndash; <el-form-item label="兽医ID" prop="vetId">&ndash;&gt;-->
<!-- &lt;!&ndash; <el-input v-model="form.vetId" placeholder="请输入兽医ID" />&ndash;&gt;-->
<!-- &lt;!&ndash; </el-form-item>&ndash;&gt;-->
<!-- &lt;!&ndash; <el-form-item label="创建时间" prop="createdAt">&ndash;&gt;-->
<!-- &lt;!&ndash; <el-date-picker clearable&ndash;&gt;-->
<!-- &lt;!&ndash; v-model="form.createdAt"&ndash;&gt;-->
<!-- &lt;!&ndash; type="date"&ndash;&gt;-->
<!-- &lt;!&ndash; value-format="yyyy-MM-dd"&ndash;&gt;-->
<!-- &lt;!&ndash; placeholder="请选择创建时间">&ndash;&gt;-->
<!-- &lt;!&ndash; </el-date-picker>&ndash;&gt;-->
<!-- &lt;!&ndash; </el-form-item>&ndash;&gt;-->
<!-- &lt;!&ndash; <el-form-item label="更新时间" prop="updatedAt">&ndash;&gt;-->
<!-- &lt;!&ndash; <el-date-picker clearable&ndash;&gt;-->
<!-- &lt;!&ndash; v-model="form.updatedAt"&ndash;&gt;-->
<!-- &lt;!&ndash; type="date"&ndash;&gt;-->
<!-- &lt;!&ndash; value-format="yyyy-MM-dd"&ndash;&gt;-->
<!-- &lt;!&ndash; placeholder="请选择更新时间">&ndash;&gt;-->
<!-- &lt;!&ndash; </el-date-picker>&ndash;&gt;-->
<!-- &lt;!&ndash; </el-form-item>&ndash;&gt;-->
<!-- </el-form>-->
<!-- <div slot="footer" class="dialog-footer">-->
<!-- <el-button type="primary" @click="submitForm"> </el-button>-->
<!-- <el-button @click="cancel"> </el-button>-->
<!-- </div>-->
<!-- </el-dialog>-->
<!-- 详情弹窗 -->
<el-dialog title="产品详情" :visible.sync="detailViews" width="80%" append-to-body>
<el-descriptions :column="4" border v-loading="detailLoading" >
<el-descriptions-item label="产品名称" :span="4">
{{ currentDetail.name || '--' }}
</el-descriptions-item>
<el-descriptions-item label="产品类型">
{{ currentDetail.type || '--' }}
</el-descriptions-item>
<el-descriptions-item label="产品分类">
{{ currentDetail.category || '--' }}
</el-descriptions-item>
<el-descriptions-item label="规格">
{{ currentDetail.specification || '--' }}
</el-descriptions-item>
<el-descriptions-item label="单位">
{{ currentDetail.unit || '--' }}
</el-descriptions-item>
<el-descriptions-item label="生产厂家" :span="2">
{{ currentDetail.manufacturer || '--' }}
</el-descriptions-item>
<el-descriptions-item label="批准文号" :span="2">
{{ currentDetail.approvalNumber || '--' }}
</el-descriptions-item>
<el-descriptions-item label="销售价格">
{{ currentDetail.price || '--' }}
</el-descriptions-item>
<el-descriptions-item label="成本价">
{{ currentDetail.costPrice || '--' }}
</el-descriptions-item>
<el-descriptions-item label="库存数量">
{{ currentDetail.stock || '--' }}
</el-descriptions-item>
<el-descriptions-item label="最低库存预警">
{{ currentDetail.minStock || '--' }}
</el-descriptions-item>
<el-descriptions-item label="适用动物" :span="2">
{{ currentDetail.treatAnimals || '--' }}
</el-descriptions-item>
<el-descriptions-item label="治疗疾病" :span="2">
{{ currentDetail.treatDiseases || '--' }}
</el-descriptions-item>
<el-descriptions-item label="主要成分" :span="4">
{{ currentDetail.ingredients || '--' }}
</el-descriptions-item>
<el-descriptions-item label="适应症" :span="4">
{{ currentDetail.indications || '--' }}
</el-descriptions-item>
<el-descriptions-item label="用法用量" :span="4">
{{ currentDetail.usageDosage || '--' }}
</el-descriptions-item>
<el-descriptions-item label="治疗方案/内容" :span="4">
<div v-html="currentDetail.treatmentContent || '--'"></div>
</el-descriptions-item>
<el-descriptions-item label="治疗周期" :span="4" >
{{ currentDetail.treatmentDuration || '--' }}
</el-descriptions-item>
<el-descriptions-item label="注意事项" :span="4">
{{ currentDetail.precautions || '--' }}
</el-descriptions-item>
<el-descriptions-item label="创建时间" :span="2">
{{ currentDetail.createdAt || '--' }}
</el-descriptions-item>
<el-descriptions-item label="更新时间" :span="2">
{{ currentDetail.updatedAt || '--' }}
</el-descriptions-item>
</el-descriptions>
<div slot="footer" class="dialog-footer">
<el-button @click="detailViews = false"> </el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { listProduct, getProduct, delProduct, addProduct, updateProduct } from "@/api/vet/product"
import { listProduct, getProduct, delProduct, addProduct, updateProduct, offlineProduct, publishProduct, submitAuditProduct, cancelAuditProduct, resubmitAuditProduct } from "@/api/vet/product"
export default {
name: "Product",
props: {
shopId: {
type: [Number, String],
required: true
}
},
dicts: ['medicine_type', 'vet_product_category', 'sys_publish_status', 'audit_status'],
data() {
return {
//
loading: true,
detailLoading: false,
//
ids: [],
//
@ -577,12 +889,17 @@ export default {
showSearch: true,
//
total: 0,
//
activeStep: 0,
//
productList: [],
//
title: "",
//
open: false,
detailViews: false,
//
currentDetail: {},
//
queryParams: {
pageNum: 1,
@ -613,7 +930,8 @@ export default {
clinicId: null,
vetId: null,
createdAt: null,
updatedAt: null
updatedAt: null,
shopId: null
},
//
form: {},
@ -667,6 +985,7 @@ export default {
},
//
reset() {
this.activeStep = 0;
this.form = {
id: null,
name: null,
@ -715,6 +1034,22 @@ export default {
this.single = selection.length!==1
this.multiple = !selection.length
},
/** 详情按钮操作 */
handleDetail(row) {
this.detailViews = true;
this.detailLoading = true;
this.currentDetail = {};
const id = row.id;
getProduct(id).then(response => {
if (response.code === 200) {
this.currentDetail = response.data;
} else {
this.$modal.msgError("获取详情失败");
}
this.detailLoading = false;
});
},
/** 新增按钮操作 */
handleAdd() {
this.reset()
@ -731,6 +1066,35 @@ export default {
this.title = "修改兽医产品信息"
})
},
// //
// prevStep() {
// this.activeStep--;
// },
// //
// nextStep() {
// if (this.activeStep === 0) {
// this.$refs.form.validate(valid => {
// if (valid) this.activeStep++;
// });
// return;
// }
// },
//
// submitForm() {
// this.$refs.productForm.validate((valid) => {
// if (valid) {
// //
// this.$message.success("");
// //
// // this.$api.product.add(this.form).then(res => { ... })
// this.dialogVisible = false;
// } else {
// this.$message.error("");
// return false;
// }
// });
// },
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
@ -833,10 +1197,80 @@ export default {
}
return map[auditStatus] || ''
},
//
handlePublish(row) {
publishProduct(row.id).then(response => {
this.$modal.msgSuccess("上架成功")
this.getList()
}).catch(() => {
this.$modal.msgError("上架失败")
})
},
//
handleOffline(row) {
offlineProduct(row.id).then(response => {
this.$modal.msgSuccess("下架成功")
this.getList()
}).catch(() => {
this.$modal.msgError("下架失败")
})
},
//
handleSubmitAudit(row) {
submitAuditProduct(row.id).then(response => {
this.$modal.msgSuccess("提交审核成功")
this.getList()
}).catch(() => {
this.$modal.msgError("提交审核失败")
})
},
//
handleCancelAudit(row){
cancelAuditProduct(row.id).then(response => {
this.$modal.msgSuccess("取消审核成功")
this.getList()
}).catch(() => {
this.$modal.msgError("取消审核失败")
})
},
//
handleResubmitAudit(row){
resubmitAuditProduct(row.id).then(response => {
this.$modal.msgSuccess("重新提交审核成功")
this.getList()
}).catch(() => {
this.$modal.msgError("重新提交审核失败")
})
}
}
}
</script>
<style scoped>
::v-deep .el-descriptions-item__cell{
width: 90px;
}
::v-deep .el-descriptions-row th{
text-align: center !important;
}
::v-deep .pagestyle .el-input{
width: auto !important;
}
::v-deep .pagestyle .pagination-container{
background-color: #f8fafc;
}
</style>
<style lang="scss" scoped>
//
.price-cell {
@ -863,4 +1297,136 @@ export default {
margin-top: 2px;
}
}
//
.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);
}
.chat-btn:hover {
background-color: rgb(225, 233, 246);
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);
}
.submit-btn:hover {
background-color: rgb(253, 250, 232);
transform: translateY(-1px);
}
.publish-btn:hover {
background-color: rgb(253, 238, 228);
transform: translateY(-1px);
}
.offline-btn:hover {
background-color: rgb(237, 237, 235);
transform: translateY(-1px);
}
.cancel-btn:hover {
background-color: rgb(244, 237, 251);
transform: translateY(-1px);
}
.resubmit-btn:hover {
background-color: rgb(248, 232, 250);
transform: translateY(-1px);
}
// /
::v-deep .el-dialog {
border-radius: 12px;
overflow: hidden;
box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
animation: dialogFadeIn 0.3s ease;
}
::v-deep .el-dialog__header {
background: linear-gradient(135deg, #42b983 0%, #83df92 100%);
padding: 18px 24px;
border-bottom: none;
position: relative;
}
::v-deep .el-dialog__title {
font-size: 17px;
font-weight: 600;
color: white;
letter-spacing: 0.5px;
}
::v-deep .el-dialog__headerbtn:hover .el-dialog__close {
color: #ffd04b;
transform: rotate(90deg);
}
::v-deep .el-dialog__body {
padding: 28px 24px 20px;
background-color: #f8fafc;
max-height: 70vh;
overflow-y: auto;
}
::v-deep .el-form-item {
margin-bottom: 20px;
transition: all 0.3s;
}
::v-deep .el-form-item__label {
font-weight: 500;
color: #2d3748;
font-size: 14px;
transition: color 0.3s;
}
::v-deep .el-input,
::v-deep .el-textarea,
::v-deep .el-select {
width: 100%;
}
::v-deep .el-input__inner,
::v-deep .el-textarea__inner {
border-radius: 8px;
border: 1px solid #dcdfe6;
font-size: 14px;
transition: all 0.3s;
background-color: #fcfdfe;
}
::v-deep .el-input__inner:focus,
::v-deep .el-textarea__inner:focus {
border-color: #42B983;
box-shadow: 0 0 0 3px rgb(230, 255, 238);
background-color: white;
}
::v-deep .el-select .el-input__inner {
padding-right: 35px;
}
::v-deep .el-dialog__footer {
padding: 20px 24px;
background-color: #f8fafc;
border-top: 1px solid #eef2f7;
border-radius: 0 0 12px 12px;
}
</style>

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

@ -116,19 +116,19 @@
<!-- <el-table-column label="资质ID" align="center" prop="qualificationId" v-if="false" />-->
<!-- <el-table-column label="真实姓名" align="center" prop="realName" />-->
<!-- <el-table-column label="身份证号" align="center" prop="idCard" />-->
<el-table-column label="真实姓名" align="center" prop="realName" width="150">
<el-table-column label="真实姓名" align="center" prop="realName" width="150" :show-overflow-tooltip="true">
<template slot-scope="scope">
<span v-if="scope.row.realName">{{ scope.row.realName }}</span>
<span v-else style="color: #909399">-</span>
</template>
</el-table-column>
<el-table-column label="身份证号" align="center" prop="idCard" width="180">
<el-table-column label="身份证号" align="center" prop="idCard" width="200">
<template slot-scope="scope">
<span v-if="scope.row.idCard">{{ scope.row.idCard }}</span>
<span v-else style="color: #909399">-</span>
</template>
</el-table-column>
<el-table-column label="资质类型" align="center" prop="qualificationType" width="120">
<el-table-column label="资质类型" align="center" prop="qualificationType" width="150">
<template slot-scope="scope">
<span>{{ formatQualificationType(scope.row.qualificationType) }}</span>
</template>
@ -192,8 +192,8 @@
</el-tag>
</template>
</el-table-column>
<el-table-column label="备注" align="center" prop="remark" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" fixed="right" width="200">
<el-table-column label="备注" align="center" prop="remark" width="150" :show-overflow-tooltip="true"/>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" fixed="right" width="300">
<template slot-scope="scope">
<!-- 查看按钮 -->
<el-button
@ -203,7 +203,7 @@
@click="handleView(scope.row)"
v-hasPermi="['vet:qualification:query']"
class="info-btn view-btn"
>查看证书详情</el-button>
>详情</el-button>
<!-- 修改按钮 -->
<!-- <el-button-->
@ -263,18 +263,20 @@
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<div class="pagestyle">
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
</div>
<!-- 显示资质证书信息弹窗 -->
<el-dialog :title="title" :visible.sync="openDetail" width="800px" append-to-body>
<el-dialog :title="title" :visible.sync="openDetail" width="80%" append-to-body>
<div v-if="detailData" style="padding: 20px;">
<div style="margin-top: 30px;">
<div>
<el-alert
v-if="!certificateList || certificateList.length === 0"
title="暂无资质证书"
@ -282,20 +284,19 @@
:closable="false"
style="margin-bottom: 20px;"
/>
<el-table v-else :data="certificateList" border style="width: 100%">
<el-table-column type="selection" width="55" align="center" />
<el-table-column prop="certificateNo" label="证书编号" align="center" width="200">
<el-table-column prop="certificateNo" label="证书编号" align="center" width="150" :show-overflow-tooltip="true">
<template slot-scope="scope">
<span>{{ scope.row.certificateNo }}</span>
</template>
</el-table-column>
<el-table-column prop="certName" label="证书名称" align="center" width="180">
<el-table-column prop="certName" label="证书名称" align="center" width="150" :show-overflow-tooltip="true">
<template slot-scope="scope">
<span>{{ scope.row.certName }}</span>
</template>
</el-table-column>
<el-table-column label="发证机构" align="center" prop="issueOrg" width="150">
<el-table-column label="发证机构" align="center" prop="issueOrg" width="150" :show-overflow-tooltip="true">
<template slot-scope="scope">
<span v-if="scope.row.issueOrg">{{ scope.row.issueOrg }}</span>
<span v-else style="color: #909399">-</span>
@ -329,12 +330,12 @@
<span v-else style="color: #909399">-</span>
</template>
</el-table-column>
<el-table-column prop="issueDate" label="发证日期" align="center" width="120">
<el-table-column prop="issueDate" label="发证日期" align="center" width="150">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.issueDate, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<el-table-column prop="expireDate" label="到期日期" align="center" width="120">
<el-table-column prop="expireDate" label="到期日期" align="center" width="150">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.expireDate, '{y}-{m}-{d}') }}</span>
</template>
@ -346,9 +347,8 @@
</el-tag>
</template>
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" fixed="right" width="100">
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" fixed="right" width="300">
<template slot-scope="scope">
<!-- 修改按钮 -->
<el-button
v-if="!detailData.auditStatus || detailData.auditStatus === '0' || detailData.auditStatus === '2'"
size="mini"
@ -367,10 +367,20 @@
<div slot="footer" class="dialog-footer">
<el-button @click="closeDetail"> </el-button>
</div>
<div class="pageway">
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
</div>
</el-dialog>
<!-- 图片预览弹窗 -->
<el-dialog :visible.sync="previewDialogVisible" width="60%" append-to-body>
<el-dialog :visible.sync="previewDialogVisible" width="80%" append-to-body>
<div style="text-align: center; padding: 20px;">
<img
:src="getImageUrl(previewFileUrl)"
@ -379,10 +389,13 @@
:preview-src-list="[getImageUrl(previewFileUrl)]"
/>
</div>
<div slot="footer" class="dialog-footer">
<el-button @click="closeimage"> </el-button>
</div>
</el-dialog>
<!-- 添加或修改兽医资质弹窗 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<!-- 添加或修改兽医资质弹窗-->
<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="realName">-->
<!-- <el-input v-model="form.realName" placeholder="请输入真实姓名" />-->
@ -442,12 +455,12 @@
:file-type="['pdf','png','jpg','jpeg']"
/>
</el-form-item>
<el-form-item label="提前提醒天数" prop="remindDays">
<el-input v-model="form.remindDays" placeholder="请输入提前提醒天数" />
</el-form-item>
<el-form-item label="备注" prop="remark">
<el-input v-model="form.remark" type="textarea" placeholder="请输入备注" />
</el-form-item>
<!-- <el-form-item label="提前提醒天数" prop="remindDays">-->
<!-- <el-input v-model="form.remindDays" placeholder="请输入提前提醒天数" />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="备注" prop="remark">-->
<!-- <el-input v-model="form.remark" type="textarea" placeholder="请输入备注" />-->
<!-- </el-form-item>-->
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="resubmitForm">重新提交审核</el-button>
@ -458,8 +471,7 @@
</template>
<script>
import { listQualification, getQualificationCertificate, delQualification, getQualificationCertificates, updateAndSubmitQualification} from "@/api/vet/qualification"
import {listQualificationCertificates} from "../../../api/vet/qualification";
import { listQualification, getQualificationCertificate, delQualification, getQualificationCertificates, updateAndSubmitQualification, listQualificationCertificates} from "@/api/vet/qualification"
export default {
name: "Qualification",
@ -886,6 +898,11 @@ export default {
this.reset()
},
// closeimage
closeimage(){
this.previewDialogVisible = false
},
//
reset() {
this.form = {
@ -1038,6 +1055,15 @@ export default {
margin: 2px;
}
::v-deep .pagestyle .el-input{
width: auto !important;
}
::v-deep .pageway .el-input{
width: auto !important;
}
::v-deep .pageway .pagination-container{
background-color: #f8fafc;
}
/* 详情对话框样式 */
::v-deep .qualification-detail-dialog .el-message-box__content {
max-height: 400px;
@ -1051,8 +1077,10 @@ export default {
::v-deep .qualification-detail-dialog table tr:last-child td {
border-bottom: none;
}
</style>
/* 操作按钮 */
<style scoped lang="scss">
//
.info-btn {
padding: 6px 10px;
border-radius: 4px;
@ -1069,4 +1097,83 @@ export default {
background-color: rgb(230, 255, 238);
transform: translateY(-1px);
}
// /
::v-deep .el-dialog {
border-radius: 12px;
overflow: hidden;
box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
animation: dialogFadeIn 0.3s ease;
}
::v-deep .el-dialog__header {
background: linear-gradient(135deg, #42b983 0%, #83df92 100%);
padding: 18px 24px;
border-bottom: none;
position: relative;
}
::v-deep .el-dialog__title {
font-size: 17px;
font-weight: 600;
color: white;
letter-spacing: 0.5px;
}
::v-deep .el-dialog__headerbtn:hover .el-dialog__close {
color: #ffd04b;
transform: rotate(90deg);
}
::v-deep .el-dialog__body {
padding: 28px 24px 20px;
background-color: #f8fafc;
max-height: 70vh;
overflow-y: auto;
}
::v-deep .el-form-item {
margin-bottom: 20px;
transition: all 0.3s;
}
::v-deep .el-form-item__label {
font-weight: 500;
color: #2d3748;
font-size: 14px;
transition: color 0.3s;
}
::v-deep .el-input,
::v-deep .el-textarea,
::v-deep .el-select {
width: 100%;
}
::v-deep .el-input__inner,
::v-deep .el-textarea__inner {
border-radius: 8px;
border: 1px solid #dcdfe6;
font-size: 14px;
transition: all 0.3s;
background-color: #fcfdfe;
}
::v-deep .el-input__inner:focus,
::v-deep .el-textarea__inner:focus {
border-color: #42B983;
box-shadow: 0 0 0 3px rgb(230, 255, 238);
background-color: white;
}
::v-deep .el-select .el-input__inner {
padding-right: 35px;
}
::v-deep .el-dialog__footer {
padding: 20px 24px;
background-color: #f8fafc;
border-top: 1px solid #eef2f7;
border-radius: 0 0 12px 12px;
}
</style>

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

@ -1,11 +1,11 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<!-- <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">-->
<!-- <el-form-item>-->
<!-- <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>-->
<!-- <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>-->
<!-- </el-form-item>-->
<!-- </el-form>-->
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
@ -145,6 +145,7 @@
style="color: #42B983"
@click="handleUpdate(scope.row)"
v-hasPermi="['vet:training:edit']"
v-if="scope.row.status === '0' && (scope.row.auditStatus === '3' || scope.row.auditStatus === '0')"
class="info-btn alter-btn"
>修改</el-button>
@ -153,9 +154,11 @@
size="mini"
type="text"
icon="el-icon-s-promotion"
style="color: #dab708"
@click="handleSubmitAudit(scope.row.id)"
v-hasPermi="['vet:training:submit']"
v-if="scope.row.auditStatus === '2' || scope.row.auditStatus === '3'"
v-if="scope.row.status === '0' && (scope.row.auditStatus === '3' || scope.row.auditStatus === '0')"
class="info-btn submit-btn"
>提交审核</el-button>
<!-- 审核按钮待审核状态管理员 -->
@ -164,18 +167,22 @@
type="text"
icon="el-icon-finished"
@click="handleAuditDialog(scope.row.id)"
style="color: #072eed"
v-hasPermi="['vet:training:audit']"
v-if="scope.row.auditStatus === '0' && isAdmin"
class="info-btn audit-btn"
>审核</el-button>
<!-- 上架按钮审核通过且未上架 -->
<el-button
size="mini"
type="text"
icon="el-icon-check"
icon="el-icon-top"
@click="handlePublish(scope.row.id)"
style="color: #f46a0c"
v-hasPermi="['vet:training:publish']"
v-if="scope.row.auditStatus === '1' && scope.row.status === '0'"
v-if="scope.row.auditStatus === '2' && scope.row.status === '0'"
class="info-btn publish-btn"
>上架</el-button>
<!-- 下架按钮已上架状态 -->
@ -183,7 +190,7 @@
size="mini"
type="text"
icon="el-icon-bottom"
style="color: #E6A23C"
style="color: #636361"
@click="handleOffline(scope.row.id)"
v-hasPermi="['vet:training:offline']"
v-if="scope.row.status === '1'"
@ -191,14 +198,25 @@
>下架</el-button>
<!-- 取消审核按钮 -->
<!-- <el-button-->
<!-- size="mini"-->
<!-- type="text"-->
<!-- icon="el-icon-close"-->
<!-- style="color: #5607b3"-->
<!-- @click="handleCancelAudit(scope.row.id)"-->
<!-- v-hasPermi="['vet:training:edit']"-->
<!-- v-if="scope.row.auditStatus === '1' && !isAdmin"-->
<!-- class="info-btn cancel-btn"-->
<!-- >取消审核</el-button>-->
<el-button
size="mini"
type="text"
icon="el-icon-close"
style="color: #F56C6C"
style="color: #5607b3"
@click="handleCancelAudit(scope.row.id)"
v-hasPermi="['vet:training:edit']"
v-if="scope.row.auditStatus === '0' && !isAdmin"
v-if="scope.row.auditStatus === '1'"
class="info-btn cancel-btn"
>取消审核</el-button>
<!-- 删除按钮 -->
@ -206,7 +224,7 @@
size="mini"
type="text"
icon="el-icon-delete"
style="color: #f28888"
style="color: #f56c6c"
@click="handleDelete(scope.row)"
v-hasPermi="['vet:training:remove']"
class="info-btn delete-btn"
@ -215,16 +233,18 @@
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<div class="pagestyle">
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
</div>
<!-- 添加或修改兽医培训视频对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<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="title">
<el-input v-model="form.title" placeholder="请输入视频标题" />
@ -324,7 +344,7 @@
<el-dialog
title="视频审核"
:visible.sync="auditOpen"
width="500px"
width="80%"
append-to-body
>
<el-form ref="auditFormRef" :model="auditForm" :rules="auditRules" label-width="80px">
@ -408,10 +428,10 @@ export default {
{ dictValue: '1', dictLabel: '已上架', listClass: 'success' }
],
auditStatusOptions: [
{ dictValue: '0', dictLabel: '待审核', listClass: 'warning' },
{ dictValue: '1', dictLabel: '审核通过', listClass: 'success' },
{ dictValue: '2', dictLabel: '审核拒绝', listClass: 'danger' },
{ dictValue: '3', dictLabel: '无需审核', listClass: 'info' }
{ dictValue: '0', dictLabel: '待审核', listClass: 'info' },
{ dictValue: '1', dictLabel: '审核', listClass: 'warning' },
{ dictValue: '2', dictLabel: '审核通过', listClass: 'success' },
{ dictValue: '3', dictLabel: '审核驳回', listClass: 'danger' }
],
//
@ -531,11 +551,11 @@ export default {
const type = item ? (item.listClass || 'info') : 'info'
const tagTypeMap = {
'primary': 'primary',
'info': 'info',
'warning': 'warning',
'success': 'success',
'danger': 'danger',
'warning': 'warning',
'info': 'info'
// 'primary': 'primary',
}
return tagTypeMap[type] || 'info'
},
@ -1109,6 +1129,12 @@ export default {
</script>
<style scoped>
::v-deep .pagestyle .el-input{
width: auto !important;
}
</style>
<style lang="scss" scoped>
.video-url-cell {
display: flex;
align-items: center;
@ -1122,6 +1148,7 @@ export default {
white-space: nowrap;
}
//
.info-btn {
padding: 6px 10px;
border-radius: 4px;
@ -1129,8 +1156,8 @@ export default {
transition: all 0.3s ease;
}
.offline-btn:hover{
background-color: rgba(243, 239, 231, 100);
.view-btn:hover {
background-color: rgb(216, 238, 248);
transform: translateY(-1px);
}
@ -1143,4 +1170,108 @@ export default {
background-color: rgba(245, 108, 108, 0.1);
transform: translateY(-1px);
}
.submit-btn:hover {
background-color: rgb(253, 250, 232);
transform: translateY(-1px);
}
.publish-btn:hover {
background-color: rgb(253, 238, 228);
transform: translateY(-1px);
}
.offline-btn:hover {
background-color: rgb(237, 237, 235);
transform: translateY(-1px);
}
.cancel-btn:hover {
background-color: rgb(244, 237, 251);
transform: translateY(-1px);
}
.audit-btn:hover {
background-color: rgb(215, 223, 246);
transform: translateY(-1px);
}
// /
::v-deep .el-dialog {
border-radius: 12px;
overflow: hidden;
box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
animation: dialogFadeIn 0.3s ease;
}
::v-deep .el-dialog__header {
background: linear-gradient(135deg, #42b983 0%, #83df92 100%);
padding: 18px 24px;
border-bottom: none;
position: relative;
}
::v-deep .el-dialog__title {
font-size: 17px;
font-weight: 600;
color: white;
letter-spacing: 0.5px;
}
::v-deep .el-dialog__headerbtn:hover .el-dialog__close {
color: #ffd04b;
transform: rotate(90deg);
}
::v-deep .el-dialog__body {
padding: 28px 24px 20px;
background-color: #f8fafc;
max-height: 70vh;
overflow-y: auto;
}
::v-deep .el-form-item {
margin-bottom: 20px;
transition: all 0.3s;
}
::v-deep .el-form-item__label {
font-weight: 500;
color: #2d3748;
font-size: 14px;
transition: color 0.3s;
}
::v-deep .el-input,
::v-deep .el-textarea,
::v-deep .el-select {
width: 100%;
}
::v-deep .el-input__inner,
::v-deep .el-textarea__inner {
border-radius: 8px;
border: 1px solid #dcdfe6;
font-size: 14px;
transition: all 0.3s;
background-color: #fcfdfe;
}
::v-deep .el-input__inner:focus,
::v-deep .el-textarea__inner:focus {
border-color: #42B983;
box-shadow: 0 0 0 3px rgb(230, 255, 238);
background-color: white;
}
::v-deep .el-select .el-input__inner {
padding-right: 35px;
}
::v-deep .el-dialog__footer {
padding: 20px 24px;
background-color: #f8fafc;
border-top: 1px solid #eef2f7;
border-radius: 0 0 12px 12px;
}
</style>

1
chenhai-ui/vue.config.js

@ -15,6 +15,7 @@ const baseUrl = // 后端接口
// 'http://192.168.101.109:8080'
// 'http://192.168.101.111:8081'
const port = process.env.port || process.env.npm_config_port || 80 // 端口
// vue.config.js 配置说明

Loading…
Cancel
Save