feat: 增加管理计划模板库接口和收藏功能接口,优化回访计划页面布局及搜索功能
This commit is contained in:
parent
76c1203731
commit
58401626a6
@ -1158,7 +1158,7 @@ const saveAddGroup = async () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.tabs-anchor {
|
.tabs-anchor {
|
||||||
height: 1px;
|
height: 2rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tab {
|
.tab {
|
||||||
@ -1166,7 +1166,7 @@ const saveAddGroup = async () => {
|
|||||||
text-align: center;
|
text-align: center;
|
||||||
height: 88rpx;
|
height: 88rpx;
|
||||||
line-height: 88rpx;
|
line-height: 88rpx;
|
||||||
font-size: 30rpx;
|
font-size: 32rpx;
|
||||||
color: #333;
|
color: #333;
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -118,7 +118,7 @@
|
|||||||
/>
|
/>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="fab" :style="{ bottom: `${floatingBottom}px` }" @click="add">
|
<view class="fab" :style="{ bottom: `${floatingBottom * 2}rpx` }" @click="add">
|
||||||
<uni-icons type="plusempty" size="24" color="#fff" />
|
<uni-icons type="plusempty" size="24" color="#fff" />
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
@ -1298,13 +1298,13 @@ watch(
|
|||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.wrap {
|
.wrap {
|
||||||
padding: 0 0 96px;
|
padding: 0 0 192rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.top {
|
.top {
|
||||||
background: #f5f6f8;
|
background: #f5f6f8;
|
||||||
padding: 10px 14px 8px;
|
padding: 20rpx 28rpx 16rpx;
|
||||||
border-bottom: 1px solid #f2f2f2;
|
border-bottom: 2rpx solid #f2f2f2;
|
||||||
}
|
}
|
||||||
.top-row {
|
.top-row {
|
||||||
display: flex;
|
display: flex;
|
||||||
@ -1316,17 +1316,17 @@ watch(
|
|||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
}
|
}
|
||||||
.checkbox {
|
.checkbox {
|
||||||
width: 18px;
|
width: 36rpx;
|
||||||
height: 18px;
|
height: 36rpx;
|
||||||
margin-right: 6px;
|
margin-right: 12rpx;
|
||||||
}
|
}
|
||||||
.my-text {
|
.my-text {
|
||||||
font-size: 13px;
|
font-size: 28rpx;
|
||||||
color: #333;
|
color: #333;
|
||||||
}
|
}
|
||||||
.status-scroll {
|
.status-scroll {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
margin-left: 10px;
|
margin-left: 20rpx;
|
||||||
}
|
}
|
||||||
.status-tabs {
|
.status-tabs {
|
||||||
display: flex;
|
display: flex;
|
||||||
@ -1334,10 +1334,10 @@ watch(
|
|||||||
}
|
}
|
||||||
.status-tab {
|
.status-tab {
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
padding: 8px 10px;
|
padding: 16rpx 20rpx;
|
||||||
font-size: 12px;
|
font-size: 26rpx;
|
||||||
border-radius: 6px;
|
border-radius: 12rpx;
|
||||||
margin-right: 8px;
|
margin-right: 16rpx;
|
||||||
background: #eaecef;
|
background: #eaecef;
|
||||||
color: #333;
|
color: #333;
|
||||||
}
|
}
|
||||||
@ -1347,43 +1347,43 @@ watch(
|
|||||||
}
|
}
|
||||||
.filter-btn {
|
.filter-btn {
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
padding-left: 10px;
|
padding-left: 20rpx;
|
||||||
}
|
}
|
||||||
.filter-icon {
|
.filter-icon {
|
||||||
width: 20px;
|
width: 40rpx;
|
||||||
height: 20px;
|
height: 40rpx;
|
||||||
}
|
}
|
||||||
.total {
|
.total {
|
||||||
margin-top: 6px;
|
margin-top: 12rpx;
|
||||||
font-size: 12px;
|
font-size: 26rpx;
|
||||||
color: #666;
|
color: #666;
|
||||||
}
|
}
|
||||||
.total-num {
|
.total-num {
|
||||||
color: #ff4d4f;
|
color: #ff4d4f;
|
||||||
margin: 0 4px;
|
margin: 0 8rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.list {
|
.list {
|
||||||
padding: 0 14px;
|
padding: 0 28rpx;
|
||||||
}
|
}
|
||||||
.card {
|
.card {
|
||||||
background: #fff;
|
background: #fff;
|
||||||
border-radius: 8px;
|
border-radius: 16rpx;
|
||||||
margin-top: 10px;
|
margin-top: 20rpx;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
.head {
|
.head {
|
||||||
padding: 12px 12px;
|
padding: 24rpx 24rpx;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
border-bottom: 1px solid #f2f2f2;
|
border-bottom: 2rpx solid #f2f2f2;
|
||||||
}
|
}
|
||||||
.date {
|
.date {
|
||||||
font-size: 13px;
|
font-size: 28rpx;
|
||||||
color: #666;
|
color: #666;
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
margin-right: 10px;
|
margin-right: 20rpx;
|
||||||
}
|
}
|
||||||
.date-val {
|
.date-val {
|
||||||
color: #333;
|
color: #333;
|
||||||
@ -1391,7 +1391,7 @@ watch(
|
|||||||
.executor {
|
.executor {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
text-align: right;
|
text-align: right;
|
||||||
font-size: 13px;
|
font-size: 28rpx;
|
||||||
color: #333;
|
color: #333;
|
||||||
}
|
}
|
||||||
.truncate {
|
.truncate {
|
||||||
@ -1400,7 +1400,7 @@ watch(
|
|||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
.body {
|
.body {
|
||||||
padding: 12px 12px;
|
padding: 24rpx 24rpx;
|
||||||
}
|
}
|
||||||
.title-row {
|
.title-row {
|
||||||
display: flex;
|
display: flex;
|
||||||
@ -1408,14 +1408,14 @@ watch(
|
|||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
}
|
}
|
||||||
.type {
|
.type {
|
||||||
font-size: 15px;
|
font-size: 32rpx;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
color: #1f1f1f;
|
color: #1f1f1f;
|
||||||
}
|
}
|
||||||
.status {
|
.status {
|
||||||
font-size: 12px;
|
font-size: 26rpx;
|
||||||
padding: 6px 10px;
|
padding: 12rpx 20rpx;
|
||||||
border-radius: 6px;
|
border-radius: 12rpx;
|
||||||
}
|
}
|
||||||
.st-processing {
|
.st-processing {
|
||||||
background: #ffe5e5;
|
background: #ffe5e5;
|
||||||
@ -1435,28 +1435,28 @@ watch(
|
|||||||
color: #666;
|
color: #666;
|
||||||
}
|
}
|
||||||
.content {
|
.content {
|
||||||
margin-top: 10px;
|
margin-top: 20rpx;
|
||||||
font-size: 13px;
|
font-size: 28rpx;
|
||||||
color: #666;
|
color: #666;
|
||||||
line-height: 18px;
|
line-height: 40rpx;
|
||||||
}
|
}
|
||||||
.send-content-wrapper {
|
.send-content-wrapper {
|
||||||
margin-top: 10px;
|
margin-top: 20rpx;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: flex-start;
|
align-items: flex-start;
|
||||||
gap: 10px;
|
gap: 20rpx;
|
||||||
}
|
}
|
||||||
.send-content-section {
|
.send-content-section {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
padding: 10px;
|
padding: 20rpx;
|
||||||
background: #f9f9f9;
|
background: #f9f9f9;
|
||||||
border-radius: 6px;
|
border-radius: 12rpx;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: flex-start;
|
align-items: flex-start;
|
||||||
gap: 10px;
|
gap: 20rpx;
|
||||||
}
|
}
|
||||||
.send-content-label {
|
.send-content-label {
|
||||||
font-size: 13px;
|
font-size: 28rpx;
|
||||||
color: #666;
|
color: #666;
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
@ -1467,13 +1467,13 @@ watch(
|
|||||||
min-width: 0;
|
min-width: 0;
|
||||||
}
|
}
|
||||||
.send-text {
|
.send-text {
|
||||||
font-size: 13px;
|
font-size: 28rpx;
|
||||||
color: #333;
|
color: #333;
|
||||||
line-height: 18px;
|
line-height: 40rpx;
|
||||||
word-break: break-word;
|
word-break: break-word;
|
||||||
}
|
}
|
||||||
.file-list {
|
.file-list {
|
||||||
margin-top: 6px;
|
margin-top: 12rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.file-list.no-send-text {
|
.file-list.no-send-text {
|
||||||
@ -1482,18 +1482,18 @@ watch(
|
|||||||
.file-item {
|
.file-item {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 6px;
|
gap: 12rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.file-item + .file-item {
|
.file-item + .file-item {
|
||||||
margin-top: 4px;
|
margin-top: 8rpx;
|
||||||
}
|
}
|
||||||
.file-icon {
|
.file-icon {
|
||||||
font-size: 14px;
|
font-size: 28rpx;
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
}
|
}
|
||||||
.file-name {
|
.file-name {
|
||||||
font-size: 12px;
|
font-size: 26rpx;
|
||||||
color: #0877f1;
|
color: #0877f1;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
@ -1511,47 +1511,47 @@ watch(
|
|||||||
color: #f59e0b;
|
color: #f59e0b;
|
||||||
}
|
}
|
||||||
.result {
|
.result {
|
||||||
margin-top: 10px;
|
margin-top: 20rpx;
|
||||||
font-size: 13px;
|
font-size: 28rpx;
|
||||||
color: #666;
|
color: #666;
|
||||||
}
|
}
|
||||||
.footer-row {
|
.footer-row {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
margin-top: 10px;
|
margin-top: 20rpx;
|
||||||
padding-top: 10px;
|
padding-top: 20rpx;
|
||||||
border-top: 1px solid #f2f2f2;
|
border-top: 2rpx solid #f2f2f2;
|
||||||
gap: 10px;
|
gap: 20rpx;
|
||||||
}
|
}
|
||||||
.footer {
|
.footer {
|
||||||
font-size: 12px;
|
font-size: 26rpx;
|
||||||
color: #999;
|
color: #999;
|
||||||
flex: 1;
|
flex: 1;
|
||||||
}
|
}
|
||||||
.footer-row .send-btn {
|
.footer-row .send-btn {
|
||||||
flex: 0 0 auto;
|
flex: 0 0 auto;
|
||||||
width: 60px;
|
width: 120rpx;
|
||||||
height: 28px;
|
height: 56rpx;
|
||||||
line-height: 28px;
|
line-height: 56rpx;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.card-actions {
|
.card-actions {
|
||||||
display: flex;
|
display: flex;
|
||||||
gap: 10px;
|
gap: 20rpx;
|
||||||
margin-top: 12px;
|
margin-top: 24rpx;
|
||||||
padding-top: 12px;
|
padding-top: 24rpx;
|
||||||
border-top: 1px solid #f2f2f2;
|
border-top: 2rpx solid #f2f2f2;
|
||||||
}
|
}
|
||||||
|
|
||||||
.action-btn {
|
.action-btn {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
height: 32px;
|
height: 64rpx;
|
||||||
line-height: 32px;
|
line-height: 64rpx;
|
||||||
border-radius: 6px;
|
border-radius: 12rpx;
|
||||||
font-size: 12px;
|
font-size: 26rpx;
|
||||||
border: none;
|
border: none;
|
||||||
background: #f5f6f8;
|
background: #f5f6f8;
|
||||||
color: #333;
|
color: #333;
|
||||||
@ -1568,7 +1568,7 @@ watch(
|
|||||||
|
|
||||||
.send-btn {
|
.send-btn {
|
||||||
flex: 0 0 auto;
|
flex: 0 0 auto;
|
||||||
width: 60px;
|
width: 120rpx;
|
||||||
background: #0877f1;
|
background: #0877f1;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
}
|
}
|
||||||
@ -1582,47 +1582,47 @@ watch(
|
|||||||
}
|
}
|
||||||
|
|
||||||
.empty {
|
.empty {
|
||||||
padding: 120px 0;
|
padding: 240rpx 0;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
color: #9aa0a6;
|
color: #9aa0a6;
|
||||||
font-size: 13px;
|
font-size: 28rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
.fab {
|
.fab {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
right: 16px;
|
right: 32rpx;
|
||||||
width: 52px;
|
width: 104rpx;
|
||||||
height: 52px;
|
height: 104rpx;
|
||||||
border-radius: 26px;
|
border-radius: 52rpx;
|
||||||
background: #0877f1;
|
background: #0877f1;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
box-shadow: 0 10px 18px rgba(79, 110, 247, 0.35);
|
box-shadow: 0 20rpx 36rpx rgba(79, 110, 247, 0.35);
|
||||||
z-index: 20;
|
z-index: 20;
|
||||||
}
|
}
|
||||||
|
|
||||||
.popup {
|
.popup {
|
||||||
background: #fff;
|
background: #fff;
|
||||||
border-top-left-radius: 10px;
|
border-top-left-radius: 20rpx;
|
||||||
border-top-right-radius: 10px;
|
border-top-right-radius: 20rpx;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
.popup-title {
|
.popup-title {
|
||||||
position: relative;
|
position: relative;
|
||||||
padding: 14px;
|
padding: 28rpx;
|
||||||
border-bottom: 1px solid #f0f0f0;
|
border-bottom: 2rpx solid #f0f0f0;
|
||||||
}
|
}
|
||||||
.popup-title-text {
|
.popup-title-text {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
font-size: 16px;
|
font-size: 34rpx;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
color: #333;
|
color: #333;
|
||||||
}
|
}
|
||||||
.popup-close {
|
.popup-close {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
right: 12px;
|
right: 24rpx;
|
||||||
top: 0;
|
top: 0;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
display: flex;
|
display: flex;
|
||||||
@ -1632,26 +1632,26 @@ watch(
|
|||||||
max-height: 70vh;
|
max-height: 70vh;
|
||||||
}
|
}
|
||||||
.section {
|
.section {
|
||||||
padding: 14px;
|
padding: 28rpx;
|
||||||
}
|
}
|
||||||
.section-title {
|
.section-title {
|
||||||
font-size: 14px;
|
font-size: 30rpx;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
color: #333;
|
color: #333;
|
||||||
margin-bottom: 10px;
|
margin-bottom: 20rpx;
|
||||||
}
|
}
|
||||||
.chip-wrap {
|
.chip-wrap {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
gap: 10px;
|
gap: 20rpx;
|
||||||
}
|
}
|
||||||
.chip {
|
.chip {
|
||||||
width: 110px;
|
width: 220rpx;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
padding: 8px 0;
|
padding: 16rpx 0;
|
||||||
border: 1px solid #e6e6e6;
|
border: 2rpx solid #e6e6e6;
|
||||||
border-radius: 8px;
|
border-radius: 16rpx;
|
||||||
font-size: 12px;
|
font-size: 26rpx;
|
||||||
color: #333;
|
color: #333;
|
||||||
}
|
}
|
||||||
.chip.active {
|
.chip.active {
|
||||||
@ -1660,18 +1660,18 @@ watch(
|
|||||||
color: #fff;
|
color: #fff;
|
||||||
}
|
}
|
||||||
.select-row {
|
.select-row {
|
||||||
height: 40px;
|
height: 80rpx;
|
||||||
border: 1px solid #e6e6e6;
|
border: 2rpx solid #e6e6e6;
|
||||||
border-radius: 8px;
|
border-radius: 16rpx;
|
||||||
padding: 0 10px;
|
padding: 0 20rpx;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
}
|
}
|
||||||
.select-text {
|
.select-text {
|
||||||
font-size: 12px;
|
font-size: 26rpx;
|
||||||
color: #333;
|
color: #333;
|
||||||
max-width: 250px;
|
max-width: 500rpx;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
@ -1682,16 +1682,16 @@ watch(
|
|||||||
.range-row {
|
.range-row {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 8px;
|
gap: 16rpx;
|
||||||
}
|
}
|
||||||
.range-pill {
|
.range-pill {
|
||||||
width: 110px;
|
width: 220rpx;
|
||||||
height: 40px;
|
height: 80rpx;
|
||||||
line-height: 40px;
|
line-height: 80rpx;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
border: 1px solid #e6e6e6;
|
border: 2rpx solid #e6e6e6;
|
||||||
border-radius: 8px;
|
border-radius: 16rpx;
|
||||||
font-size: 12px;
|
font-size: 26rpx;
|
||||||
color: #333;
|
color: #333;
|
||||||
}
|
}
|
||||||
.range-pill.muted {
|
.range-pill.muted {
|
||||||
@ -1701,19 +1701,19 @@ watch(
|
|||||||
color: #999;
|
color: #999;
|
||||||
}
|
}
|
||||||
.clear {
|
.clear {
|
||||||
padding: 6px;
|
padding: 12rpx;
|
||||||
}
|
}
|
||||||
.actions {
|
.actions {
|
||||||
padding: 12px 14px calc(12px + env(safe-area-inset-bottom));
|
padding: 24rpx 28rpx calc(24rpx + env(safe-area-inset-bottom));
|
||||||
display: flex;
|
display: flex;
|
||||||
gap: 12px;
|
gap: 24rpx;
|
||||||
}
|
}
|
||||||
.btn {
|
.btn {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
height: 44px;
|
height: 88rpx;
|
||||||
line-height: 44px;
|
line-height: 88rpx;
|
||||||
border-radius: 6px;
|
border-radius: 12rpx;
|
||||||
font-size: 15px;
|
font-size: 32rpx;
|
||||||
}
|
}
|
||||||
.btn::after {
|
.btn::after {
|
||||||
border: none;
|
border: none;
|
||||||
@ -1721,7 +1721,7 @@ watch(
|
|||||||
.btn.plain {
|
.btn.plain {
|
||||||
background: #fff;
|
background: #fff;
|
||||||
color: #0877f1;
|
color: #0877f1;
|
||||||
border: 1px solid #0877f1;
|
border: 2rpx solid #0877f1;
|
||||||
}
|
}
|
||||||
.btn.primary {
|
.btn.primary {
|
||||||
background: #0877f1;
|
background: #0877f1;
|
||||||
|
|||||||
@ -1,28 +1,67 @@
|
|||||||
<template>
|
<template>
|
||||||
<full-page :customScroll="list.length === 0" pageStyle="background:#fff">
|
<full-page customScroll pageStyle="background:#f4f5f7">
|
||||||
<view v-if="list.length === 0" class="h-full flex flex-col items-center justify-center">
|
<template #header>
|
||||||
<view v-if="loading" class="text-base text-center text-dark">加载中...</view>
|
<view class="search-bar">
|
||||||
<empty-data v-else text="暂无回访计划" />
|
<input
|
||||||
</view>
|
v-model="keyword"
|
||||||
<template v-else>
|
class="search-input"
|
||||||
<view v-for="(p, idx) in list" :key="p.id" class="item">
|
placeholder="搜索"
|
||||||
<view class="left">
|
confirm-type="search"
|
||||||
<view class="name-row">
|
@input="onSearchInput"
|
||||||
<view class="name">{{ p.planName }}</view>
|
@confirm="loadList"
|
||||||
<view v-if="p.planType === 'corp'" class="tag corp">机构</view>
|
/>
|
||||||
<view class="tag outline" @click.stop="preview(p)">详情</view>
|
|
||||||
</view>
|
|
||||||
<view class="desc">应用范围:{{ p.planDetail }}</view>
|
|
||||||
</view>
|
|
||||||
<view class="btn" @click="select(p)">选择</view>
|
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
<view class="template-page">
|
||||||
|
<scroll-view scroll-y class="category-panel">
|
||||||
|
<view
|
||||||
|
v-for="item in categoryList"
|
||||||
|
:key="item.viewType"
|
||||||
|
class="category-item"
|
||||||
|
:class="{ active: activeViewType === item.viewType }"
|
||||||
|
@click="changeCategory(item.viewType)"
|
||||||
|
>
|
||||||
|
<text class="category-text">{{ item.label }}</text>
|
||||||
|
</view>
|
||||||
|
</scroll-view>
|
||||||
|
|
||||||
|
<view class="content-panel">
|
||||||
|
<view v-if="loading" class="state-text">加载中...</view>
|
||||||
|
<empty-data v-else-if="list.length === 0" fullCenter :text="emptyText" />
|
||||||
|
<scroll-view v-else scroll-y class="list-scroll">
|
||||||
|
<view v-for="p in list" :key="p.id" class="template-card">
|
||||||
|
<view class="card-header">
|
||||||
|
<view class="plan-name">{{ p.planName || '--' }}</view>
|
||||||
|
<view
|
||||||
|
v-if="canToggleFavorite(p)"
|
||||||
|
class="favorite-btn"
|
||||||
|
:class="{ collected: p.isFavorite }"
|
||||||
|
@click.stop="toggleFavorite(p)"
|
||||||
|
>
|
||||||
|
<uni-icons
|
||||||
|
class="favorite-icon"
|
||||||
|
:type="p.isFavorite ? 'star-filled' : 'star'"
|
||||||
|
size="18"
|
||||||
|
:color="p.isFavorite ? '#1f5cff' : '#667085'"
|
||||||
|
/>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="creator" v-if="getCreatorText(p)">{{ getCreatorText(p) }}</view>
|
||||||
|
<view class="card-footer">
|
||||||
|
<view class="task-link" @click.stop="preview(p)">任务详情 〉</view>
|
||||||
|
<view class="select-btn" @click="select(p)">选择</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</scroll-view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<view class="relative shadow-up bg-white">
|
<view class="footer">
|
||||||
<view class="p-15 text-center" @click="toService()">
|
<view class="service-entry" @click="toService">
|
||||||
<text class="mr-5 text-base text-gray">如没有符合的内容,请</text>
|
<text class="service-muted">如没有符合的内容,请</text>
|
||||||
<text class="text-base text-primary">联系客服</text>
|
<text class="service-link">联系客服</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
@ -38,20 +77,31 @@ import useAccountStore from '@/store/account';
|
|||||||
import { toast } from '@/utils/widget';
|
import { toast } from '@/utils/widget';
|
||||||
import { getTodoEventTypeLabel } from '@/utils/todo-const';
|
import { getTodoEventTypeLabel } from '@/utils/todo-const';
|
||||||
|
|
||||||
import EmptyData from "@/components/empty-data.vue";
|
import EmptyData from '@/components/empty-data.vue';
|
||||||
import fullPage from '@/components/full-page.vue';
|
import fullPage from '@/components/full-page.vue';
|
||||||
|
|
||||||
const archiveId = ref('');
|
const archiveId = ref('');
|
||||||
const loading = ref(false);
|
const loading = ref(false);
|
||||||
|
const keyword = ref('');
|
||||||
|
const activeViewType = ref('my');
|
||||||
|
const emptyText = ref('暂无回访计划');
|
||||||
const list = ref([]);
|
const list = ref([]);
|
||||||
|
const categoryList = ref([
|
||||||
|
{ label: '我的回访', viewType: 'my' },
|
||||||
|
{ label: '团队回访', viewType: 'team' },
|
||||||
|
{ label: '柚助手', viewType: 'doctorMiniapp' },
|
||||||
|
]);
|
||||||
|
|
||||||
|
let searchTimer = null;
|
||||||
|
|
||||||
const accountStore = useAccountStore();
|
const accountStore = useAccountStore();
|
||||||
const { account, doctorInfo } = storeToRefs(accountStore);
|
const { account, doctorInfo } = storeToRefs(accountStore);
|
||||||
const { getDoctorInfo } = accountStore;
|
const { getDoctorInfo } = accountStore;
|
||||||
|
|
||||||
onLoad((options) => {
|
onLoad(async (options) => {
|
||||||
archiveId.value = options?.archiveId ? String(options.archiveId) : '';
|
archiveId.value = options?.archiveId ? String(options.archiveId) : '';
|
||||||
|
await ensureDoctor();
|
||||||
|
buildCategoryList();
|
||||||
loadList();
|
loadList();
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -78,15 +128,36 @@ function getCorpId() {
|
|||||||
return String(t.corpId || a.corpId || d.corpId || '') || '';
|
return String(t.corpId || a.corpId || d.corpId || '') || '';
|
||||||
}
|
}
|
||||||
|
|
||||||
function getTeamId() {
|
function buildCategoryList() {
|
||||||
const t = uni.getStorageSync('ykt_case_current_team') || {};
|
const d = doctorInfo.value || {};
|
||||||
return String(t.teamId || '') || '';
|
const categories = [
|
||||||
|
{ label: '我的回访', viewType: 'my' },
|
||||||
|
{ label: '团队回访', viewType: 'team' },
|
||||||
|
];
|
||||||
|
if (d.hospitalId || d.hospitalName) {
|
||||||
|
categories.push({
|
||||||
|
label: String(d.hospitalName || '第一执业点'),
|
||||||
|
viewType: 'firstHospital',
|
||||||
|
});
|
||||||
|
}
|
||||||
|
if (d.secondPracticeHospitalId || d.secondPracticeHospitalName) {
|
||||||
|
categories.push({
|
||||||
|
label: String(d.secondPracticeHospitalName || '第二执业点'),
|
||||||
|
viewType: 'secondHospital',
|
||||||
|
});
|
||||||
|
}
|
||||||
|
categories.push({ label: '柚助手', viewType: 'doctorMiniapp' });
|
||||||
|
categoryList.value = categories;
|
||||||
|
if (!categories.some((item) => item.viewType === activeViewType.value)) {
|
||||||
|
activeViewType.value = categories[0]?.viewType || 'my';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function normalizePlan(raw) {
|
function normalizePlan(raw) {
|
||||||
if (!raw || typeof raw !== 'object') return null;
|
if (!raw || typeof raw !== 'object') return null;
|
||||||
const id = String(raw.planId || raw._id || '');
|
const id = String(raw._id || raw.planId || '');
|
||||||
if (!id) return null;
|
if (!id) return null;
|
||||||
|
const planId = String(raw.planId || raw._id || '');
|
||||||
const taskList = Array.isArray(raw.taskList) ? raw.taskList : [];
|
const taskList = Array.isArray(raw.taskList) ? raw.taskList : [];
|
||||||
const first = taskList[0] && typeof taskList[0] === 'object' ? taskList[0] : {};
|
const first = taskList[0] && typeof taskList[0] === 'object' ? taskList[0] : {};
|
||||||
const eventType = String(first.eventType || '');
|
const eventType = String(first.eventType || '');
|
||||||
@ -94,6 +165,10 @@ function normalizePlan(raw) {
|
|||||||
return {
|
return {
|
||||||
...raw,
|
...raw,
|
||||||
id,
|
id,
|
||||||
|
_id: String(raw._id || id),
|
||||||
|
planId,
|
||||||
|
sourceTemplateId: String(raw.sourceTemplateId || raw._id || id),
|
||||||
|
sourceTemplatePlanId: String(raw.sourceTemplatePlanId || planId),
|
||||||
planName: String(raw.planName || ''),
|
planName: String(raw.planName || ''),
|
||||||
planType: String(raw.planType || ''),
|
planType: String(raw.planType || ''),
|
||||||
planDetail: String(raw.planDetail || ''),
|
planDetail: String(raw.planDetail || ''),
|
||||||
@ -102,13 +177,16 @@ function normalizePlan(raw) {
|
|||||||
taskContent,
|
taskContent,
|
||||||
taskCount: taskList.length,
|
taskCount: taskList.length,
|
||||||
taskList,
|
taskList,
|
||||||
|
isFavorite: Boolean(raw.isFavorite),
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
function toService() {
|
function unwrapLibraryData(res) {
|
||||||
uni.navigateTo({
|
const data = res?.data;
|
||||||
url: '/pages/work/service/contact-service'
|
if (data && typeof data === 'object' && data.data && typeof data.data === 'object') {
|
||||||
})
|
return data.data;
|
||||||
|
}
|
||||||
|
return data && typeof data === 'object' ? data : {};
|
||||||
}
|
}
|
||||||
|
|
||||||
async function loadList() {
|
async function loadList() {
|
||||||
@ -116,19 +194,19 @@ async function loadList() {
|
|||||||
loading.value = true;
|
loading.value = true;
|
||||||
try {
|
try {
|
||||||
await ensureDoctor();
|
await ensureDoctor();
|
||||||
|
buildCategoryList();
|
||||||
const corpId = getCorpId();
|
const corpId = getCorpId();
|
||||||
const userId = getUserId();
|
const userId = getUserId();
|
||||||
const teamId = getTeamId();
|
if (!corpId || !userId) {
|
||||||
if (!corpId || !userId || !teamId) {
|
|
||||||
list.value = [];
|
list.value = [];
|
||||||
toast('缺少用户/团队信息');
|
toast('缺少用户信息');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const res = await api('getManagementPlan', {
|
const res = await api('getMyManagementPlanTemplateLibrary', {
|
||||||
corpId,
|
corpId,
|
||||||
userId,
|
userId,
|
||||||
planType: 'team',
|
viewType: activeViewType.value,
|
||||||
teamId,
|
keyword: keyword.value.trim(),
|
||||||
page: 1,
|
page: 1,
|
||||||
pageSize: 999,
|
pageSize: 999,
|
||||||
});
|
});
|
||||||
@ -137,13 +215,72 @@ async function loadList() {
|
|||||||
toast(res?.message || '获取回访计划失败');
|
toast(res?.message || '获取回访计划失败');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const arr = Array.isArray(res.data) ? res.data : [];
|
const payload = unwrapLibraryData(res);
|
||||||
list.value = arr.filter((p) => p && p.planStatus === true).map(normalizePlan).filter(Boolean);
|
const arr = Array.isArray(payload.list) ? payload.list : [];
|
||||||
|
list.value = arr.map(normalizePlan).filter(Boolean);
|
||||||
|
emptyText.value = payload.emptyState || '暂无回访计划';
|
||||||
} finally {
|
} finally {
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function changeCategory(viewType) {
|
||||||
|
if (activeViewType.value === viewType) return;
|
||||||
|
activeViewType.value = viewType;
|
||||||
|
list.value = [];
|
||||||
|
loadList();
|
||||||
|
}
|
||||||
|
|
||||||
|
function onSearchInput() {
|
||||||
|
if (searchTimer) clearTimeout(searchTimer);
|
||||||
|
searchTimer = setTimeout(() => {
|
||||||
|
loadList();
|
||||||
|
}, 400);
|
||||||
|
}
|
||||||
|
|
||||||
|
function canToggleFavorite(plan) {
|
||||||
|
if (!plan || !plan._id) return false;
|
||||||
|
if (activeViewType.value !== 'my') return true;
|
||||||
|
return Boolean(plan.isFavorite);
|
||||||
|
}
|
||||||
|
|
||||||
|
async function toggleFavorite(plan) {
|
||||||
|
const corpId = getCorpId();
|
||||||
|
const userId = getUserId();
|
||||||
|
const managementPlanId = String(plan?._id || '');
|
||||||
|
if (!corpId || !userId || !managementPlanId) return toast('缺少收藏信息');
|
||||||
|
const res = await api('toggleMyFollowupFavorite', {
|
||||||
|
corpId,
|
||||||
|
userId,
|
||||||
|
managementPlanId,
|
||||||
|
});
|
||||||
|
if (!res?.success) return toast(res?.message || '操作失败');
|
||||||
|
toast(res.message || '操作成功');
|
||||||
|
loadList();
|
||||||
|
}
|
||||||
|
|
||||||
|
function getCreatorText(plan = {}) {
|
||||||
|
const signature = plan.creatorSignature && typeof plan.creatorSignature === 'object'
|
||||||
|
? plan.creatorSignature
|
||||||
|
: null;
|
||||||
|
if (signature?.type === 'institution') {
|
||||||
|
return signature.institution?.name || '';
|
||||||
|
}
|
||||||
|
if (signature?.type === 'department') {
|
||||||
|
return signature.department?.name || '';
|
||||||
|
}
|
||||||
|
if (signature?.type === 'personal') {
|
||||||
|
return signature.person?.userName || '';
|
||||||
|
}
|
||||||
|
return String(plan.createorName || plan.creatorName || plan.teamName || plan.teanName || plan.createor || '');
|
||||||
|
}
|
||||||
|
|
||||||
|
function toService() {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/pages/work/service/contact-service',
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
function select(plan) {
|
function select(plan) {
|
||||||
uni.setStorageSync('select-mamagement-plan', plan);
|
uni.setStorageSync('select-mamagement-plan', plan);
|
||||||
uni.navigateTo({ url: `/pages/case/plan-execute?archiveId=${encodeURIComponent(archiveId.value)}` });
|
uni.navigateTo({ url: `/pages/case/plan-execute?archiveId=${encodeURIComponent(archiveId.value)}` });
|
||||||
@ -156,97 +293,196 @@ function preview(plan) {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.scroll {
|
.search-bar {
|
||||||
height: 100vh;
|
padding: 14rpx 18rpx 12rpx;
|
||||||
|
background: #fff;
|
||||||
|
border-bottom: 1rpx solid #edf0f2;
|
||||||
}
|
}
|
||||||
|
|
||||||
.loading {
|
.search-input {
|
||||||
padding: 16px;
|
height: 68rpx;
|
||||||
font-size: 13px;
|
padding: 0 24rpx;
|
||||||
color: #9aa0a6;
|
border-radius: 12rpx;
|
||||||
|
background: #f3f5f8;
|
||||||
|
color: #111827;
|
||||||
|
font-size: 28rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.item {
|
.template-page {
|
||||||
|
height: 100%;
|
||||||
|
display: flex;
|
||||||
|
min-height: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.category-panel {
|
||||||
|
width: 210rpx;
|
||||||
|
height: 100%;
|
||||||
|
flex-shrink: 0;
|
||||||
|
background: #fbfcfe;
|
||||||
|
border-right: 1rpx solid #edf0f2;
|
||||||
|
}
|
||||||
|
|
||||||
|
.category-item {
|
||||||
|
position: relative;
|
||||||
|
min-height: 88rpx;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
padding: 12px 14px;
|
margin: 8rpx 10rpx;
|
||||||
border-bottom: 1px solid #f2f2f2;
|
padding: 14rpx 12rpx 14rpx 16rpx;
|
||||||
|
border-radius: 12rpx;
|
||||||
|
color: #374151;
|
||||||
|
font-size: 30rpx;
|
||||||
|
line-height: 40rpx;
|
||||||
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
|
|
||||||
.left {
|
.category-item.active {
|
||||||
|
color: #1667e8;
|
||||||
|
background: #eef5ff;
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
|
||||||
|
.category-item.active::before {
|
||||||
|
content: "";
|
||||||
|
position: absolute;
|
||||||
|
left: 0;
|
||||||
|
top: 18rpx;
|
||||||
|
bottom: 18rpx;
|
||||||
|
width: 6rpx;
|
||||||
|
border-radius: 999rpx;
|
||||||
|
background: #1667e8;
|
||||||
|
}
|
||||||
|
|
||||||
|
.category-text {
|
||||||
|
width: 100%;
|
||||||
|
overflow: hidden;
|
||||||
|
display: -webkit-box;
|
||||||
|
-webkit-line-clamp: 2;
|
||||||
|
-webkit-box-orient: vertical;
|
||||||
|
word-break: break-all;
|
||||||
|
}
|
||||||
|
|
||||||
|
.content-panel {
|
||||||
|
position: relative;
|
||||||
flex: 1;
|
flex: 1;
|
||||||
min-width: 0;
|
min-width: 0;
|
||||||
margin-right: 10px;
|
height: 100%;
|
||||||
|
background: #f5f6f8;
|
||||||
}
|
}
|
||||||
|
|
||||||
.name-row {
|
.list-scroll {
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.state-text {
|
||||||
|
height: 100%;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 8px;
|
|
||||||
margin-bottom: 6px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.name {
|
|
||||||
font-size: 14px;
|
|
||||||
font-weight: 600;
|
|
||||||
color: #333;
|
|
||||||
max-width: 220px;
|
|
||||||
overflow: hidden;
|
|
||||||
text-overflow: ellipsis;
|
|
||||||
white-space: nowrap;
|
|
||||||
}
|
|
||||||
|
|
||||||
.tag {
|
|
||||||
font-size: 12px;
|
|
||||||
padding: 4px 8px;
|
|
||||||
border-radius: 6px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.tag.corp {
|
|
||||||
background: #0877F1;
|
|
||||||
color: #fff;
|
|
||||||
}
|
|
||||||
|
|
||||||
.tag.outline {
|
|
||||||
border: 1px solid #0877F1;
|
|
||||||
color: #0877F1;
|
|
||||||
background: #fff;
|
|
||||||
}
|
|
||||||
|
|
||||||
.desc {
|
|
||||||
font-size: 12px;
|
|
||||||
color: #999;
|
|
||||||
overflow: hidden;
|
|
||||||
text-overflow: ellipsis;
|
|
||||||
white-space: nowrap;
|
|
||||||
}
|
|
||||||
|
|
||||||
.btn {
|
|
||||||
flex-shrink: 0;
|
|
||||||
padding: 8px 12px;
|
|
||||||
border-radius: 999px;
|
|
||||||
border: 1px solid #0877F1;
|
|
||||||
color: #0877F1;
|
|
||||||
font-size: 13px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.empty {
|
|
||||||
height: 100vh;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
|
color: #6b7280;
|
||||||
|
font-size: 30rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.empty-img {
|
.template-card {
|
||||||
width: 160px;
|
position: relative;
|
||||||
height: 160px;
|
margin: 16rpx 16rpx 0;
|
||||||
opacity: 0.9;
|
padding: 26rpx 24rpx 24rpx;
|
||||||
|
border: 1rpx solid #eef1f4;
|
||||||
|
border-radius: 14rpx;
|
||||||
|
background: #fff;
|
||||||
|
box-shadow: 0 4rpx 14rpx rgba(17, 24, 39, 0.04);
|
||||||
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
|
|
||||||
.empty-text {
|
.card-header {
|
||||||
margin-top: 10px;
|
display: flex;
|
||||||
font-size: 13px;
|
align-items: flex-start;
|
||||||
color: #9aa0a6;
|
gap: 16rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.plan-name {
|
||||||
|
flex: 1;
|
||||||
|
min-width: 0;
|
||||||
|
color: #111827;
|
||||||
|
font-size: 34rpx;
|
||||||
|
font-weight: 700;
|
||||||
|
line-height: 46rpx;
|
||||||
|
word-break: break-word;
|
||||||
|
}
|
||||||
|
|
||||||
|
.favorite-btn {
|
||||||
|
flex-shrink: 0;
|
||||||
|
width: 48rpx;
|
||||||
|
height: 48rpx;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: flex-end;
|
||||||
|
margin-left: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.favorite-icon {
|
||||||
|
font-size: 32rpx;
|
||||||
|
line-height: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.creator {
|
||||||
|
margin-top: 12rpx;
|
||||||
|
color: #6b7280;
|
||||||
|
font-size: 30rpx;
|
||||||
|
line-height: 40rpx;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
.task-link {
|
||||||
|
display: inline-flex;
|
||||||
|
color: #1667e8;
|
||||||
|
font-size: 30rpx;
|
||||||
|
line-height: 40rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-footer {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
gap: 18rpx;
|
||||||
|
margin-top: 20rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.select-btn {
|
||||||
|
flex-shrink: 0;
|
||||||
|
min-width: 76rpx;
|
||||||
|
height: 48rpx;
|
||||||
|
line-height: 46rpx;
|
||||||
|
padding: 0 18rpx;
|
||||||
|
border: 1rpx solid #1667e8;
|
||||||
|
border-radius: 999rpx;
|
||||||
|
color: #1667e8;
|
||||||
|
background: #fff;
|
||||||
|
font-size: 28rpx;
|
||||||
|
text-align: center;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
|
||||||
|
.footer {
|
||||||
|
position: relative;
|
||||||
|
background: #fff;
|
||||||
|
box-shadow: 0 -6rpx 18rpx rgba(15, 23, 42, 0.06);
|
||||||
|
}
|
||||||
|
|
||||||
|
.service-entry {
|
||||||
|
padding: 24rpx 30rpx;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.service-muted {
|
||||||
|
color: #6b7280;
|
||||||
|
font-size: 30rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.service-link {
|
||||||
|
color: #0877f1;
|
||||||
|
font-size: 30rpx;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@ -131,6 +131,8 @@ const urlsConfig = {
|
|||||||
executeManagementPlanTodo: 'executeManagementPlanTodo',
|
executeManagementPlanTodo: 'executeManagementPlanTodo',
|
||||||
getManagementPlan: 'getManagementPlan',
|
getManagementPlan: 'getManagementPlan',
|
||||||
getManagementPlanById: 'getManagementPlanById',
|
getManagementPlanById: 'getManagementPlanById',
|
||||||
|
getMyManagementPlanTemplateLibrary: 'getMyManagementPlanTemplateLibrary',
|
||||||
|
toggleMyFollowupFavorite: 'toggleMyFollowupFavorite',
|
||||||
getNextFollowUpTime: 'getNextFollowUpTime',
|
getNextFollowUpTime: 'getNextFollowUpTime',
|
||||||
// 服务记录相关接口
|
// 服务记录相关接口
|
||||||
getServiceRecord: 'getServiceRecord',
|
getServiceRecord: 'getServiceRecord',
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user