|
@@ -28,16 +28,19 @@
|
|
|
<view class="cf-appraise-view" v-if="isEdit">
|
|
|
<view class="cf-appraise-view-text">{{info.text}}</view>
|
|
|
<view class="cf-appraise-view-imgs">
|
|
|
- <image mode="heightFix" :src="item" v-for="(item,index) in info.imgList" :key="index" />
|
|
|
+ <uni-file-picker readonly :value="info.imgList" file-mediatype="image">
|
|
|
+ </uni-file-picker>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="cf-appraise-edit" v-else>
|
|
|
<view class="cf-appraise-edit-textarea">
|
|
|
- <textarea v-model="info.text" class="textarea" :disabled="false" placeholder-style="color:#B3B5B9"
|
|
|
- maxlength="-1" placeholder="展开说说您对“中医用药一件事”的想法吧..." />
|
|
|
+ <!-- <textarea v-model="info.text" class="textarea" :disabled="false" placeholder-style="color:#B3B5B9"
|
|
|
+ maxlength="-1" placeholder="展开说说您对“中医用药一件事”的想法吧..." /> -->
|
|
|
+ <uni-easyinput class="pub-input" :inputBorder="false" autoHeight trim="all" :adjust-position="false"
|
|
|
+ type="textarea" maxlength="-1" v-model="info.text" placeholder="展开说说您对“中医用药一件事”的想法吧..."></uni-easyinput>
|
|
|
</view>
|
|
|
<!-- 最多三张 -->
|
|
|
- <view class="picture-item" v-if="true">
|
|
|
+ <view class="picture-item">
|
|
|
<uni-file-picker class="file-picker" limit="3" :auto-upload="false" :del-icon="true"
|
|
|
file-extname='png,git,jpeg,pdf,jpg' file-mediatype="image" v-model="fileList" @select="onSelectFile"
|
|
|
@delete="onDelFile">
|
|
@@ -46,12 +49,6 @@
|
|
|
</view>
|
|
|
</uni-file-picker>
|
|
|
</view>
|
|
|
- <view class="echoPicture" v-else>
|
|
|
- <view v-for="item in fileList" :key="item" class="loop-item">
|
|
|
- {{ item }}
|
|
|
- <image class="image-sty" :src="item"></image>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
|
|
|
</view>
|
|
|
<view class="cf-appraise-anonymous">
|
|
@@ -66,7 +63,7 @@
|
|
|
</view>
|
|
|
</template>
|
|
|
<script lang="ts" setup>
|
|
|
- import { ref, PropType,watch } from 'vue'
|
|
|
+ import { ref, PropType, watch } from 'vue'
|
|
|
import dlg from '@/lib/dlg.ts'
|
|
|
import rest from '@/stores/rest'
|
|
|
|
|
@@ -88,7 +85,7 @@
|
|
|
default: false
|
|
|
}
|
|
|
})
|
|
|
-
|
|
|
+
|
|
|
|
|
|
const loaded = ref(false)
|
|
|
const starText = [
|
|
@@ -99,7 +96,7 @@
|
|
|
]
|
|
|
const info = ref({
|
|
|
starVal: [0, 0, 0, 0],
|
|
|
- comprehensiveVal: 1,
|
|
|
+ comprehensiveVal: 3,
|
|
|
text: '',
|
|
|
imgList: [],
|
|
|
anonymous: true
|
|
@@ -107,7 +104,6 @@
|
|
|
const fileList = ref([])//用于显示图片列表
|
|
|
const files = ref([]) //上传post
|
|
|
|
|
|
-
|
|
|
// 上传图片
|
|
|
const onSelectFile = async (res) => {
|
|
|
if (!res.tempFilePaths.length) return;
|
|
@@ -136,10 +132,12 @@
|
|
|
}
|
|
|
// 修改
|
|
|
const updateAnonymity = () => {
|
|
|
+ if (props.isEdit) return
|
|
|
info.value.anonymous = !info.value.anonymous
|
|
|
}
|
|
|
|
|
|
const onClickComprehensive = (val : number) => {
|
|
|
+ if (props.isEdit) return
|
|
|
info.value.comprehensiveVal = val
|
|
|
}
|
|
|
|
|
@@ -172,31 +170,31 @@
|
|
|
}
|
|
|
}
|
|
|
console.log("processedData", formData, files.value)
|
|
|
- await rest.post('/app-api/zyyp/prescription-evaluate/create',formData)
|
|
|
+ await rest.post('/app-api/zyyp/prescription-evaluate/create', formData)
|
|
|
dlg.success('操作成功')
|
|
|
emits('update');
|
|
|
}
|
|
|
-
|
|
|
- const getInfo = async()=> {
|
|
|
+
|
|
|
+ const getInfo = async () => {
|
|
|
info.value.comprehensiveVal = props.dataList.zhpj
|
|
|
- info.value.starVal = [props.dataList.jyxg,props.dataList.kfys,props.dataList.jyzl,props.dataList.wlfw]
|
|
|
+ info.value.starVal = [props.dataList.jyxg, props.dataList.kfys, props.dataList.jyzl, props.dataList.wlfw]
|
|
|
info.value.text = props.dataList.content
|
|
|
- info.value.imgList = props.dataList.imgList
|
|
|
+ info.value.imgList = props.dataList.imgList.map((item : string) => {
|
|
|
+ return { url: item }
|
|
|
+ })
|
|
|
info.value.anonymous = props.dataList.anonymity == 1 ? true : false
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
watch(() => props.isEdit, (newValue) => {
|
|
|
- // console.log("watch isEdit", newValue);
|
|
|
- if (newValue) {
|
|
|
- getInfo();
|
|
|
- }
|
|
|
+ if (newValue) {
|
|
|
+ getInfo();
|
|
|
+ }
|
|
|
}, { immediate: true });
|
|
|
-
|
|
|
+
|
|
|
watch(() => props.dataList, (newValue) => {
|
|
|
- // console.log("watch dataList", newValue);
|
|
|
- if (props.isEdit) {
|
|
|
- getInfo();
|
|
|
- }
|
|
|
+ if (props.isEdit) {
|
|
|
+ getInfo();
|
|
|
+ }
|
|
|
}, { immediate: true });
|
|
|
</script>
|
|
|
|
|
@@ -215,6 +213,7 @@
|
|
|
flex: 1;
|
|
|
box-sizing: border-box;
|
|
|
overflow-y: auto;
|
|
|
+ min-height: 100rpx;
|
|
|
|
|
|
.cf-appraise-top {
|
|
|
background: #fff;
|
|
@@ -274,10 +273,11 @@
|
|
|
|
|
|
.cf-appraise-view-imgs {
|
|
|
margin-top: 16rpx;
|
|
|
+
|
|
|
image {
|
|
|
|
|
|
- width: 200rpx;
|
|
|
- height: 200rpx;
|
|
|
+ width: 200rpx !important;
|
|
|
+ height: 200rpx !important;
|
|
|
border-radius: 8rpx;
|
|
|
|
|
|
&+image {
|
|
@@ -305,6 +305,24 @@
|
|
|
color: $uni-text-color-light !important;
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ :deep(.uni-easyinput__content-textarea) {
|
|
|
+ margin: 8rpx 0 4rpx;
|
|
|
+ height: 120rpx;
|
|
|
+ min-height: 120rpx;
|
|
|
+
|
|
|
+ .uni-easyinput__placeholder-class {
|
|
|
+ font-size: $uni-font-size-lg;
|
|
|
+ line-height: $uni-line-height-lg;
|
|
|
+ color: $uni-text-color-light;
|
|
|
+ }
|
|
|
+
|
|
|
+ .uni-textarea-textarea {
|
|
|
+ font-size: $uni-font-size-lg;
|
|
|
+ line-height: $uni-line-height-lg;
|
|
|
+ color: $uni-text-color;
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
.picture-item {
|