From 9ff0d92f9e7a58c405ef64e028cc7baf90d5f378 Mon Sep 17 00:00:00 2001 From: WXL <1785969728@qq.com> Date: 星期一, 09 九月 2024 10:51:25 +0800 Subject: [PATCH] 测试完成 --- src/components/Regular/index.vue | 48 +++++++++++++++++++++--------------------------- 1 files changed, 21 insertions(+), 27 deletions(-) diff --git a/src/components/Regular/index.vue b/src/components/Regular/index.vue index 55a1010..9a033d5 100644 --- a/src/components/Regular/index.vue +++ b/src/components/Regular/index.vue @@ -1,7 +1,7 @@ <template> <div> <div class="topicxq" v-for="item in TargetoptionList"> - <el-form :model="ruleForm" :rules="rules"> + <el-form :inline="true" :rules="rules" :model="item"> <el-row :gutter="10"> <el-col :span="12" ><el-form-item prop="targetvalue" label="閫夐」鍚嶇О"> @@ -21,7 +21,7 @@ </el-radio-group> </el-form-item></el-col > - <el-col :span="12" v-if="intent" + <!-- <el-col :span="12" v-if="intent" ><el-form-item label="閫夐」鑺傜偣"> <el-input type="text" @@ -30,13 +30,15 @@ show-word-limit > </el-input> </el-form-item - ></el-col> + ></el-col> --> </el-row> <el-row :gutter="10" v-if="!intent"> <el-col :span="20" ><el-form-item label="閫夐」璇存槑"> <el-input - type="text" + style="width: 500px;" + type="textarea" + :rows="2" placeholder="璇疯緭鍏�" v-model="item.optiondesc" show-word-limit @@ -56,10 +58,11 @@ > </el-input> </el-form-item ></el-col> - <el-col :span="12" + <el-col :span="12" v-show="branchFlag" ><el-form-item label="閫変腑璺宠浆"> <el-input type="text" + @blur="$emit('branchFlagfn', item.nextQuestion)" placeholder="璇疯緭鍏ラ鐩妭鐐�" v-model="item.nextQuestion" show-word-limit @@ -174,24 +177,10 @@ </el-form-item> <el-row :gutter="10"> - <el-col :span="16" v-if="intent"> - <el-form-item label="璇煶鏂囦欢"> - <el-upload - class="upload-demo" - style="display: flex" - action="https://jsonplaceholder.typicode.com/posts/" - :file-list="fileList" - :limit="1" - :on-exceed="handleExceed" - > - <el-button size="small" type="primary">鐐瑰嚮涓婁紶</el-button> - </el-upload> - </el-form-item></el-col - > - <el-col :span="intent ? 8 : 22"> + <el-col> <div style="text-align: right; padding-right: 10px"> <el-button - v-if="controlsc" + v-if="controlsc || addoption" @click="$emit('addoption', item)" type="success" icon="el-icon-circle-plus-outline" @@ -256,12 +245,9 @@ rules: { targetvalue: [ { required: true, message: "璇疯緭鍏ラ�夐」鍚嶇О", trigger: "blur" }, - { - min: 1, - max: 20, - message: "闀垮害鍦� 1 鍒� 20 涓瓧绗�", - trigger: "blur", - }, + ], + isabnormal: [ + { required: true, message: "璇疯緭鍏ラ�夐」鍚嶇О", trigger: "blur" }, ], }, }; @@ -276,6 +262,10 @@ type: Boolean, default: true, }, + addoption: { + type: Boolean, + default: false, + }, intent: { type: Boolean, default: true, @@ -288,6 +278,10 @@ type: Boolean, default: true, }, + branchFlag: { + type: Boolean, + default: false, + }, }, created() { -- Gitblit v1.9.3