123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144 |
- <template>
- <view class="main">
- <view class="title">{{ item.title }}</view>
- <u-divider text="开始"></u-divider>
- <view class="item" v-for="(item, index) in item.op" :key="item.name">
- <view class="mtt">
- <text class="ifnull" v-if="item.ifnull == '必填'">*</text>
- <text class="index">{{ index + 1 }}、</text>
- <text class="tm">{{ item.name }}</text>
- <text class="dx">({{ item.input }})</text>
- </view>
- <view class="mts">
- <input v-if="item.input == '填空'" v-model="item.s_value" placeholder="请输入" />
- <input v-if="item.input == '数字' || item.input == '电话'" type="number" v-model="item.s_value" placeholder="请输入" :disabled="look ? true : false" />
- <textarea v-if="item.input == '多行文本'" v-model="item.s_value" placeholder="请输入" />
- <view v-if="item.input == '附件'">
- <images v-model="item.s_value" :read="look ? true : false"></images>
- <view class="fjsc" v-if="!look">最多添加5个附件,单个文件不超过20M。</view>
- </view>
- <view class="ops" v-if="item.input == '单选' || item.input == '多选' || item.input == '判断'">
- <view v-for="(op, i) in item.selects" :key="op.name">
- <view class="op" :class="{ active: op.check }" @click="check(item, op)">{{ op.name }}</view>
- </view>
- </view>
- </view>
- </view>
- <u-divider text="结束"></u-divider>
- <button class="btn">立即提交</button>
- </view>
- </template>
- <script>
- export default {
- data() {
- return {
- look: false,
- item: {}
- };
- },
- onLoad(e) {
- this.http.request({
- url: '/app/follow/detail/115',
- success: (res) => {
- this.item = res.data.data;
- this.item.op = JSON.parse(this.item.op);
- }
- });
- },
- methods: {}
- };
- </script>
- <style lang="scss">
- .title {
- text-align: center;
- }
- .item {
- .mtt {
- text-align: left;
- font-size: 16px;
- padding: 12px 0px 12px 0px;
- position: relative;
- color: $font-c;
- .ifnull {
- color: red;
- font-weight: bold;
- }
- .tm {
- padding-left: 0px;
- }
- .dx {
- font-size: 12px;
- color: #989898;
- }
- }
- input {
- background-color: white;
- border-radius: 5px;
- padding: 12px;
- font-size: 14px;
- }
- textarea {
- background-color: white;
- border-radius: 5px;
- width: 93%;
- padding: 12px;
- font-size: 14px;
- height: 70px;
- }
- .ops {
- margin-top: -5px;
- overflow: hidden;
- .op {
- padding: 8px;
- background-color: white;
- margin-top: 10px;
- font-size: 14px;
- border-radius: 3px;
- color: #656363;
- float: left;
- margin-right: 7px;
- &.active {
- background-color: $main-color;
- color: white;
- }
- }
- }
- .choice {
- background-color: white;
- margin-top: 5px;
- padding: 12px;
- border-radius: 3px;
- font-size: 14px;
- color: #656363;
- overflow: hidden;
- .omit {
- width: 80%;
- float: left;
- }
- .gx {
- font-weight: bold;
- color: #4581fb;
- padding-left: 5px;
- }
- .icon {
- float: right;
- margin-top: 3px;
- }
- }
- .up {
- font-size: 14px;
- color: #989898;
- position: relative;
- .icon {
- padding-right: 3px;
- }
- }
- .fjsc {
- color: #989898;
- font-size: 14px;
- margin-top: 5px;
- }
- }
- </style>
|