Commit d6bc8fa1 by 前端

图标

1 parent cf950e26
......@@ -2,7 +2,7 @@
* @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2024-04-08 11:28:48
* @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2024-04-09 16:26:16
* @LastEditTime: 2024-04-09 17:36:02
* @FilePath: \gl_tape\mixin\click.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
......@@ -12,6 +12,7 @@ import { mapMutations, mapState } from "vuex";
export default {
data() {
return {
tipVisible: false,
voicePath: "",
timer: null,
times: 0,
......@@ -34,6 +35,16 @@ export default {
},
methods: {
...mapMutations("audio", ["setAudioStart", "setAudioList", "setAudioEnd"]),
//关闭提示
tipCancel() {
this.times = 0;
this.tipVisible = false;
},
//结束提示
tipConfirm() {
this.times = 0;
this.tipVisible = false;
},
//检查缓存录音
checkVoice() {
const file = uni.$storage.get("storageFile");
......@@ -92,7 +103,7 @@ export default {
this.timer = setInterval(() => {
this.times++;
if (this.times >= this.timeout) {
console.log("弹框");
this.tipVisible = true;
}
if (this.times >= this.reaction + this.timeout) {
//结束接待
......
......@@ -2,97 +2,119 @@
* @Description:
* @Author: huyue
* @Date: 2024-04-08 11:30:30
* @LastEditors: huyue
* @LastEditTime: 2024-04-09 14:48:03
* @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2024-04-09 17:41:03
-->
<template>
<view class="detail-box">
<view class="nav-bar">
<view
class="back"
@click="back"
>
<uni-icons
type="left"
:size="32"
></uni-icons>
<view class="back" @click="back">
<uni-icons type="left" :size="32"></uni-icons>
</view>
</view>
<tool-box
:type="type"
@choose="choose"
@finish="open"
/>
<view :class="['view',{showView:id == 1}]">
<media_1 :views="mediaList" :penSwitch="type != 'preview' && drawStatus" />
<tool-box :type="type" @choose="choose" @finish="open" />
<view :class="['view', { showView: id == 1 }]">
<media_1
:views="mediaList"
:penSwitch="type != 'preview' && drawStatus"
/>
</view>
<view :class="['view',{showView:id == 2}]">
<media_2 :views="mediaList" :penSwitch="type != 'preview' && drawStatus" />
<view :class="['view', { showView: id == 2 }]">
<media_2
:views="mediaList"
:penSwitch="type != 'preview' && drawStatus"
/>
</view>
<view :class="['view',{showView:id == 3}]">
<media_3 :views="mediaList" :penSwitch="type != 'preview' && drawStatus" />
<view :class="['view', { showView: id == 3 }]">
<media_3
:views="mediaList"
:penSwitch="type != 'preview' && drawStatus"
/>
</view>
<view :class="['view',{showView:id == 4}]">
<media_4 :views="mediaList" :penSwitch="type != 'preview' && drawStatus" />
<view :class="['view', { showView: id == 4 }]">
<media_4
:views="mediaList"
:penSwitch="type != 'preview' && drawStatus"
/>
</view>
<view :class="['view',{showView:id == 5}]">
<media_5 :views="mediaList" :penSwitch="type != 'preview' && drawStatus" />
<view :class="['view', { showView: id == 5 }]">
<media_5
:views="mediaList"
:penSwitch="type != 'preview' && drawStatus"
/>
</view>
<view :class="['view',{showView:id == 6}]">
<view :class="['view', { showView: id == 6 }]">
<media_6 :views="mediaList" />
</view>
<pay-pop ref="pay"></pay-pop>
<view class="pen-box">
<glsx-image src="media" />
</view>
<MessageBox
v-if="tipVisible"
@cancel="tipCancel"
@confirm="tipConfirm"
content="系统检测到您在当前页面停留较久,是否仍在客户接待中?"
cancelBtnText="否"
confirmBtnText="是"
></MessageBox>
</view>
</template>
<script>
import payPop from './components/payPop.vue';
import ToolBox from './components/ToolBox.vue'
import payPop from "./components/payPop.vue";
import ToolBox from "./components/ToolBox.vue";
import myClick from "@/mixin/click";
import Media_1 from './components/Media_1.vue'
import Media_2 from './components/Media_2.vue'
import Media_3 from './components/Media_3.vue'
import Media_4 from './components/Media_4.vue'
import Media_5 from './components/Media_5.vue'
import Media_6 from './components/Media_6.vue'
import GlsxImage from '../../components/GlsxImage.vue';
import Media_1 from "./components/Media_1.vue";
import Media_2 from "./components/Media_2.vue";
import Media_3 from "./components/Media_3.vue";
import Media_4 from "./components/Media_4.vue";
import Media_5 from "./components/Media_5.vue";
import Media_6 from "./components/Media_6.vue";
import GlsxImage from "../../components/GlsxImage.vue";
export default {
components: { ToolBox, payPop, Media_1, Media_2, Media_3, Media_4, Media_5, Media_6, GlsxImage },
components: {
ToolBox,
payPop,
Media_1,
Media_2,
Media_3,
Media_4,
Media_5,
Media_6,
GlsxImage,
},
mixins: [myClick],
data () {
data() {
return {
type: 'preview',
id: '',
type: "preview",
id: "",
mediaList: [],
drawStatus:false
drawStatus: false,
};
},
onLoad (options) {
this.type = options.type
this.id = options.id
this.getFindSoureDetail(options.id)
onLoad(options) {
this.type = options.type;
this.id = options.id;
this.getFindSoureDetail(options.id);
},
methods: {
open () {
this.$refs.pay.show()
open() {
this.$refs.pay.show();
},
/**切换素材 */
choose (e) {
this.id = e.id
this.getFindSoureDetail(e.id)
choose(e) {
this.id = e.id;
this.getFindSoureDetail(e.id);
},
async getFindSoureDetail (id) {
async getFindSoureDetail(id) {
try {
this.mediaList = await uni.$api.commonApi.getFindSoureDetail({ id }) || []
} catch (error) {
}
this.mediaList =
(await uni.$api.commonApi.getFindSoureDetail({ id })) || [];
} catch (error) {}
},
back() {
uni.navigateBack();
},
back () {
uni.navigateBack()
}
},
};
</script>
......
......@@ -2,8 +2,8 @@
* @Description: 首页
* @Author: huyue
* @Date: 2024-04-07 14:39:40
* @LastEditors: huyue
* @LastEditTime: 2024-04-09 15:23:43
* @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2024-04-09 17:31:39
-->
<template>
<view class="container">
......@@ -68,6 +68,14 @@
content="直接点击素材可进行预览,若面向车辆主展示,请点击页面下方的「开始接待」"
confirmBtnText="预览"
></MessageBox>
<MessageBox
v-if="tipVisible"
@cancel="tipCancel"
@confirm="tipConfirm"
content="系统检测到您在当前页面停留较久,是否仍在客户接待中?"
cancelBtnText="否"
confirmBtnText="是"
></MessageBox>
</view>
</view>
</template>
......
......@@ -2,8 +2,8 @@
* @Description:
* @Author: huyue
* @Date: 2024-04-07 14:54:28
* @LastEditors: huyue
* @LastEditTime: 2024-04-09 13:51:17
* @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2024-04-09 17:41:18
-->
<template>
<view class="information-entry">
......@@ -11,42 +11,65 @@
>建议同步采集资源,若接待工作单一可在提单初期再进行补充。</view
>
<view class="information-box">
<view class="information-item" v-for="(item, index) in infoList" :key="item.title">
<view class="upload-img" v-if="item.imgUrl">
<image class="img" :src="item.imgUrl" mode="scaleToFill" />
<uni-icons class="upload-close" type="clear" :size="20" @click="close(index)"></uni-icons>
</view>
<view v-else class="icon" @tap="choose(index)">
<glsx-image class="icon-upload" src="detail/icon-upload.png" mode="scaleToFill"/>
</view>
<view class="information-title">{{item.title}} </view>
<view
class="information-item"
v-for="(item, index) in infoList"
:key="item.title"
>
<view class="upload-img" v-if="item.imgUrl">
<image class="img" :src="item.imgUrl" mode="scaleToFill" />
<uni-icons
class="upload-close"
type="clear"
:size="20"
@click="close(index)"
></uni-icons>
</view>
<view v-else class="icon" @tap="choose(index)">
<glsx-image
class="icon-upload"
src="detail/icon-upload.png"
mode="scaleToFill"
/>
</view>
<view class="information-title">{{ item.title }} </view>
</view>
</view>
<view class="information-done" @click="done()">完成接待</view>
<view class="information-done" @click="done()">完成接待</view>
<MessageBox
v-if="tipVisible"
@cancel="tipCancel"
@confirm="tipConfirm"
content="系统检测到您在当前页面停留较久,是否仍在客户接待中?"
cancelBtnText="否"
confirmBtnText="是"
></MessageBox>
</view>
</template>
<script>
import upload from "@/utils/ossUploadFile/uploadFile.js";
const INFO_LIST = [
{
id: 1,
title: '客户付款凭证',
},
{
id: 2,
{
id: 1,
title: "客户付款凭证",
},
{
id: 2,
title: '客户购车发票',
},
{
id: 3,
title: '客户延保合同',
}
]
title: "客户购车发票",
},
{
id: 3,
title: "客户延保合同",
},
];
import myClick from "@/mixin/click";
export default {
mixins: [myClick],
data() {
return {
infoList: INFO_LIST,
};
return {
infoList: INFO_LIST,
};
},
onLoad(options) {
const text = options.text;
......@@ -54,34 +77,38 @@ export default {
title: text,
});
},
methods: {
// 上传图
methods: {
// 上传图
choose(index) {
uni.chooseImage({
count: 1,
success: async (res) => {
// await upload(res.tempFilePath)
this.$set(this.infoList[index], 'imgUrl', await upload(res.tempFilePaths[0]));
// this.infoList[index].imgUrl = await upload(res.tempFilePaths[0])
console.log(this.infoList, '======')
success: async (res) => {
// await upload(res.tempFilePath)
this.$set(
this.infoList[index],
"imgUrl",
await upload(res.tempFilePaths[0])
);
// this.infoList[index].imgUrl = await upload(res.tempFilePaths[0])
console.log(this.infoList, "======");
},
fail: (err) => {
console.log(err);
},
});
},
// 删除图
close(index) {
this.$set(this.infoList[index], 'imgUrl')
}
},
// 删除图
close(index) {
this.$set(this.infoList[index], "imgUrl");
},
},
};
</script>
<style lang="scss" scoped>
.information-entry {
position: relative;
position: relative;
background-color: #fff;
height: 100vh;
height: 100vh;
.information-tips {
background: rgba(44, 102, 247, 0.1);
color: #2c66f7;
......@@ -89,67 +116,65 @@ export default {
font-size: 28rpx;
}
.information-box {
display: flex;
display: flex;
padding: 40rpx 80rpx;
.information-item {
display: flex;
flex-direction: column;
width: 264rpx;
margin-right: 48rpx;
.icon {
background-color: #f4f5f7;
border: 2rpx solid #eff0f2;
border-radius: 16rpx;
.icon-upload {
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
width: 128rpx;
height: 128rpx;
}
}
.icon, .upload-img {
position: relative;
width: 264rpx;
height: 264rpx;
}
.upload-img {
.img {
width: 100%;
height: 100%;
}
.upload-close {
position: absolute;
right: 0;
top: 0;
width: 40rpx;
height: 40rpx;
// transform: translate(50%, -50%);
// text-align: center;
// font-size: 36rpx;
// line-height: 40rpx;
// display: flex;
// align-items: center;
// justify-content: center;
// background-color: #3D3D3D;
// border-radius: 50%;
// color: #fff;
}
}
.information-title {
margin-top: 24rpx;
font-weight: 500;
font-size: 28rpx;
color: #222222;
letter-spacing: 0;
line-height: 48rpx;
text-align: center;
}
flex-direction: column;
width: 264rpx;
margin-right: 48rpx;
.icon {
background-color: #f4f5f7;
border: 2rpx solid #eff0f2;
border-radius: 16rpx;
.icon-upload {
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
width: 128rpx;
height: 128rpx;
}
}
.icon,
.upload-img {
position: relative;
width: 264rpx;
height: 264rpx;
}
.upload-img {
.img {
width: 100%;
height: 100%;
}
.upload-close {
position: absolute;
right: 0;
top: 0;
width: 40rpx;
height: 40rpx;
// transform: translate(50%, -50%);
// text-align: center;
// font-size: 36rpx;
// line-height: 40rpx;
// display: flex;
// align-items: center;
// justify-content: center;
// background-color: #3D3D3D;
// border-radius: 50%;
// color: #fff;
}
}
.information-title {
margin-top: 24rpx;
font-weight: 500;
font-size: 28rpx;
color: #222222;
letter-spacing: 0;
line-height: 48rpx;
text-align: center;
}
}
}
}
.information-done {
......
static/72.png

3.75 KB

static/96.png

5.62 KB

Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!