|  |  |  | 
|---|
|  |  |  | <template> | 
|---|
|  |  |  | <div> | 
|---|
|  |  |  | <div class="topicxq" v-for="item in TargetoptionList"> | 
|---|
|  |  |  | <el-form  :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="选项名称"> | 
|---|
|  |  |  | 
|---|
|  |  |  | </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" | 
|---|
|  |  |  | 
|---|
|  |  |  | 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 | 
|---|
|  |  |  | 
|---|
|  |  |  | </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="处理"> | 
|---|
|  |  |  | 
|---|
|  |  |  | > | 
|---|
|  |  |  | </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 | 
|---|
|  |  |  | 
|---|
|  |  |  | </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 | 
|---|
|  |  |  | 
|---|
|  |  |  | <el-image | 
|---|
|  |  |  | style="width: 100px; height: 100px" | 
|---|
|  |  |  | :src="item.picturePath" | 
|---|
|  |  |  | :preview-src-list="[...item.picturePath]" | 
|---|
|  |  |  | :preview-src-list=" | 
|---|
|  |  |  | item.picturePath ? [item.picturePath] : [] | 
|---|
|  |  |  | " | 
|---|
|  |  |  | > | 
|---|
|  |  |  | </el-image> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | 
|---|
|  |  |  | </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" | 
|---|
|  |  |  | 
|---|
|  |  |  | rules: { | 
|---|
|  |  |  | targetvalue: [ | 
|---|
|  |  |  | { required: true, message: "请输入选项名称", trigger: "blur" }, | 
|---|
|  |  |  | { | 
|---|
|  |  |  | min: 1, | 
|---|
|  |  |  | max: 20, | 
|---|
|  |  |  | message: "长度在 1 到 20 个字符", | 
|---|
|  |  |  | trigger: "blur", | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | ], | 
|---|
|  |  |  | isabnormal: [ | 
|---|
|  |  |  | { required: true, message: "请输入选项名称", trigger: "blur" }, | 
|---|
|  |  |  | ], | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | }; | 
|---|
|  |  |  | 
|---|
|  |  |  | type: Boolean, | 
|---|
|  |  |  | default: true, | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | scriptType: { | 
|---|
|  |  |  | type: String, | 
|---|
|  |  |  | default: "1", | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | addoption: { | 
|---|
|  |  |  | type: Boolean, | 
|---|
|  |  |  | default: false, | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | intent: { | 
|---|
|  |  |  | type: Boolean, | 
|---|
|  |  |  | default: true, | 
|---|
|  |  |  | 
|---|
|  |  |  | type: Boolean, | 
|---|
|  |  |  | default: true, | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | branchFlag: { | 
|---|
|  |  |  | type: Boolean, | 
|---|
|  |  |  | default: false, | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | }, | 
|---|
|  |  |  |  | 
|---|
|  |  |  | created() { | 
|---|