فهرست منبع

feat:问卷增加主题3

magic v 4 سال پیش
والد
کامیت
675886df5a

+ 2 - 2
config/index.js

@@ -12,7 +12,7 @@ module.exports = {
     assetsPublicPath: '/',
     proxyTable: {
       '/api': {
-        target: 'https://uat.bolineyecare.com',
+        target: 'https://his.bolineyecare.com',
         secure: true, // 接受 运行在 https 上的服务
         changeOrigin: true,
         pathRewrite: {
@@ -23,7 +23,7 @@ module.exports = {
 
     // Various Dev Server settings
     host: 'localhost', // can be overwritten by process.env.HOST
-    // host: '10.0.3.116', // can be overwritten by process.env.HOST
+    // host: '10.0.3.171', // can be overwritten by process.env.HOST
     port: 8080, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
     autoOpenBrowser: false,
     errorOverlay: true,

+ 1 - 0
index.html

@@ -10,6 +10,7 @@
         margin: 0;
       }
     </style>
+    <link href="//at.alicdn.com/t/font_2689161_ih6og7ged0l.css" rel="stylesheet" type="text/css" />
   </head>
   <body>
     <div id="app">

+ 3 - 0
src/App.vue

@@ -16,3 +16,6 @@ export default {
   }
 }
 </script>
+<style lang="scss">
+@import '@/common/scss/bl-flex.scss';
+</style>

+ 489 - 0
src/common/scss/bl-flex.scss

@@ -0,0 +1,489 @@
+@import '@/common/scss/base.scss';
+// cell-card 升级版 -> bl-flex
+.bl-flex {
+  display: flex;
+
+  // 基础参数
+  &[between] {
+    justify-content: space-between;
+  }
+  &[around] {
+    justify-content: space-around;
+  }
+  &[flex-end] {
+    justify-content: flex-end;
+  }
+  &[items-flex-end] {
+    align-items: flex-end;
+  }
+  &[column] {
+    flex-direction: column;
+  }
+  &[center] {
+    justify-content: center;
+    align-items: center;
+  }
+  &[items-center] {
+    align-items: center;
+  }
+  &[content-center] {
+    justify-content: center;
+  }
+  &[flex-wrap] {
+    flex-wrap: wrap;
+  }
+  > [flex1] {
+    flex: 1;
+  }
+  &[card], [card] {
+    padding: $sp-md $sp-lg;
+    background-color: $color-f;
+    border-radius: $sp-sm;
+    margin-left: $sp-lg;
+    margin-right: $sp-lg;
+    margin-bottom: $sp-md;
+    overflow: hidden;
+    &:first-child {
+      margin-top: $sp-md;
+    }
+  }
+
+  // 方框大小,缩略之类的作用
+  &[box-xs], [box-xs]{
+    width: 4 * $size-xs;
+    height: 4 * $size-xs;
+  }
+  &[box-sm], [box-sm]{
+    width: 4 * $size-sm;
+    height: 4 * $size-sm;
+  }
+  &[box-md], [box-md]{
+    width: 4 * $size-md;
+    height: 4 * $size-md;
+  }
+  &[box-lg], [box-lg]{
+    width: 4 * $size-lg;
+    height: 4 * $size-lg;
+  }
+  &[box-xl], [box-xl]{
+    width: 4 * $size-xl;
+    height: 4 * $size-xl;
+  }
+  &[box-thumb], [box-thumb]{
+    width: 4 * $size-sm;
+    height: 4 * $size-sm;
+  }
+
+  // 高宽
+  &[h100], [h100] {
+    height: 100%;
+  }
+  &[w100], [w100] {
+    width: 100%;
+  }
+
+  // 点击效果
+  &[active], [active] {
+    cursor: pointer;
+    user-select: none;
+    &:active {
+      opacity: 0.6;
+    }
+  }
+  &[touch], [touch] {
+    cursor: pointer;
+    user-select: none;
+  }
+  &[noselect], [noselect] {
+    user-select: none;
+  }
+
+  // 阴影
+  &[shadow], [shadow] {
+    box-shadow: 0 0 12px 0 $color-5;
+  }
+
+  &[opacity-1], [opacity-1] {
+    opacity: 0.1;
+  }
+  &[opacity-2], [opacity-2] {
+    opacity: 0.2;
+  }
+  &[opacity-3], [opacity-3] {
+    opacity: 0.3;
+  }
+  &[opacity-4], [opacity-4] {
+    opacity: 0.4;
+  }
+  &[opacity-5], [opacity-5] {
+    opacity: 0.5;
+  }
+  &[opacity-6], [opacity-6] {
+    opacity: 0.6;
+  }
+  &[opacity-7], [opacity-7] {
+    opacity: 0.7;
+  }
+  &[opacity-8], [opacity-8] {
+    opacity: 0.8;
+  }
+  &[opacity-9], [opacity-9] {
+    opacity: 0.9;
+  }
+
+  // 圆角
+  &[round], [round] {
+    border-radius: $sp-sm;
+    overflow: hidden;
+  }
+  &[round-xs], [round-xs] {
+    border-radius: $sp-xs;
+    overflow: hidden;
+  }
+  &[round-pie], [round-pie] {
+    border-radius: 50%;
+    overflow: hidden;
+  }
+  &[round-top], [round-top] {
+    border-radius: $sp-md $sp-md 0 0;
+    overflow: hidden;
+  }
+  &[round-bottom], [round-top] {
+    border-radius: 0 0 $sp-md $sp-md;
+    overflow: hidden;
+  }
+  &[round-pie1], [round-pie1] {
+    border-radius: 9999px;
+  }
+
+  // 边框
+  &[border], [boder] {
+    border: 1px solid $color-6;
+  }
+  &[border-bottom],[border-bottom] {
+    border-bottom: 1px solid $color-6;
+  }
+  &[border-top],[border-top] {
+    border-top: 1px solid $color-6;
+  }
+  &[border0], [border0] {
+    border: 0;
+  }
+
+  // 相对定位 & 绝对定位
+  &[relative], [relative] {
+    position: relative;
+  }
+  &[absolute], [absolute] {
+    position: absolute;
+    top: 0;
+    left: 0;
+    right: 0;
+    bottom: 0;
+  }
+
+  // 对齐方式
+  &[text-right], [text-right] {
+    text-align: left;
+  }
+  &[text-right], [text-right] {
+    text-align: right;
+  }
+  &[text-center], [text-center] {
+    text-align: center;
+  }
+
+  // 不换行
+  &[nowrap], [nowrap] {
+    white-space: nowrap;
+  }
+  // 强制换行
+  &[wrap], [wrap] {
+    word-wrap: break-word;
+    word-wrap: break-all;
+  }
+
+  // 字体大小
+  &[size-xl], [size-xl] {
+    font-size: $size-xl;
+  }
+  &[size-lg], [size-lg] {
+    font-size: $size-lg;
+  }
+  &[size-md], [size-md] {
+    font-size: $size-md;
+  }
+  &[size-sm], [size-sm] {
+    font-size: $size-sm;
+  }
+  &[size-xs], [size-xs] {
+    font-size: $size-xs;
+  }
+
+  &[bold], [bold] {
+    font-weight: 700;
+  }
+
+  // 字体颜色
+  &[color-title], [color-title] {
+    color: $color-1;
+    font-weight: 700;
+  }
+  &[color-text], [color-text] {
+    color: $color-1;
+  }
+  &[color-des], [color-des] {
+    color: $color-3;
+  }
+  &[color-info], [color-info] {
+    color: $color-4;
+  }
+  &[color], [color] {
+    color: $color;
+  }
+  &[color-warning], [color-warning] {
+    color: $color-warning;
+  }
+  &[color-error], [color-error] {
+    color: $color-error;
+  }
+  &[color-success], [color-success] {
+    color: $color-success;
+  }
+  &[color-f], [color-f] {
+    color: $color-f;
+  }
+
+  // 背景色
+  &[bg-color-0], [bg-color-0] {
+    background-color: $color-0;
+  }
+  &[bg-color-1], [bg-color-1] {
+    background-color: $color-1;
+  }
+  &[bg-color-2], [bg-color-2] {
+    background-color: $color-2;
+  }
+  &[bg-color-3], [bg-color-3] {
+    background-color: $color-3;
+  }
+  &[bg-color-4], [bg-color-4] {
+    background-color: $color-4;
+  }
+  &[bg-color-5], [bg-color-5] {
+    background-color: $color-5;
+  }
+  &[bg-color-6], [bg-color-6] {
+    background-color: $color-6;
+  }
+  &[bg-color-7], [bg-color-7] {
+    background-color: $color-7;
+  }
+  &[bg-color], [bg-color] {
+    background-color: $color;
+  }
+  &[bg-color-warning], [bg-color-warning] {
+    background-color: $color-warning;
+  }
+  &[bg-color-success], [bg-color-success] {
+    background-color: $color-success;
+  }
+  &[bg-color-error], [bg-color-error] {
+    background-color: $color-error;
+  }
+  &[bg-color-f], [bg-color-f] {
+    background-color: $color-f;
+  }
+
+  // 外边距
+  &[margin-xs], [margin-xs] {
+    margin: $sp-xs;
+  }
+  &[margin-sm], [margin-sm] {
+    margin: $sp-sm;
+  }
+  &[margin-md], [margin-md] {
+    margin: $sp-md;
+  }
+  &[margin-lg], [margin-lg] {
+    margin: $sp-lg;
+  }
+  &[margin-xl], [margin-xl] {
+    margin: $sp-xl;
+  }
+  &[not-margin], [not-margin] {
+    margin: 0;
+  }
+  &[not-margin-left], [not-margin-left] {
+    margin-left: 0;
+  }
+  &[not-margin-right], [not-margin-right] {
+    margin-right: 0;
+  }
+  &[not-margin-top], [not-margin-top] {
+    margin-top: 0;
+  }
+  &[not-margin-bottom], [not-margin-bottom] {
+    margin-bottom: 0;
+  }
+  &[margin-left-xs], [margin-left-xs] {
+    margin-left: $sp-xs;
+  }
+  &[margin-left-sm], [margin-left-sm] {
+    margin-left: $sp-sm;
+  }
+  &[margin-left-md], [margin-left-md] {
+    margin-left: $sp-md;
+  }
+  &[margin-left-lg], [margin-left-lg] {
+    margin-left: $sp-lg;
+  }
+  &[margin-left-xl], [margin-left-xl] {
+    margin-left: $sp-xl;
+  }
+
+  &[margin-right-xs], [margin-right-xs] {
+    margin-right: $sp-xs;
+  }
+  &[margin-right-sm], [margin-right-sm] {
+    margin-right: $sp-sm;
+  }
+  &[margin-right-md], [margin-right-md] {
+    margin-right: $sp-md;
+  }
+  &[margin-right-lg], [margin-right-lg] {
+    margin-right: $sp-lg;
+  }
+  &[margin-right-xl], [margin-right-xl] {
+    margin-right: $sp-xl;
+  }
+
+  &[margin-top-xs], [margin-top-xs] {
+    margin-top: $sp-xs;
+  }
+  &[margin-top-sm], [margin-top-sm] {
+    margin-top: $sp-sm;
+  }
+  &[margin-top-md], [margin-top-md] {
+    margin-top: $sp-md;
+  }
+  &[margin-top-lg], [margin-top-lg] {
+    margin-top: $sp-lg;
+  }
+  &[margin-top-xl], [margin-top-xl] {
+    margin-top: $sp-xl;
+  }
+
+  &[margin-bottom-xs], [margin-bottom-xs] {
+    margin-bottom: $sp-xs;
+  }
+  &[margin-bottom-sm], [margin-bottom-sm] {
+    margin-bottom: $sp-sm;
+  }
+  &[margin-bottom-md], [margin-bottom-md] {
+    margin-bottom: $sp-md;
+  }
+  &[margin-bottom-lg], [margin-bottom-lg] {
+    margin-bottom: $sp-lg;
+  }
+  &[margin-bottom-xl], [margin-bottom-xl] {
+    margin-bottom: $sp-xl;
+  }
+
+  // 内填充
+  &[padding-xs], [padding-xs] {
+    padding: $sp-xs;
+  }
+  &[padding-sm], [padding-sm] {
+    padding: $sp-sm;
+  }
+  &[padding-md], [padding-md] {
+    padding: $sp-md;
+  }
+  &[padding-lg], [padding-lg] {
+    padding: $sp-lg;
+  }
+  &[padding-xl], [padding-xl] {
+    padding: $sp-xl;
+  }
+
+  &[not-padding], [not-padding] {
+    padding: 0;
+  }
+  &[not-padding-top], [not-padding-top] {
+    padding-top: 0;
+  }
+  &[not-padding-bottom], [not-padding-bottom] {
+    padding-bottom: 0;
+  }
+  &[not-padding-right], [not-padding-right] {
+    padding-right: 0;
+  }
+  &[not-padding-left], [not-padding-left] {
+    padding-left: 0;
+  }
+
+  &[padding-left-xs], [padding-left-xs] {
+    padding-left: $sp-xs;
+  }
+  &[padding-left-sm], [padding-left-sm] {
+    padding-left: $sp-sm;
+  }
+  &[padding-left-md], [padding-left-md] {
+    padding-left: $sp-md;
+  }
+  &[padding-left-lg], [padding-left-lg] {
+    padding-left: $sp-lg;
+  }
+  &[padding-left-xl], [padding-left-xl] {
+    padding-left: $sp-xl;
+  }
+
+  &[padding-right-xs], [padding-right-xs] {
+    padding-right: $sp-xs;
+  }
+  &[padding-right-sm], [padding-right-sm] {
+    padding-right: $sp-sm;
+  }
+  &[padding-right-md], [padding-right-md] {
+    padding-right: $sp-md;
+  }
+  &[padding-right-lg], [padding-right-lg] {
+    padding-right: $sp-lg;
+  }
+  &[padding-right-xl], [padding-right-xl] {
+    padding-right: $sp-xl;
+  }
+
+  &[padding-top-xs], [padding-top-xs] {
+    padding-top: $sp-xs;
+  }
+  &[padding-top-sm], [padding-top-sm] {
+    padding-top: $sp-sm;
+  }
+  &[padding-top-md], [padding-top-md] {
+    padding-top: $sp-md;
+  }
+  &[padding-top-lg], [padding-top-lg] {
+    padding-top: $sp-lg;
+  }
+  &[padding-top-xl], [padding-top-xl] {
+    padding-top: $sp-xl;
+  }
+
+  &[padding-bottom-xs], [padding-bottom-xs] {
+    padding-bottom: $sp-xs;
+  }
+  &[padding-bottom-sm], [padding-bottom-sm] {
+    padding-bottom: $sp-sm;
+  }
+  &[padding-bottom-md], [padding-bottom-md] {
+    padding-bottom: $sp-md;
+  }
+  &[padding-bottom-lg], [padding-bottom-lg] {
+    padding-bottom: $sp-lg;
+  }
+  &[padding-bottom-xl], [padding-bottom-xl] {
+    padding-bottom: $sp-xl;
+  }
+}

+ 16 - 0
src/directive/blBr.js

@@ -0,0 +1,16 @@
+import Vue from 'vue'
+
+function blBr (el, binding, vnode, oldValue) {
+  let { expression, value, arg } = binding
+  let { context } = vnode
+  if (el && typeof value === 'string') {
+    let text = value
+    el.innerHTML = text.replace(/\n/g, '<br />')
+  }
+}
+
+// 注册一个全局自定义指令 `v-bl-mobile`
+Vue.directive('bl-br', {
+  bind: blBr,
+  update: blBr
+})

+ 1 - 0
src/main.js

@@ -17,6 +17,7 @@ import './assets/css/ui.scss';
 
 // 自定义指令
 import '@/directive/blMobile'
+import '@/directive/blBr'
 
 Vue.mixin({
   data() {

+ 2 - 0
src/pages/FormVolume/Layout1/index.vue

@@ -46,6 +46,7 @@
           <van-radio-group 
             v-model="item.val" 
             :direction="(item.layout_inline || data.topic.layout_inline) === 2 ? 'vertical' : 'horizontal'"
+            :style="{ justifyContent: (item.layout_align || data.topic.layout_align) === 'right' ? 'flex-end' : 'flex-start' }"
             v-if="item.type === 'radio'">
             <van-radio
               :class="(item.layout_inline || data.topic.layout_inline) === 2 ? 'vertical' : 'horizontal'"
@@ -57,6 +58,7 @@
           <van-checkbox-group 
             v-model="item.val" 
             :direction="(item.layout_inline || data.topic.layout_inline) === 2 ? 'vertical' : 'horizontal'"
+            :style="{ justifyContent: (item.layout_align || data.topic.layout_align) === 'right' ? 'flex-end' : 'flex-start' }"
             :max="item.max" 
             v-if="item.type === 'checkbox'">
             <van-checkbox 

+ 2 - 0
src/pages/FormVolume/Layout2/index.vue

@@ -52,6 +52,7 @@
           <van-radio-group 
             v-model="item.val" 
             :direction="(item.layout_inline || data.topic.layout_inline) === 2 ? 'vertical' : 'horizontal'"
+            :style="{ justifyContent: (item.layout_align || data.topic.layout_align) === 'right' ? 'flex-end' : 'flex-start' }"
             v-if="item.type === 'radio'">
             <van-radio
               :class="(item.layout_inline || data.topic.layout_inline) === 2 ? 'vertical' : 'horizontal'"
@@ -63,6 +64,7 @@
           <van-checkbox-group 
             v-model="item.val" 
             :direction="(item.layout_inline || data.topic.layout_inline) === 2 ? 'vertical' : 'horizontal'"
+            :style="{ justifyContent: (item.layout_align || data.topic.layout_align) === 'right' ? 'flex-end' : 'flex-start' }"
             :max="item.max" 
             v-if="item.type === 'checkbox'">
             <van-checkbox 

+ 229 - 0
src/pages/FormVolume/Layoutileads1/index.vue

@@ -0,0 +1,229 @@
+<template>
+<div class="volume-container">
+  <div class="body scroll-view">
+    <div class="bl-flex hw" center>
+      <div class="bl-flex" size-md bg-color-f items-center padding-sm padding-left-md padding-right-md round-pie1
+        v-if="$route.query.buyer">
+        <i class="font-ileads ileads-icon-gouxuan1" size-lg color-success margin-right-sm></i>
+        <div bold>购买成功</div>
+      </div>
+    </div>
+    <div class="bl-flex" v-if="data.topic.is_memo && data.topic.memo" padding-left-lg>
+      <div v-bl-br="data.topic.memo" class="h-memo" color-f bold></div>
+    </div>
+    
+    <div class="bl-flex" column padding-lg>
+      <div class="bl-flex" flex-end>
+        <div class="bl-flex">
+          <img :src="ImgLeads1" class="il-img2" />
+        </div>
+      </div>
+      <div class="bl-flex card" column card not-margin>
+        <transition-group name="flip-list" class="volume-content bl-flex" tag="div" column size-md>
+          <div
+            v-for="(item, index) in data.result"
+            :key="index + 1"
+            :class="{ cur: edataItem === item }"
+            @click="$emit('selectItem', item)">
+
+            <div class="bl-flex" border-bottom
+              :items-center="item.type != 'textarea'">
+              <label class="f-label" nowrap :padding-top-lg="item.type == 'textarea'">
+                <span v-if="item.required" color-error>*</span>
+                {{ item.title }}
+              </label>
+              <div flex1>
+                <textarea 
+                  v-model="item.val" 
+                  :maxlength="item.max || 200" placeholder="请填写" 
+                  :text-right="(item.layout_align || data.topic.layout_align) === 'right'"
+                  v-if="item.type === 'textarea'" />
+
+                <input v-model="item.val" 
+                  :maxlength="item.max || 200" 
+                  :text-right="(item.layout_align || data.topic.layout_align) === 'right'"
+                  :placeholder="['input'].includes(item.type) ? '请填写' : '请选择'" 
+                  :readonly="!['input'].includes(item.type)"
+                  v-if="['input', 'select', 'date'].includes(item.type)"
+                  @click="!['input'].includes(item.type) && btnOpen(item)" />
+
+                <div class="slider-layout" v-if="item.type === 'slider'">
+                  <div class="val" v-if="item.val">{{ item.val }}</div>
+                  <div class="warn" v-else>拨动滑块选择</div>
+                  <van-slider
+                    v-model="item.sliderVal"
+                    :min="-1" 
+                    :max="item.content.length - 1"
+                    @input="item.val = (item.content[item.sliderVal] || {}).title || ''" />
+                  <div class="ruler-layout">
+                    <div class="ruler-item">
+                      <span></span>
+                    </div>
+                    <div class="ruler-item"
+                      v-for="(it, itIndex) in item.content"
+                      :key="itIndex">
+                      <span v-if="!it.sliderHide">
+                        {{ it.title }}
+                        <br v-if="it.memo" />
+                        {{ it.memo || '' }}
+                      </span>
+                    </div>
+                  </div>
+                </div>
+
+                <van-radio-group padding-top-md padding-bottom-md
+                  v-model="item.val" 
+                  :style="{ justifyContent: (item.layout_align || data.topic.layout_align) === 'right' ? 'flex-end' : 'flex-start' }"
+                  :direction="(item.layout_inline || data.topic.layout_inline) === 2 ? 'vertical' : 'horizontal'"
+                  v-if="['radio'].includes(item.type)">
+                  <van-radio
+                    :class="(item.layout_inline || data.topic.layout_inline) === 2 ? 'vertical' : 'horizontal'"
+                    :name="it.title" 
+                    v-for="(it, itIndex) in item.content" 
+                    :key="itIndex">{{ it.title }}{{ it.memo && `(${it.memo})` }}</van-radio>
+                </van-radio-group>
+
+                <van-checkbox-group padding-top-md padding-bottom-md
+                  v-model="item.val"
+                  :style="{ justifyContent: (item.layout_align || data.topic.layout_align) === 'right' ? 'flex-end' : 'flex-start' }"
+                  :direction="(item.layout_inline || data.topic.layout_inline) === 2 ? 'vertical' : 'horizontal'"
+                  :max="item.max" 
+                  v-if="item.type === 'checkbox'">
+                  <van-checkbox 
+                    :class="(item.layout_inline || data.topic.layout_inline) === 2 ? 'vertical' : 'horizontal'"
+                    :name="it.title" 
+                    v-for="(it, itIndex) in item.content" 
+                    :key="itIndex" 
+                    shape="square">{{ it.title }}{{ it.memo && `(${it.memo})` }}</van-checkbox>
+                </van-checkbox-group>
+              </div>
+              <i class="font-ileads ileads-icon-jiantou" color-des padding-sm not-padding-right
+                v-if="['select', 'date'].includes(item.type)"
+                @click="btnOpen(item)"></i>
+            </div>
+          </div>
+        </transition-group>
+        <div class="bl-flex" relative between padding-top-lg>
+          <div class="l-pie" round-pie bg-color-6></div>
+          <div class="r-pie" round-pie bg-color-6></div>
+        </div>
+        <div class="bl-flex" padding-lg padding-left-xl padding-right-xl v-if="!!data.result.length">
+          <button class="btn primary" round-pie1
+            :disabled="loading.submit || !data.result.length" 
+            @click="$emit('submit')">提交</button>
+        </div>
+      </div>
+    </div>
+  </div>
+  <van-popup v-model="show.picker" position="bottom">
+    <van-picker
+      :title="comPicker.title"
+      show-toolbar
+      :columns="comPicker.columns"
+      @confirm="onConfirmPicker"
+      @cancel="onCancelPicker"
+    />
+  </van-popup>
+
+  <van-popup v-model="show.date" position="bottom">
+    <van-datetime-picker
+      v-model="comDate.currentDate"
+      type="date"
+      :title="comDate.title"
+      :min-date="minDate"
+      :max-date="maxDate"
+      @confirm="onConfirmDate"
+      @cancel="onCancelDate"
+    />
+  </van-popup>
+</div>
+</template>
+
+<script>
+import mixinLayout from '../mixins/layout'
+import ImgLeads1 from '~/img/leads-img1.png'
+export default {
+  mixins: [mixinLayout],
+  data () {
+    let maxDate = new Date()
+    let minDate = new Date(maxDate.getFullYear() - 100, 0, 1)
+    return {
+      ImgLeads1,
+      maxDate,
+      minDate,
+      show: {
+        picker: false,
+        date: false
+      },
+      comPicker: {
+        title: '',
+        columns: [],
+        defaultIndex: 0,
+        data: {}
+      },
+      comDate: {
+        title: '',
+        currentDate: '',
+        data: {}
+      }
+    }
+  },
+  methods: {
+    btnOpen (item) {
+      let config = {
+        'select': () => this.onOpenPicker(item),
+        'date': () => this.onOpenDate(item)
+      }
+      let fn = config[item.type]
+      fn && fn()
+    },
+    onOpenPicker (item) {
+      let columns = item.content.map(it => it.title)
+      let index = columns.indexOf(item.val)
+      this.$set(this, 'comPicker', {
+        title: `请选择${item.title}`,
+        columns,
+        defaultIndex: index != -1 ? index : 0,
+        data: item
+      })
+      this.show.picker = true
+    },
+    onConfirmPicker (value) {
+      this.comPicker.data.val = value
+      this.onCancelPicker()
+    },
+    onCancelPicker () {
+      this.show.picker = false
+    },
+    onOpenDate (item) {
+      let currentDate
+      try {
+        if (item.val) {
+          currentDate = new Date(item.val.replace(/-/g, '/'))
+        } else {
+          currentDate = new Date()
+        }
+      } catch (err) {
+        currentDate = new Date()
+      }
+      this.$set(this, 'comDate', {
+        title: `请选择${item.title}`,
+        currentDate,
+        data: item
+      })
+      this.show.date = true
+    },
+    onConfirmDate (value) {
+      this.comDate.data.val = value.toString('yyyy-MM-dd')
+      this.onCancelDate()
+    },
+    onCancelDate () {
+      this.show.date = false
+    }
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+@import './style.scss';
+</style>

+ 124 - 0
src/pages/FormVolume/Layoutileads1/style.scss

@@ -0,0 +1,124 @@
+@import '@/common/scss/base.scss';
+.volume-container {
+  display: flex;
+  flex-direction: column;
+  height: 100%;
+
+  background: url(/static/img/leads-img0.png) no-repeat;
+  background-color: $color-7;
+  background-size: 100%;
+  
+  .body {
+    flex: 1;
+  }
+}
+.volume-content {
+  .cur {
+    box-shadow: 0 0px 4px 1px #ffd023;
+    z-index: 2;
+    position: relative;
+  }
+  textarea, input {
+    border: 0;
+    width: 100%;
+    width: 100%;
+    outline: none;
+    padding: $sp-lg 0;
+  }
+  input[readonly] {
+    cursor: pointer;
+  }
+  textarea {
+    min-height: 120px;
+  }
+  .vertical {
+    margin-top: $sp-sm;
+    margin-bottom: $sp-sm;
+  }
+  .horizontal {
+    margin-top: $sp-sm;
+    margin-bottom: $sp-sm;
+  }
+}
+
+.slider-layout {
+    flex: 1;
+    padding: 0 $sp-md;
+    padding-bottom: $sp-md;
+    display: flex;
+    flex-direction: column;
+    align-items: center;
+
+    .val,
+    .warn {
+      padding-bottom: $sp-lg;
+      font-size: $size-lg;
+      color: $color-success;
+    }
+
+    .warn {
+      color: $color-3;
+    }
+
+    .ruler-layout {
+      font-size: $size-xs;
+      width: 100%;
+      display: flex;
+      align-items: center;
+      justify-content: space-between;
+      border-bottom: 1px solid $color-4;
+      margin-top: $sp-lg;
+      margin-bottom: $sp-md;
+
+      .ruler-item {
+        position: relative;
+        height: $size-xs;
+        background: $color-4;
+        width: 1px;
+
+        span {
+          position: absolute;
+          left: 0;
+          top: ($size-xs + $sp-xs);
+          white-space: nowrap;
+          color: $color-3;
+          transform: translateX(-50%);
+          text-align: center;
+        }
+      }
+    }
+  }
+
+
+.buyer-img {
+  width: 124.5px;
+  height: 36.5px;
+}
+.hw {
+  height: 80px;
+}
+.h-memo {
+  font-size: 24px;
+}
+.il-img2 {
+  width: 153.5px;
+  height: 131px;
+}
+.card {
+  margin-top: -18px;
+  box-shadow: 0 3px 6px 1px $color-5;
+  border-radius: $size-md;
+}
+.f-label {
+  width: $size-md * 5 + $sp-md;
+}
+.l-pie, .r-pie {
+  width: $size-md;
+  height: $size-md;
+}
+.l-pie {
+  margin-left: -($sp-lg + $size-md / 2)
+}
+.r-pie {
+  margin-right: -($sp-lg + $size-md / 2)
+}

+ 6 - 2
src/pages/FormVolume/mixins/index.js

@@ -2,6 +2,7 @@ import * as api from '@/api'
 import Custom from '../js/custom'
 import Layout1 from '../Layout1'
 import Layout2 from '../Layout2'
+import Layoutileads1 from '../Layoutileads1'
 export default {
   props: {
     edata: {
@@ -17,6 +18,7 @@ export default {
   components: {
     Layout1,
     Layout2,
+    Layoutileads1,
   },
   data() {
     return {
@@ -27,7 +29,8 @@ export default {
       },
       layoutType: {
         '1': 'Layout1',
-        '2': 'Layout2'
+        '2': 'Layout2',
+        '3': 'Layoutileads1'
       },
       configType: {
         'radio': '单选',
@@ -192,7 +195,8 @@ export default {
           let config = {
             patient_name: new RegExp('姓名'),
             age: new RegExp('年龄'),
-            sex: new RegExp('性别')
+            sex: new RegExp('性别'),
+            birthday: new RegExp('出生日期')
           }
           let keys = Object.keys(config)
           let objs = this.data.result.map(item => {

+ 3 - 0
src/pages/Manager/index.vue

@@ -91,6 +91,7 @@
                       <van-radio-group v-model="data.topic.layout_type" direction="horizontal">
                         <van-radio :name="1">主题1</van-radio>
                         <van-radio :name="2">主题2</van-radio>
+                        <van-radio :name="3">主题3</van-radio>
                       </van-radio-group>
                     </template>
                   </van-field>
@@ -173,6 +174,8 @@
                         <van-radio name="input" @click="onChangeCompType('input')">input</van-radio>
                         <van-radio name="textarea" @click="onChangeCompType('textarea')">textarea</van-radio>
                         <van-radio name="slider" @click="onChangeCompType('slider')">slider</van-radio>
+                        <van-radio name="date" @click="onChangeCompType('date')" v-if="[3].includes(data.topic.layout_type)">date</van-radio>
+                        <van-radio name="select" @click="onChangeCompType('select')" v-if="[3].includes(data.topic.layout_type)">select</van-radio>
                       </van-radio-group>
                     </template>
                   </van-field>

BIN
static/img/leads-img0.png


BIN
static/img/leads-img1.png