Commit 61353ef5 by cen

feat: 新增视频图片缓存组件,新增评估单管理

1 parent 6e85274c
......@@ -75,3 +75,92 @@
-webkit-flex-wrap: wrap;
flex-wrap: wrap;
}
.fs-14 {
font-size: toRpx(14);
}
.fs-32 {
font-size: toRpx(32);
}
.fs-26 {
font-size: toRpx(26);
}
.fs-34 {
font-size: toRpx(34);
}
.fw-5 {
font-weight: 500;
}
.fw-7 {
font-weight: 700;
}
.fs-13 {
font-size: toRpx(13);
}
.mr-12 {
margin-right: toRpx(12);
}
.mr-24 {
margin-right: toRpx(24);
}
.mr-8 {
margin-right: toRpx(8);
}
.ml-8 {
margin-left: toRpx(8);
}
.ml-12 {
margin-left: toRpx(12);
}
.mt-12 {
margin-top: toRpx(12);
}
.mt-24 {
margin-top: toRpx(24);
}
.mt-32 {
margin-top: toRpx(32);
}
.mt-20 {
margin-top: toRpx(20);
}
.mb-12 {
margin-bottom: toRpx(12);
}
.mb-20 {
margin-bottom: toRpx(20);
}
.my-16 {
margin: toRpx(16) 0;
}
.py-8 {
padding: toRpx(8) 0;
}
.py-16 {
padding: toRpx(16) 0;
}
.pt-32 {
padding-top: toRpx(32) !important;
}
.px-48 {
padding: 0 toRpx(48);
}
.pt-6 {
padding-top: toRpx(6);
}
.pt-8 {
padding-top: toRpx(8);
}
.pt-16 {
padding-top: toRpx(16);
}
.pt-20 {
padding-top: toRpx(20);
}
.pt-12 {
padding-top: toRpx(12);
}
.flex-1 {
flex: 1;
}
<template>
<view class="entrance-container">
<view class="entrance-list">
<view
class="entrance-item"
v-for="(item, index) in entranceList"
:key="index"
@click="handleClick(item)"
>
<view class="entrance-item" v-for="(item, index) in entranceList" :key="index" @click="handleClick(item)">
<view :class="['sprite-icon', `icon-${item.icon}`]"></view>
<view class="entrance-name">{{ item.label }}</view>
</view>
......@@ -39,6 +34,11 @@ export default {
icon: 'order-management',
label: '工单列表',
name: 'OrderManagement'
},
{
icon: 'order-management',
label: '评价表单',
name: 'EvaluationFormList'
}
]
}
......@@ -83,4 +83,4 @@ export default {
margin-top: toRpx(22);
}
}
</style>
\ No newline at end of file
</style>
// mediaResourceMixin.js - 提供预加载功能的mixin
import mediaResourceManager from '../utils/mediaResourceManager/mediaResourceManager.js'
export default {
methods: {
/**
* 预加载资源
* @param {string|string[]} urls - 资源URL或URL数组
* @param {number} maxConcurrent - 最大并发数
* @returns {Promise<Array<{url: string, success: boolean, result: any}>>}
*/
async preloadMediaResources(urls, maxConcurrent = 3) {
const urlList = Array.isArray(urls) ? urls : [urls]
return await mediaResourceManager.preloadResources(urlList, maxConcurrent)
},
/**
* 获取单个资源(支持优先级控制)
* @param {string} url - 资源URL
* @param {boolean} immediate - 是否立即获取(高优先级)
* @returns {Promise<string>} - 本地资源路径
*/
async getMediaResource(url, immediate = false) {
return await mediaResourceManager.getResource(url, immediate)
},
/**
* 检查资源是否已缓存
* @param {string} url - 资源URL
* @returns {boolean} - 是否已缓存
*/
hasMediaResourceCached(url) {
return mediaResourceManager.hasValidCache(url)
},
/**
* 清理过期的媒体资源缓存
* @returns {number} - 清理的资源数量
*/
cleanupExpiredMediaResources() {
return mediaResourceManager.cleanupExpired()
}
}
}
{
"easycom": {
"^u-(.*)": "@/uview-ui/components/u-$1/u-$1.vue"
},
"pages": [
{
"path": "pages/common/loading",
"style": {
"navigationStyle": "custom"
}
},
{
"path": "pages/common/login",
"style": {
"navigationStyle": "custom"
}
},
{
"path": "pages/equity/index",
"style": {
"navigationStyle": "custom",
"disableSwipeBack": true
}
},
{
"path": "pages/equity/detail/detail",
"style": {
"navigationStyle": "custom",
"onReachBottonDistance": 50,
"disableSwipeBack": true
}
},
{
"path": "pages/common/nothing",
"style": {
"navigationBarTitleText": "提示"
}
},
{
"path": "pages/common/accountItems",
"style": {
"navigationStyle": "custom",
"navigationBarTitleText": "选择账号"
}
},
{
"path": "pages/boutique/index",
"style": {
"navigationStyle": "custom",
"disableSwipeBack": true
}
},
{
"path": "pages/boutique/invitation",
"style": {
"navigationStyle": "custom",
"disableSwipeBack": true
}
},
{
"path": "pages/boutique/case",
"style": {
"navigationStyle": "custom",
"disableSwipeBack": true
}
},
{
"path": "pages/boutique/history",
"style": {
"navigationStyle": "custom",
"disableSwipeBack": true
}
},
{
"path": "pages/boutique/preview",
"style": {
"navigationStyle": "custom",
"disableSwipeBack": true
}
},
{
"path": "pages/common/imgPreview",
"style": {
"navigationStyle": "custom",
"disableSwipeBack": true
}
},
{
"path": "uni_modules/uni-upgrade-center-app/pages/upgrade-popup",
"style": {
"disableScroll": true,
"app-plus": {
"backgroundColorTop": "transparent",
"background": "transparent",
"titleNView": false,
"scrollIndicator": false,
"popGesture": "none",
"animationType": "fade-in",
"animationDuration": 200
}
}
},
{
"path": "pages/common/webview"
},
{
"path": "pages/common/aiWebview",
"style": {
"navigationStyle": "custom"
}
},
{
"path": "pages/common/msgwebview"
},
{
"path": "pages/common/customerDetail",
"style": {
"navigationStyle": "custom"
}
},
{
"path": "pages/common/caseDetail",
"style": {
"navigationStyle": "custom"
}
},
{
"path": "pages/common/messageDetail",
"style": {
"navigationStyle": "custom"
}
},
{
"path": "pages/common/earlyWarnDetail",
"style": {
"navigationStyle": "custom"
}
},
{
"path": "pages/common/messageList",
"style": {
"navigationStyle": "custom"
}
},
{
"path": "pages/common/systemDetail",
"style": {
"navigationStyle": "custom"
}
},
{
"path": "pages/common/receptionDetail/index",
"style": {
"navigationStyle": "custom"
}
},
{
"path": "pages/common/studyDetail/longCourse",
"style": {
"navigationStyle": "custom"
}
},
{
"path": "pages/common/studyDetail/shortCourse",
"style": {
"navigationStyle": "custom"
}
},
{
"path": "pages/common/studyDetail/detail",
"style": {
"navigationStyle": "custom"
}
},
{
"path": "pages/common/serviceDetail/index",
"style": {
"navigationStyle": "custom"
}
},
{
"path": "pages/common/materialDetail/index",
"style": {
"navigationStyle": "custom"
}
},
{
"path": "pages/boutique/tool/index",
"style": {
"navigationStyle": "custom"
}
}
],
"globalStyle": {
"navigationBarTextStyle": "black",
"navigationBarTitleText": "展业助手",
"navigationBarBackgroundColor": "#F8F8F8",
"backgroundColor": "#F8F8F8",
"pageOrientation": "landscape",
"app-plus": {
"bounce": "none"
},
"rpxCalcMaxDeviceWidth": 375,
"rpxCalcBaseDeviceWidth": 375,
"rpxCalcIncludeWidth": 750
}
}
\ No newline at end of file
"easycom": {
"^u-(.*)": "@/uview-ui/components/u-$1/u-$1.vue"
},
"pages": [
{
"path": "pages/common/loading",
"style": {
"navigationStyle": "custom"
}
},
{
"path": "pages/common/login",
"style": {
"navigationStyle": "custom"
}
},
{
"path": "pages/equity/index",
"style": {
"navigationStyle": "custom",
"disableSwipeBack": true
}
},
{
"path": "pages/equity/detail/detail",
"style": {
"navigationStyle": "custom",
"onReachBottonDistance": 50,
"disableSwipeBack": true
}
},
{
"path": "pages/common/nothing",
"style": {
"navigationBarTitleText": "提示"
}
},
{
"path": "pages/common/accountItems",
"style": {
"navigationStyle": "custom",
"navigationBarTitleText": "选择账号"
}
},
{
"path": "pages/boutique/index",
"style": {
"navigationStyle": "custom",
"disableSwipeBack": true
}
},
{
"path": "pages/boutique/invitation",
"style": {
"navigationStyle": "custom",
"disableSwipeBack": true
}
},
{
"path": "pages/boutique/case",
"style": {
"navigationStyle": "custom",
"disableSwipeBack": true
}
},
{
"path": "pages/boutique/history",
"style": {
"navigationStyle": "custom",
"disableSwipeBack": true
}
},
{
"path": "pages/boutique/preview",
"style": {
"navigationStyle": "custom",
"disableSwipeBack": true
}
},
{
"path": "pages/common/imgPreview",
"style": {
"navigationStyle": "custom",
"disableSwipeBack": true
}
},
{
"path": "uni_modules/uni-upgrade-center-app/pages/upgrade-popup",
"style": {
"disableScroll": true,
"app-plus": {
"backgroundColorTop": "transparent",
"background": "transparent",
"titleNView": false,
"scrollIndicator": false,
"popGesture": "none",
"animationType": "fade-in",
"animationDuration": 200
}
}
},
{
"path": "pages/common/webview"
},
{
"path": "pages/common/aiWebview",
"style": {
"navigationStyle": "custom"
}
},
{
"path": "pages/common/msgwebview"
},
{
"path": "pages/common/customerDetail",
"style": {
"navigationStyle": "custom"
}
},
{
"path": "pages/common/caseDetail",
"style": {
"navigationStyle": "custom"
}
},
{
"path": "pages/common/messageDetail",
"style": {
"navigationStyle": "custom"
}
},
{
"path": "pages/common/earlyWarnDetail",
"style": {
"navigationStyle": "custom"
}
},
{
"path": "pages/common/messageList",
"style": {
"navigationStyle": "custom"
}
},
{
"path": "pages/common/systemDetail",
"style": {
"navigationStyle": "custom"
}
},
{
"path": "pages/common/receptionDetail/index",
"style": {
"navigationStyle": "custom"
}
},
{
"path": "pages/common/studyDetail/longCourse",
"style": {
"navigationStyle": "custom"
}
},
{
"path": "pages/common/studyDetail/shortCourse",
"style": {
"navigationStyle": "custom"
}
},
{
"path": "pages/common/studyDetail/detail",
"style": {
"navigationStyle": "custom"
}
},
{
"path": "pages/common/serviceDetail/index",
"style": {
"navigationStyle": "custom"
}
},
{
"path": "pages/common/materialDetail/index",
"style": {
"navigationStyle": "custom"
}
},
{
"path": "pages/boutique/tool/index",
"style": {
"navigationStyle": "custom"
}
},
{
"path": "pages/evaluationForm/index",
"style": {
"navigationStyle": "custom"
}
}
],
"globalStyle": {
"navigationBarTextStyle": "black",
"navigationBarTitleText": "展业助手",
"navigationBarBackgroundColor": "#F8F8F8",
"backgroundColor": "#F8F8F8",
"pageOrientation": "landscape",
"app-plus": {
"bounce": "none"
},
"rpxCalcMaxDeviceWidth": 375,
"rpxCalcBaseDeviceWidth": 375,
"rpxCalcIncludeWidth": 750
}
}
<template>
<view class="detail-box">
<view class="nav-bar">
<view
class="back"
@click="backPage"
>
<uni-icons
type="left"
:size="20"
color="#000"
></uni-icons>
<view class="back" @click="backPage">
<uni-icons type="left" :size="20" color="#000"></uni-icons>
</view>
<view class="title">展业工具</view>
</view>
......@@ -17,46 +10,20 @@
<view class="detail-left">
<view class="common-title">展业</view>
<view class="content">
<image
class="banner"
src="../../../assets/images/common/tool_banner.png"
mode="scaleToFill"
/>
<image class="banner" src="../../../assets/images/common/tool_banner.png" mode="scaleToFill" />
<template v-if="toolComponentName !== 'DailyReport'">
<Entrance @entranceClick="entranceClick"></Entrance>
</template>
<template v-else>
<uni-calendar
ref="calendar"
:clearDate="false"
:endDate="endDate"
:showMonth="false"
@monthSwitch="currentMonth = `${$event.year}-${$event.month}`"
@change="currentDate = $event.fulldate"
backgroundColor="transparent"
:selected="selectedDays"
:date="currentDate"
/>
<uni-calendar ref="calendar" :clearDate="false" :endDate="endDate" :showMonth="false" @monthSwitch="currentMonth = `${$event.year}-${$event.month}`" @change="currentDate = $event.fulldate" backgroundColor="transparent" :selected="selectedDays" :date="currentDate" />
</template>
</view>
</view>
<view class="detail-right">
<component
:is="toolComponentName"
@jump="jump"
:transmission-of-data="transmissionOfData"
:currentDate="currentDate"
:currentMonth="currentMonth"
@setCalendarSelected="selectedDays = $event"
/>
<component :is="toolComponentName" @jump="jump" :transmission-of-data="transmissionOfData" :currentDate="currentDate" :currentMonth="currentMonth" @setCalendarSelected="selectedDays = $event" />
</view>
</view>
<NoticePopup
ref="notice"
title="重要提示"
text="当前页面暂未保存,是否确认退出"
type="warning"
></NoticePopup>
<NoticePopup ref="notice" title="重要提示" text="当前页面暂未保存,是否确认退出" type="warning"></NoticePopup>
</view>
</template>
......@@ -86,7 +53,7 @@ export default {
UploadProofOfPayment,
OrderDetail
},
data () {
data() {
return {
toolComponentName: '',
transmissionOfData: null,
......@@ -96,7 +63,7 @@ export default {
selectedDays: []
}
},
onLoad (options) {
onLoad(options) {
if (options.componentName) this.toolComponentName = options.componentName
if (options.currentDate) this.currentDate = options.currentDate
uni.$on('jumpToDailyReport', currentDate => {
......@@ -105,7 +72,7 @@ export default {
})
},
methods: {
async entranceClick (item) {
async entranceClick(item) {
const noInterceptPage = ['DailyReport']
if (!noInterceptPage.includes(item.name) && ((await this.checkDailyReport()) || (await this.inspectionOfProhibitionBill()))) return
// 保存当前选择的组件信息,但不立即切换
......@@ -149,11 +116,11 @@ export default {
// 打开弹窗
this.$refs.notice.open()
},
backPage () {
backPage() {
uni.navigateBack()
},
// name:跳转组件名,val:跳转参数
jump (name, val) {
jump(name, val) {
this.toolComponentName = name
console.log(this.toolComponentName, val)
if (val) {
......
<template>
<div>
<MediaInfo :imageData="imageDatas" />
</div>
</template>
<script>
import MediaInfo from '../../components/MediaInfo'
import { fileSuibtype } from '@/pages/boutique/evaluationFormMap'
export default {
components: {
MediaInfo
},
data() {
return {
imageDatas: {
carImageList: [
{
id: 1,
url: 'https://img.58tg.com/up/allimg/4k/s/03/2309201256325P4-0-lp.jpg',
alt: fileSuibtype[11].name
},
{
id: 2,
url: 'https://img.58tg.com/up/allimg/4k/s/03/2309201256325P4-0-lp.jpg',
alt: fileSuibtype[12].name
}
],
carVideoList: [
{
id: 1,
url: 'https://img02.glsx.com.cn/weapp/resource/saas/video/car.mp4',
alt: fileSuibtype[32].name
},
{
id: 2,
url: 'https://img02.glsx.com.cn/weapp/resource/saas/video/car.mp4',
alt: fileSuibtype[32].name
}
]
}
}
}
}
</script>
<template>
<div class="button-module">
<button @click="handleClick" type="primary">查看详情</button>
</div>
</template>
<script>
import { method } from 'lodash'
export default {
name: 'ButtonModule',
props: {
mediaType: {
type: String,
default: 'image'
},
src: {
type: String,
default: ''
},
alt: {
type: String,
default: ''
},
controls: {
type: Boolean,
default: false
},
autoplay: {
type: Boolean,
default: false
},
loop: {
type: Boolean,
default: false
},
muted: {
type: Boolean,
default: true
}
},
data() {
return {
localUrl: this.src
}
},
methods: {
handleClick() {
this.$emit('jump', 'EvaluationFormDetails')
}
}
}
</script>
<style scoped lang="scss">
.button-module {
button {
width: 120px;
height: 30px;
}
}
</style>
<template>
<view>
<MediaInfo :imageInfo="imageData" />
</view>
</template>
<script>
import MediaInfo from './MediaInfo'
export default {
name: 'imageInfo',
components: {
MediaInfo
},
props: {
imageData: {
type: Object,
default: () => ({})
}
},
data() {
return {}
}
}
</script>
<style scoped lang="scss"></style>
<template>
<view>
<!-- 车辆图片 -->
<view>
<view v-for="item in imageData.carImageList" :key="item.id" @click="previewImage(item.url)" class="flex">
<view>{{ item.alt }}</view>
<MediaResource :src="item.url" media-type="image" class="car-image" />
</view>
</view>
<!-- 证件资料 -->
<!-- <view>
<view>
<view>左前45度</view>
<MediaResource v-for="item in mediaList" :key="item.id" :src="item.url" media-type="image" />
</view>
</view> -->
<!-- 车辆视频 -->
<view>
<view v-for="item in imageData.carVideoList" :key="item.id">
<view>{{ item.alt }}</view>
<MediaResource :src="item.url" media-type="video" />
</view>
</view>
</view>
</template>
<script>
import MediaResource from './MediaResource'
export default {
name: 'MediaInfo',
components: {
MediaResource
},
props: {
imageData: {
type: Object,
default: () => ({})
},
alt: {
type: String,
default: ''
}
},
data() {
return {}
},
methods: {
previewImage(url) {
console.log(url)
uni.previewImage({
urls: [url]
})
}
}
}
</script>
<style scoped lang="scss">
.car-image {
width: toRpx(360);
height: toRpx(260);
::v-deep uni-image {
width: 100%;
height: 100%;
}
}
</style>
<!-- MediaResource.vue -->
<template>
<div class="media-resource">
<image v-if="mediaType === 'image'" :src="localUrl" :alt="alt" v-bind="$attrs" @error="handleError" @load="handleLoad" />
<video v-else-if="mediaType === 'video'" :src="localUrl" :controls="controls" :autoplay="autoplay" :loop="loop" :muted="muted" v-bind="$attrs" @error="handleError" @loadeddata="handleLoad" />
<div v-if="loading" class="loading">
<div class="loading-spinner"></div>
<span>加载中...</span>
</div>
</div>
</template>
<script>
import mediaResourceManager from '@/utils/mediaResourceManager/mediaResourceManager.js'
export default {
name: 'MediaResource',
props: {
src: {
type: String,
required: true
},
mediaType: {
type: String,
default: 'image',
validator: value => ['image', 'video'].includes(value)
},
alt: {
type: String,
default: ''
},
controls: {
type: Boolean,
default: true
},
autoplay: {
type: Boolean,
default: false
},
loop: {
type: Boolean,
default: false
},
muted: {
type: Boolean,
default: false
},
// 高优先级加载
immediate: {
type: Boolean,
default: false
}
},
data() {
return {
localUrl: '',
loading: false
}
},
// 禁止自动继承属性,因为我们手动绑定 $attrs
inheritAttrs: false,
watch: {
src: {
handler(newSrc) {
console.log('src change', newSrc)
this.processResource(newSrc)
},
immediate: true
}
},
methods: {
async processResource(url) {
// 检查全局缓存中是否存在有效资源
const cached = mediaResourceManager.getCache(url)
if (cached) {
this.localUrl = cached.url
return
}
// 如果没有缓存,则下载资源
this.loading = true
try {
const localPath = await mediaResourceManager.getResource(url, this.immediate)
this.localUrl = localPath
} catch (error) {
console.error('资源获取失败:', error)
// 失败时回退到原始URL
this.localUrl = url
this.$emit('error', error)
} finally {
this.loading = false
}
},
handleError(event) {
this.loading = false
this.$emit('error', event)
},
handleLoad(event) {
this.loading = false
this.$emit('load', event)
}
}
}
</script>
<style scoped>
.loading {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
background: rgba(0, 0, 0, 0.7);
color: white;
padding: 10px 15px;
border-radius: 4px;
display: flex;
align-items: center;
gap: 8px;
}
.loading-spinner {
width: 20px;
height: 20px;
border: 2px solid #ffffff;
border-top: 2px solid transparent;
border-radius: 50%;
animation: spin 1s linear infinite;
}
@keyframes spin {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}
</style>
<template>
<view class="type-tab">
<view class="type-box">
<view class="tab-item" v-for="(i, index) in typeList" :key="index" @click="tabClick(index)">
<!-- <view
:class="['sprite-icon', tabClass(index)]"
:style="{
left: blockLeft
}"
></view> -->
<view class="text flex justify-center align-center" :class="[tabIndex == index ? `active` : '', tabClass(index)]">
<view>{{ i[nameKey] }}</view>
<view v-if="isShowCount" class="count ml-8">{{ i.count }}</view>
</view>
</view>
</view>
<view class="mask-box"></view>
</view>
</template>
<script type="text/ecmascript-6">
export default {
props: {
typeList: Array,
tabIndex: {
type: Number,
default: 0
},
nameKey: {
type: String,
default: 'tabName'
},
isShowCount: {
type: Boolean,
default: false
}
},
name: '',
data () {
return {
firstClass: Object.freeze(['first-nav', 'second-nav']),
}
},
computed: {
blockLeft () {
let { tabIndex } = this
return `${(tabIndex * 400) - (tabIndex == 0 ? 0 : 48)}rpx`
}
},
mounted () {
},
methods: {
tabClass (index) {
let className = ''
if (this.tabIndex == index) {
className = 'active icon-'
if (index == 0) className += 'first-nav'
else className += 'second-nav'
}
return className
},
tabClick (index) {
this.$emit('update:tabIndex', index)
this.$emit('tabClick',index)
}
}
}
</script>
<style scoped lang="scss">
.type-tab {
position: relative;
.type-box {
position: relative;
display: flex;
width: 100%;
background-color: #eef4fe;
height: toRpx(160);
line-height: toRpx(128);
border-radius: toRpx(48) toRpx(48) 0 0;
overflow: hidden;
z-index: 0;
.tab-item {
text-align: center;
font-weight: 400;
font-size: toRpx(32);
color: #1f2133;
padding: 0 toRpx(64);
.text {
position: relative;
text-align: center;
.count {
font-size: toRpx(24);
}
}
.active {
position: absolute;
top: 0;
z-index: -1;
font-weight: 700;
font-size: toRpx(32);
color: #2c66f7;
&::after {
content: '';
position: absolute;
bottom: 0;
left: 50%;
transform: translateX(-50%);
width: toRpx(48);
height: toRpx(8);
background-color: #2c66f7;
border-radius: toRpx(16);
}
}
.sprite-icon {
transition: left 0.15s;
}
}
}
.mask-box {
position: absolute;
height: 100vh;
width: 100%;
background: #fff;
left: 0;
top: toRpx(128);
border-radius: toRpx(48);
overflow: hidden;
}
}
</style>
<template>
<view class="search-box">
<view class="form">
<template v-for="(i, index) in formObject">
<view :class="['form-item', { active: focusIndex == index }]" :key="index">
<view class="form-item-box">
<template v-if="i.type == 'input'">
<input :type="i.inputType" :maxlength="i.maxlength" v-model="customerInfo[i.key]" class="input" :placeholder="i.placeholder" @focus="focusIndex = index" @blur="resetFocusIndex" />
</template>
<template v-else>
<view :class="['select flex', { placeholderStyle: !customerInfo[i.key] }]" @click="showPopup(i.popKey, index)">
<view class="value text-hide">{{ customerInfo[i.key] || i.placeholder }}</view>
<uni-icons class="arrow" type="right" :size="16"></uni-icons>
</view>
</template>
</view>
</view>
</template>
<template>
<view class="form-btn flex align-center">
<view class="btn search mr-12">搜索</view>
<view class="btn">重置</view>
</view>
</template>
</view>
</view>
</template>
<script>
export default {
name: 'searchBox',
data() {
return {
focusIndex: -1,
formObject: [
{
placeholder: '车主姓名',
key: 'carModel',
type: 'input',
popKey: 'carBrandListVisible'
},
{
placeholder: '车主电话',
key: 'carModel',
type: 'select',
popKey: 'carBrandListVisible'
},
{
placeholder: '车架号',
key: 'carModel',
type: 'select',
popKey: 'carBrandListVisible'
},
{
placeholder: '评估单号',
key: 'carModel',
type: 'select',
popKey: 'carBrandListVisible'
}
],
customerInfo: {}
}
},
methods: {
showError(key) {
let flag = !this.customerInfo[key]
if (key == 'phoneNumber' && this.customerInfo[key]) flag = !phoneRex.test(this.customerInfo[key])
return flag
},
showPopup(e, index) {
this.focusIndex = index
},
resetFocusIndex() {
this.focusIndex = -1
this.errorTip = false
}
}
}
</script>
<style scoped lang="scss">
.search-box {
position: relative;
width: 100%;
.form {
display: flex;
gap: 0 toRpx(24);
height: 100%;
&-item {
width: toRpx(424);
height: 100%;
position: relative;
&-box {
position: relative;
width: 100%;
height: 100%;
background: #ffffff;
border: toRpx(3) solid #a8c1ff;
border-radius: toRpx(16);
box-sizing: border-box;
padding: 0 toRpx(24);
z-index: 2;
.input,
.select {
width: 100%;
height: toRpx(72);
border: none !important;
outline: none;
font-size: toRpx(28);
color: #333333;
border-radius: toRpx(16);
box-sizing: border-box;
line-height: toRpx(80);
padding: 0 !important;
&::placeholder {
color: #999999;
}
}
.placeholderStyle {
color: #999999;
}
.arrow {
color: #999 !important;
margin-left: auto;
flex-shrink: 0;
}
}
}
.active {
&::after {
position: absolute;
left: toMinusRpx(2);
top: toMinusRpx(2);
width: calc(100% + #{toRpx(4)});
height: calc(100% + #{toRpx(6)});
content: '';
background-image: linear-gradient(#75bcff, #2f6af7);
box-shadow: 0 0 0 toRpx(8) #2c66f71a;
border-radius: toRpx(16);
}
}
.btn {
width: toRpx(120);
height: toRpx(72);
border-radius: toRpx(12);
font-size: toRpx(28);
font-weight: 400;
background: #f0f1f5;
text-align: center;
line-height: toRpx(76);
}
.search {
background: linear-gradient(0deg, #2c66f7 0%, #48a6ff 100%);
color: #ffffff;
}
}
}
</style>
//文件子类型
export const fileSuibtype = {
11: {
name: '左前45度',
type: 'image'
},
12: {
name: '主驾驶全景',
type: 'image'
},
13: {
name: '仪表盘',
type: 'image'
},
14: {
name: '后排座椅',
type: 'image'
},
15: {
name: '中控台全景',
type: 'image'
},
16: {
name: '右后45度',
type: 'image'
},
17: {
name: '铭牌',
type: 'image'
},
21: {
name: '行驶证',
type: 'image'
},
22: {
name: '登记证1',
type: 'image'
},
23: {
name: '登记证2',
type: 'image'
},
24: {
name: '登记证3',
type: 'image'
},
31: {
name: '发动机概况',
type: 'image'
},
32: {
name: '车况解说',
type: 'image'
},
41: {
name: '其他图片',
type: 'image'
},
42: {
name: '其他视频',
type: 'video'
}
}
<template>
<div class="evaluation-form-list">
<view class="nav-bar">
<view class="back" @click="backPage">
<uni-icons type="left" :size="20" color="#000"></uni-icons>
</view>
<view class="title">评估单管理</view>
</view>
<view class="detail-content">
<searchBox />
<view class="box-class mt-32">
<type-tab-component :typeList="typeList" :isShowCount="true" :tabIndex.sync="tabIndex"></type-tab-component>
<view :class="['right-content', `${tabIndex != 0 ? 'hide-record' : 'show-record'}`]">
<record-list @openRecordPage="openRecordPage" ref="recordListRef" :show="tabIndex == 0" />
</view>
<view :class="['right-content', `${tabIndex != 1 ? 'hide-record' : 'show-record'}`]">
<customer-file @showSuccess="$refs.successRef.open()" ref="customerFile" @editCustomer="editCustomer" :show="tabIndex == 1" />
</view>
</view>
</view>
</div>
</template>
<script>
import { data } from '../boutique/order_mixins'
import ButtonModule from './components/ButtonModule.vue'
import searchBox from './components/searchBox.vue'
import TypeTabComponent from './components/TypeTabComponent.vue'
export default {
name: 'EvaluationFormList',
components: {
ButtonModule,
searchBox,
TypeTabComponent
},
data() {
return {
tabIndex: 0,
typeList: Object.freeze([
{ tabName: '全部', count: 1 },
{ tabName: '评估中', count: 7 },
{ tabName: '已报价', count: 5 },
{ tabName: '已签约', count: 2 },
{ tabName: '已支付-定金', count: 0 },
{ tabName: '已支付-尾款', count: 0 },
{ tabName: '已完成', count: 0 },
{ tabName: '已驳回', count: 0 }
])
}
},
methods: {
jumpToDetails(type) {
this.$emit('jump', type)
},
backPage() {
uni.navigateBack()
}
}
}
</script>
<style scoped lang="scss">
.evaluation-form-list {
position: relative;
width: 100vw;
height: 100vh;
background-image: url('@/assets/images/common/page-bg.webp');
background-size: 100%;
padding: toRpx(160) toRpx(64) 0;
box-sizing: border-box;
.nav-bar {
position: fixed;
width: 100%;
height: toRpx(96);
left: 0;
top: toRpx(48);
z-index: 999;
pointer-events: none;
.back {
height: 100%;
aspect-ratio: 1/1;
display: flex;
align-items: center;
justify-content: center;
pointer-events: auto;
}
.title {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
font-weight: 700;
font-size: toRpx(32);
color: #1a1a1a;
}
}
.detail-content {
width: 100%;
height: calc(100vh - #{toRpx(212)});
.box-class {
height: 100%;
background: #ffffff59;
backdrop-filter: blur(toRpx(16));
box-shadow: inset 0 0 toRpx(16) 0 #ffffff;
border-radius: toRpx(48);
overflow: hidden;
}
}
}
</style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!