From 3bab59284578d6e6d2fa2f807895c60ebc54bdcc Mon Sep 17 00:00:00 2001
From: WXL <1785969728@qq.com>
Date: 星期二, 17 六月 2025 16:01:23 +0800
Subject: [PATCH] 测试完成
---
src/components/Regular/index.vue | 246 +++++++++++++++++++++++++++----------------------
1 files changed, 136 insertions(+), 110 deletions(-)
diff --git a/src/components/Regular/index.vue b/src/components/Regular/index.vue
index 55a1010..8985f3e 100644
--- a/src/components/Regular/index.vue
+++ b/src/components/Regular/index.vue
@@ -1,7 +1,11 @@
<template>
<div>
- <div class="topicxq" v-for="item in TargetoptionList">
- <el-form :model="ruleForm" :rules="rules">
+ <div
+ class="topicxq"
+ v-for="item in TargetoptionList"
+ v-if="item.isoperation != 3"
+ >
+ <el-form :inline="true" :rules="rules" :model="item" label-width="80px">
<el-row :gutter="10">
<el-col :span="12"
><el-form-item prop="targetvalue" label="閫夐」鍚嶇О">
@@ -14,14 +18,14 @@
</el-input> </el-form-item
></el-col>
<el-col :span="12"
- ><el-form-item label="棰勮鎻愰啋">
+ ><el-form-item label="寮傚父鎻愰啋">
<el-radio-group v-model="item.isabnormal">
<el-radio :label="1">鏄�</el-radio>
<el-radio :label="0">鍚�</el-radio>
</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 +34,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
@@ -44,6 +50,13 @@
</el-input> </el-form-item
></el-col>
</el-row>
+ <el-form-item label="缁撴潫瀵硅瘽">
+ <el-radio-group v-model="item.isEnd">
+ <el-radio :label="1">鏄�</el-radio>
+ <el-radio :label="0">鍚�</el-radio>
+ </el-radio-group>
+ </el-form-item>
+
<el-row :gutter="10" v-if="intent">
<el-col :span="12"
><el-form-item label="澶勭悊">
@@ -56,10 +69,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
@@ -67,90 +81,107 @@
</el-input> </el-form-item
></el-col>
</el-row>
- <el-form-item label="鍏抽敭瀛�(鍚�)" prop="desc" v-if="hasValue">
- <div class="xinz-inf">
- <el-tag
- :key="crux"
- type="success"
- v-for="crux in item.dynamiccruxs"
- closable
- effect="dark"
- :disable-transitions="false"
- @close="handleClosecrux(crux, item, 1)"
+ <el-row :gutter="10" v-if="scriptType == 1">
+ <el-form-item label="閫変腑鎻愮ず">
+ <el-input
+ style="width: 24vw"
+ type="textarea"
+ autosize
+ placeholder="璇疯緭鍏ュ唴瀹�"
+ v-model="item.prompt"
>
- {{ crux }}
- </el-tag>
- <el-select
- v-model="inputValue"
- v-if="item.inputVisible"
- @change="handleInputConfirm(item)"
- filterable
- remote
- allow-create
- reserve-keyword
- default-first-option
- :loading="loading"
- placeholder="璇烽�夋嫨"
- >
- <el-option
- v-for="items in regular"
- :key="items.label"
- :label="items.label"
- :value="items.label"
+ </el-input
+ ></el-form-item>
+ </el-row>
+ <el-row>
+ <el-form-item label="鍏抽敭瀛�(鍚�)" prop="desc" v-if="hasValue">
+ <div class="xinz-inf">
+ <el-tag
+ :key="crux"
+ type="success"
+ v-for="crux in item.dynamiccruxs"
+ closable
+ effect="dark"
+ :disable-transitions="false"
+ @close="handleClosecrux(crux, item, 1)"
>
- </el-option>
- </el-select>
- <el-button
- v-else
- class="button-new-tag"
- size="small"
- @click="showInput(item)"
- >+ 鏂板</el-button
- >
- </div>
- </el-form-item>
- <el-form-item label="鍏抽敭瀛�(闈�)" prop="adesc" v-if="hasValue">
- <div class="xinz-inf">
- <el-tag
- :key="crux"
- type="warning"
- v-for="crux in item.nodynamiccruxs"
- closable
- effect="dark"
- :disable-transitions="false"
- @close="handleClosecrux(crux, item, 2)"
- >
- {{ crux }}
- </el-tag>
- <el-select
- v-model="inputValue"
- v-if="item.noinputVisible"
- @change="handleInputConfirm(item)"
- filterable
- remote
- allow-create
- reserve-keyword
- default-first-option
- :loading="loading"
- placeholder="璇烽�夋嫨"
- >
- <el-option
- v-for="items in noregular"
- :key="items.value"
- :label="items.label"
- :value="items.label"
+ {{ crux }}
+ </el-tag>
+ <el-select
+ v-model="inputValue"
+ v-if="item.inputVisible"
+ @change="handleInputConfirm(item)"
+ filterable
+ remote
+ allow-create
+ reserve-keyword
+ default-first-option
+ :loading="loading"
+ placeholder="璇烽�夋嫨"
>
- </el-option>
- </el-select>
- <el-button
- v-else
- class="button-new-tag"
- size="small"
- @click="showInputno(item)"
- >+ 鏂板</el-button
- >
- </div>
- </el-form-item>
+ <el-option
+ v-for="items in regular"
+ :key="items.label"
+ :label="items.label"
+ :value="items.label"
+ >
+ </el-option>
+ </el-select>
+ <el-button
+ v-else
+ class="button-new-tag"
+ size="small"
+ @click="showInput(item)"
+ >+ 鏂板</el-button
+ >
+ </div>
+ </el-form-item>
+ </el-row>
+ <el-row>
+ <el-form-item label="鍏抽敭瀛�(闈�)" prop="adesc" v-if="hasValue">
+ <div class="xinz-inf">
+ <el-tag
+ :key="crux"
+ type="warning"
+ v-for="crux in item.nodynamiccruxs"
+ closable
+ effect="dark"
+ :disable-transitions="false"
+ @close="handleClosecrux(crux, item, 2)"
+ >
+ {{ crux }}
+ </el-tag>
+ <el-select
+ v-model="inputValue"
+ v-if="item.noinputVisible"
+ @change="handleInputConfirm(item)"
+ filterable
+ remote
+ allow-create
+ reserve-keyword
+ default-first-option
+ :loading="loading"
+ placeholder="璇烽�夋嫨"
+ >
+ <el-option
+ v-for="items in noregular"
+ :key="items.value"
+ :label="items.label"
+ :value="items.label"
+ >
+ </el-option>
+ </el-select>
+ <el-button
+ v-else
+ class="button-new-tag"
+ size="small"
+ @click="showInputno(item)"
+ >+ 鏂板</el-button
+ >
+ </div>
+ </el-form-item>
+ </el-row>
+
<el-form-item label="閫夐」鏂囦欢" prop="sickness" v-if="Verbalproblem">
<div style="width: 40vw">
<el-upload
@@ -174,24 +205,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 +273,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 +290,14 @@
type: Boolean,
default: true,
},
+ scriptType: {
+ type: String,
+ default: "1",
+ },
+ addoption: {
+ type: Boolean,
+ default: false,
+ },
intent: {
type: Boolean,
default: true,
@@ -288,6 +310,10 @@
type: Boolean,
default: true,
},
+ branchFlag: {
+ type: Boolean,
+ default: false,
+ },
},
created() {
--
Gitblit v1.9.3