Commit d6bc8fa1 by 前端

图标

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