diff --git a/pages.json b/pages.json
index f88a976..2108c49 100644
--- a/pages.json
+++ b/pages.json
@@ -96,6 +96,13 @@
"disableScroll": true
}
},
+ {
+ "path": "survey-fill",
+ "style": {
+ "navigationBarTitleText": "问卷填写",
+ "disableScroll": true
+ }
+ },
{
"path": "survey-list",
"style": {
diff --git a/pages/case/components/archive-detail/health-profile-tab.vue b/pages/case/components/archive-detail/health-profile-tab.vue
index d7393ad..4afb775 100644
--- a/pages/case/components/archive-detail/health-profile-tab.vue
+++ b/pages/case/components/archive-detail/health-profile-tab.vue
@@ -30,39 +30,46 @@
{{ r.dateStr || '--' }}
- {{ r.tempName || '病历' }}
+ 问卷填写
+ {{ r.tempName || '病历' }}
外院
-
-
-
- {{ l.label }}
- {{ l.value }}
+
+
+ 患者填写了问卷《{{ r.surveryName || '--' }}》
+ ,评分结果{{ r.score }}分
+ 。
-
-
-
-
+
+
+
+
+
+ {{ l.label }}
+ {{ l.value }}
+
+
+
+
+
+
+ +{{ getFiles(r).length - 3 }}
- +{{ getFiles(r).length - 3 }}
-
-
+
+
+
暂无数据
-
+
@@ -100,9 +107,9 @@ const templateMap = computed(() => templates.value.reduce((m, t) => {
if (t?.templateType) m[String(t.templateType)] = t;
return m;
}, {}));
-const availableTypes = computed(() => (templates.value.length ? templates.value.map((i) => i.templateType) : FALLBACK_TEMPLATE_TYPES));
+const availableTypes = computed(() => (templates.value.length ? [...templates.value.map((i) => i.templateType), 'surveyFill'] : FALLBACK_TEMPLATE_TYPES));
-const typeRange = computed(() => [{ name: '全部', value: 'ALL' }, ...templates.value.map((t) => ({ name: t.name, value: t.templateType }))]);
+const typeRange = computed(() => [{ name: '全部', value: 'ALL' }, ...templates.value.map((t) => ({ name: t.name, value: t.templateType })), { name: '问卷填写', value: 'surveyFill' }]);
const currentType = ref({ name: '全部', value: 'ALL' });
const records = ref([]);
@@ -400,7 +407,7 @@ function toDateTimeStr(ts) {
async function refreshList() {
if (!props.archiveId) return;
-
+
const corpId = getCorpId();
if (!corpId) return;
await loadVisitTemplates();
@@ -409,20 +416,20 @@ async function refreshList() {
loading('加载中...');
try {
const params = { memberId: props.archiveId, corpId };
-
+
// 添加类型筛选
params.medicalType =
currentType.value.value === 'ALL' ? availableTypes.value : currentType.value.value;
-
+
// 添加时间筛选
if (Array.isArray(dateRange.value) && dateRange.value.length === 2 && dateRange.value[0] && dateRange.value[1]) {
params.startTime = dayjs(dateRange.value[0]).startOf('day').valueOf();
params.endTime = dayjs(dateRange.value[1]).endOf('day').valueOf();
}
-
+
const res = await api('getCustomerMedicalRecord', params);
hideLoading();
-
+
// 接口返回结构兼容:
// - { success, message, list: [] }
// - { success, message, data: { list: [] } }
@@ -434,9 +441,9 @@ async function refreshList() {
? res.data.data
: Array.isArray(res?.data?.data?.list)
? res.data.data.list
- : Array.isArray(res?.data)
- ? res.data
- : [];
+ : Array.isArray(res?.data)
+ ? res.data
+ : [];
if (list.length) {
const mapped = list.map((r) => {
const rawType = String(r?.medicalType || r?.templateType || '') || '';
@@ -643,6 +650,19 @@ async function onFabTap() {
}
function edit(record) {
+ if (record.medicalType === 'surveyFill') {
+ const {
+ corpId = '',
+ answerId = '',
+ surveryId = '',
+ memberId = '',
+ customer = ''
+ } = record;
+ const url = `/pages/message/survey-fill?corpId=${corpId}&answerId=${answerId}&surveryId=${surveryId}&memberId=${memberId}&customerName=${customer || ''}`
+ uni.navigateTo({
+ url
+ })
+ };
const type = String(record?.medicalType || record?.templateType || '') || '';
uni.navigateTo({
url: `/pages/case/visit-record-view?archiveId=${encodeURIComponent(props.archiveId)}&id=${encodeURIComponent(record._id)}&type=${encodeURIComponent(type)}`,
@@ -692,6 +712,7 @@ watch(
gap: 20rpx;
flex: 1;
}
+
.pill-text {
font-size: 26rpx;
color: #333;
@@ -700,12 +721,14 @@ watch(
text-overflow: ellipsis;
white-space: nowrap;
}
+
.pill-icons {
display: flex;
align-items: center;
gap: 12rpx;
flex-shrink: 0;
}
+
.pill-clear {
display: flex;
align-items: center;
@@ -715,6 +738,7 @@ watch(
.share-tip {
padding: 20rpx 28rpx 0;
}
+
.share-tip-text {
display: inline-block;
background: #eef2ff;
@@ -735,28 +759,34 @@ watch(
overflow: hidden;
box-shadow: 0 12rpx 28rpx rgba(0, 0, 0, 0.06);
}
+
.record {
padding: 0;
}
+
.record-head {
display: flex;
align-items: center;
padding: 24rpx 24rpx 20rpx;
gap: 16rpx;
}
+
.record-title {
font-size: 30rpx;
font-weight: 600;
color: #1f1f1f;
}
+
.record-date {
font-size: 28rpx;
font-weight: 600;
color: #333;
}
+
.record-body {
padding: 0 24rpx 24rpx;
}
+
.line {
display: flex;
padding-top: 20rpx;
@@ -764,10 +794,12 @@ watch(
color: #333;
line-height: 36rpx;
}
+
.line-label {
flex-shrink: 0;
color: #666;
}
+
.line-value {
flex: 1;
min-width: 0;
@@ -783,6 +815,7 @@ watch(
align-items: center;
flex-wrap: wrap;
}
+
.thumb {
width: 168rpx;
height: 128rpx;
@@ -791,14 +824,17 @@ watch(
background: #f3f4f6;
border: 2rpx solid #e5e7eb;
}
+
.thumb-img {
width: 168rpx;
height: 128rpx;
}
+
.thumb-more {
font-size: 24rpx;
color: #6b7280;
}
+
.record-foot {
display: flex;
align-items: center;
@@ -808,6 +844,7 @@ watch(
font-size: 24rpx;
color: #999;
}
+
.foot-left {
flex-shrink: 0;
margin-right: 20rpx;
@@ -819,21 +856,27 @@ watch(
padding: 8rpx 16rpx;
border-radius: 16rpx;
}
+
.bg-blue {
background: #0877F1;
}
+
.bg-amber {
background: #d97706;
}
+
.bg-teal {
background: #0f766e;
}
+
.bg-indigo {
background: #4f46e5;
}
+
.bg-green {
background: #16a34a;
}
+
.bg-rose {
background: #f43f5e;
}
@@ -852,6 +895,7 @@ watch(
height: 104rpx;
z-index: 20;
}
+
.fab {
width: 104rpx;
height: 104rpx;
@@ -862,6 +906,7 @@ watch(
justify-content: center;
box-shadow: 0 20rpx 36rpx rgba(79, 110, 247, 0.35);
}
+
.fab--disabled {
opacity: 0.5;
}
diff --git a/pages/message/components/message-types.vue b/pages/message/components/message-types.vue
index 12f229b..e46decd 100644
--- a/pages/message/components/message-types.vue
+++ b/pages/message/components/message-types.vue
@@ -48,7 +48,7 @@
-
+
{{ surveyData.title }}
{{ surveyData.desc }}
@@ -230,13 +230,25 @@ const handleArticleClick = (message) => {
// 处理问卷点击
const handleSurveyClick = (message) => {
- if (surveyData.value.url) {
- // 跳转到问卷填写页面或打开外部链接
- console.log("打开问卷:", surveyData.value.url);
- // uni.navigateTo({
- // url: `/pages/survey/fill?url=${encodeURIComponent(surveyData.value.url)}`
- // });
+ try {
+ const {
+ corpId = '',
+ answerId = '',
+ surveryId = '',
+ memberId = '',
+ name = ''
+ } = payloadData.value;
+ const url = `/pages/message/survey-fill?corpId=${corpId}&answerId=${answerId}&surveryId=${surveryId}&memberId=${memberId}&customerName=${name}`
+ uni.navigateTo({
+ url
+ })
+ } catch (e) {
+ console.log(e)
}
+ // uni.navigateTo({
+ // url: `/pages/survey/fill?url=${encodeURIComponent(surveyData.value.url)}`
+ // });
+ // }
};
function isWechatChannels(data) {
diff --git a/pages/message/components/survey-record.vue b/pages/message/components/survey-record.vue
new file mode 100644
index 0000000..8cbbae9
--- /dev/null
+++ b/pages/message/components/survey-record.vue
@@ -0,0 +1,93 @@
+
+
+ {{ surery.name }}
+
+ {{ surery.description }}
+
+
+
+ 当前得分:{{ allScore }}
+
+
+
+ 客户:{{ customerName }}
+
+
+
+
+
+
+ * {{ index + 1 }}、{{ quesiton.title }}
+
+
+
+
+
+ {{ opt.label }}
+
+ ( {{ opt.score }}分)
+
+
+
+
+
+
+ {{ quesiton.value || '未填写' }}
+
+
+
+
+
+
+
+
+
+
diff --git a/pages/message/survey-fill.vue b/pages/message/survey-fill.vue
new file mode 100644
index 0000000..6958566
--- /dev/null
+++ b/pages/message/survey-fill.vue
@@ -0,0 +1,220 @@
+
+
+
+
+
+ {{ emptyTxt }}
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/work/service/contact-service.vue b/pages/work/service/contact-service.vue
index 94b19e7..c9fb2d1 100644
--- a/pages/work/service/contact-service.vue
+++ b/pages/work/service/contact-service.vue
@@ -7,12 +7,12 @@
-
+
diff --git a/utils/api.js b/utils/api.js
index fcfbfb4..c24b5bd 100644
--- a/utils/api.js
+++ b/utils/api.js
@@ -63,7 +63,9 @@ const urlsConfig = {
getSurveyCateList: 'getSurveryCateList',
getSurveyList: 'getList',
createSurveyRecord: 'createRecord',
- getSurveyDetail: 'getDetail'
+ getSurveyDetail: 'getDetail',
+ getAnswer: 'getAnswer'
+
},
member: {
addCustomer: 'add',