From bf8d85d5f83c2036fb4239d764d33e99c1b62bd3 Mon Sep 17 00:00:00 2001
From: jiangping <jp@doumee.com>
Date: 星期五, 31 五月 2024 14:53:23 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
admin/src/views/business/visitorSources.vue | 125 ++++++++++++++++++++++++++++++++++++-----
1 files changed, 109 insertions(+), 16 deletions(-)
diff --git a/admin/src/views/business/visitorSources.vue b/admin/src/views/business/visitorSources.vue
index 6dfe77f..6833446 100644
--- a/admin/src/views/business/visitorSources.vue
+++ b/admin/src/views/business/visitorSources.vue
@@ -1,6 +1,13 @@
<template>
<div class="box">
<el-form :model="form" ref="form" label-width="140px">
+ <div><span style="font-size: 15px;font-weight: bold">浜哄憳鎺堟潈閰嶇疆锛�</span></div>
+ <el-form-item label="" prop="frezzDays" label-width="50px">
+ 浜哄憳闂ㄧ鎺堟潈鍐荤粨锛氳繛缁�
+ <el-input style="width: 50px;" type="text" v-model="form.frezzDays" placeholder="" v-trim/>
+ 澶╋紝鏃犻棬绂�/杞﹁締闂告満浜嬩欢
+ </el-form-item>
+ <div><span style="font-size: 15px;font-weight: bold">璁垮閰嶇疆锛�</span></div>
<el-form-item label="鏉ヨ棰勭害鏂瑰紡:" prop="reservationWay">
<el-radio-group v-model="form.reservationWay">
<el-radio :label="0">棰勭害鍏嶇櫥璁�</el-radio>
@@ -19,6 +26,15 @@
<el-radio :label="1">鏄�</el-radio>
</el-radio-group>
</el-form-item>
+ <el-form-item label="鍏佽鑷�夐棬绂佺粍:" prop="doorsVisitRequired">
+ <el-switch
+ v-model="form.doorsVisitRequired"
+ active-color="#13ce66"
+ inactive-color="#ff4949"
+ :active-value="1"
+ :inactive-value="0">
+ </el-switch>
+ </el-form-item>
<el-form-item label="璁垮鏄惁绛旈:" prop="isAnswer">
<el-switch
v-model="form.isAnswer"
@@ -29,10 +45,19 @@
</el-switch>
</el-form-item>
<el-form-item label="璁垮绛旈涓婚:" prop="theme">
- <el-input style="width: 50%;" v-model="form.theme" placeholder="璇疯緭鍏ョ瓟棰樻爣棰�" v-trim/>
+ <el-input style="width: 50%;" type="textarea" v-model="form.theme" placeholder="璇疯緭鍏ョ瓟棰樻爣棰�" v-trim/>
</el-form-item>
<el-form-item label="璁垮绛旈璇存槑:" prop="description">
<el-input style="width: 50%;" type="textarea" v-model="form.description" placeholder="璇疯緭鍏�" v-trim/>
+ </el-form-item>
+ <el-form-item label="鍏ュ巶椤荤煡:" prop="visitNotice">
+ <el-tiptap style="width: 50%;" v-model="form.visitNotice" :extensions="extensions" />
+ </el-form-item>
+ <el-form-item label="璁垮棰勭害鎸囧崡:" prop="visitNotice">
+ <el-tiptap style="width: 50%;" v-model="form.visitTips" :extensions="extensions" />
+ </el-form-item>
+ <el-form-item label="璁垮鍏ュ洯瀵艰鍥�:" prop="visitNotice">
+ <el-tiptap style="width: 50%;" v-model="form.visitMap" :extensions="extensions" />
</el-form-item>
<el-form-item>
<el-button type="primary" @click="submit">淇濆瓨閰嶇疆椤�</el-button>
@@ -43,6 +68,31 @@
<script>
import { getVisitConfigDTO, updateVisitConfig } from '@/api/system/common'
+import {
+ // necessary extensions
+ Doc,
+ Text,
+ Paragraph,
+ Heading,
+ Bold,
+ Underline,
+ Italic,
+ Strike,
+ ListItem,
+ BulletList,
+ OrderedList,
+ Image,
+ Blockquote,
+ TextAlign,
+ Indent,
+ Table,
+ TableHeader,
+ TableCell,
+ TableRow,
+ TextColor,
+ HorizontalRule
+} from 'element-tiptap'
+import { upload } from '@/api/system/common'
export default {
name: 'visitorSources',
@@ -54,9 +104,46 @@
reservationWay: 0,
healthCard: 0,
isAnswer: 0,
+ doorsVisitRequired: '',
theme: '',
- description: ''
- }
+ description: '',
+ visitNotice: '',
+ visitMap: '',
+ visitTips: '',
+ frezzDays: null
+ },
+ extensions: [
+ new Doc(),
+ new Text(),
+ new Paragraph(),
+ new Heading({ level: 5 }),
+ new Bold({ bubble: true }),
+ new Underline({ bubble: true, menubar: false }),
+ new Italic(),
+ new Strike(),
+ new ListItem(),
+ new BulletList(),
+ new OrderedList(),
+ new Image({
+ uploadRequest (file) {
+ const fd = new FormData()
+ fd.append('folder', 'visit/')
+ fd.append('file', file)
+ return upload(fd).then(res => {
+ return res.url
+ })
+ }
+ }),
+ new Blockquote(),
+ new TextAlign(),
+ new Indent(),
+ new Table(),
+ new TableHeader(),
+ new TableCell(),
+ new TableRow(),
+ new HorizontalRule(),
+ new TextColor()
+ ]
}
},
@@ -68,25 +155,32 @@
getData () {
getVisitConfigDTO({})
.then(res => {
- this.form.id = res.id
- this.form.checkVisit = res.VisitConfigParam.checkVisit
+ this.form.checkVisit = res.checkVisit
this.form.description = res.description
- this.form.healthCard = res.VisitConfigParam.healthCard
- this.form.isAnswer = res.VisitConfigParam.isAnswer
- this.form.reservationWay = res.VisitConfigParam.reservationWay
+ this.form.healthCard = res.healthCard
+ this.form.isAnswer = res.isAnswer
+ this.form.reservationWay = res.reservationWay
this.form.theme = res.theme
+ this.form.doorsVisitRequired = res.doorsVisitRequired
+ this.form.visitNotice = res.visitNotice
+ this.form.visitTips = res.visitTips
+ this.form.visitMap = res.visitMap
+ this.form.frezzDays = res.frezzDays
})
},
submit () {
updateVisitConfig({
- VisitConfigParam: {
- isAnswer: this.form.isAnswer,
- healthCard: this.form.healthCard,
- checkVisit: this.form.checkVisit,
- reservationWay: this.form.reservationWay
- },
+ isAnswer: this.form.isAnswer,
+ healthCard: this.form.healthCard,
+ checkVisit: this.form.checkVisit,
+ reservationWay: this.form.reservationWay,
description: this.form.description,
- theme: this.form.theme
+ theme: this.form.theme,
+ visitNotice: this.form.visitNotice,
+ visitTips: this.form.visitTips,
+ frezzDays: this.form.frezzDays,
+ visitMap: this.form.visitMap,
+ doorsVisitRequired: this.form.doorsVisitRequired
}).then(res => {
this.$message.success('淇濆瓨鎴愬姛')
this.getData()
@@ -99,7 +193,6 @@
<style lang="scss" scoped>
.box {
width: 100%;
- height: 100%;
padding: 30px;
box-sizing: border-box;
background: #ffffff;
--
Gitblit v1.9.3