From e014c6f2c4123d811353b4fe59d1b489e0587543 Mon Sep 17 00:00:00 2001
From: WXL <1785969728@qq.com>
Date: 星期三, 22 五月 2024 18:12:02 +0800
Subject: [PATCH] 测试完成
---
src/views/repositoryai/templateku/configurat/index.vue | 701 +++++++++++++++++++++++++++++-----------------------------
1 files changed, 348 insertions(+), 353 deletions(-)
diff --git a/src/views/repositoryai/templateku/configurat/index.vue b/src/views/repositoryai/templateku/configurat/index.vue
index a9d910a..a18c9ff 100644
--- a/src/views/repositoryai/templateku/configurat/index.vue
+++ b/src/views/repositoryai/templateku/configurat/index.vue
@@ -20,9 +20,7 @@
</el-step>
<el-step description="鏌ョ湅闅忚妯$増棰勮锛屽彲瀵煎嚭PDF">
<template slot="title">
- <span style="cursor: pointer" @click="Editprogress = 3"
- >闅忚妯$増棰勮</span
- >
+ <span style="cursor: pointer" @click="preview">闅忚妯$増棰勮</span>
</template>
</el-step>
</el-steps>
@@ -88,9 +86,10 @@
</div>
</el-form-item>
<el-row :gutter="20">
- <el-col :span="10">
+ <el-col :span="12">
<el-form-item label="鐗堟湰鍙�" prop="version">
<el-input
+ style="width: 220px"
v-model="ruleForm.version"
placeholder="榛樿1.0.1"
></el-input> </el-form-item
@@ -115,7 +114,7 @@
</el-row>
<el-row :gutter="20">
- <el-col :span="10">
+ <el-col :span="12">
<el-form-item label="璇█" prop="name">
<el-select
v-model="ruleForm.language"
@@ -256,6 +255,7 @@
</el-form-item>
<el-form-item label="閫傜敤闄㈠尯" prop="region">
<el-select
+ style="width: 500px"
v-model="ruleForm.campus"
size="medium"
multiple
@@ -274,6 +274,7 @@
</el-form-item>
<el-form-item label="閫傜敤绉戝" prop="region">
<el-cascader
+ style="width: 500px"
v-model="tempDetpRelevanceslist"
:options="deptList"
:props="props"
@@ -298,73 +299,62 @@
<el-option
class="ruleFormaa"
v-for="item in generallist"
- :key="item.value"
- :label="item.label"
- :value="item.value"
+ :key="item.id"
+ :label="item.extName"
+ :value="item.id"
>
</el-option>
</el-select>
</el-form-item>
<el-row :gutter="20">
- <el-col :span="8">
- <el-form-item label="闅忚鍓嶅鐞嗭紙鏄惁闇�瑕侊級" prop="name">
- <el-select
- v-model="ruleForm.prefollowup"
- size="medium"
- filterable
- placeholder="璇烽�夋嫨"
- >
- <el-option
- class="ruleFormaa"
- v-for="item in prefollowuplist"
- :key="item.value"
- :label="item.label"
- :value="item.value"
- >
- </el-option>
- </el-select> </el-form-item
+ <el-col :span="12">
+ <el-form-item label="闅忚鍓嶅鐞�" prop="name">
+ <el-input
+ type="textarea"
+ show-word-limit
+ v-model="ruleForm.revisitBefore"
+ ></el-input></el-form-item
></el-col>
- <el-col :span="9">
- <el-form-item label="闅忚鍚庡鐞嗭紙鏄惁闇�瑕侊級" prop="region">
- <el-select
- v-model="ruleForm.postfollowup"
- size="medium"
- filterable
- placeholder="璇烽�夋嫨鍒嗙被"
- >
- <el-option
- class="ruleFormaa"
- v-for="item in postfollowuplist"
- :key="item.value"
- :label="item.label"
- :value="item.value"
- >
- </el-option>
- </el-select> </el-form-item
+ <el-col :span="12">
+ <el-form-item label="闅忚鍚庡鐞�" prop="region">
+ <el-input
+ type="textarea"
+ show-word-limit
+ v-model="ruleForm.revisitAfter"
+ ></el-input> </el-form-item
></el-col>
</el-row>
<el-row :gutter="20">
- <el-col :span="10">
+ <el-col :span="8">
<el-form-item label="闈欓粯鏃堕棿(绉�)" prop="name">
<div style="width: 40%">
<el-input
v-model="ruleForm.silencetime"
></el-input></div></el-form-item
></el-col>
- <el-col :span="10">
+ <el-col :span="8">
+ <el-form-item label="闈欓粯娆℃暟" prop="name">
+ <div style="width: 40%">
+ <el-input
+ v-model="ruleForm.noVoiceNum"
+ ></el-input></div></el-form-item
+ ></el-col>
+ <el-col :span="8">
<el-form-item label="鏃犲尮閰嶉噸澶�(娆�)" prop="region">
<div style="width: 40%">
- <el-input v-model="ruleForm.name"></el-input>
+ <el-input v-model="ruleForm.mateNum"></el-input>
</div> </el-form-item
></el-col>
</el-row>
<el-form-item>
- <el-button type="success" @click="nextstep('ruleForm')"
+ <el-button type="success" plain @click="nextstep('ruleForm')"
>涓嬩竴姝�</el-button
>
<el-button type="info" @click="closeFm('ruleForm')">鍏抽棴</el-button>
- <el-button @click="Departmenttreatment('ruleForm')"
- >淇濆瓨闅忚妯$増鍩虹淇℃伅</el-button
+ <el-button
+ type="success"
+ @click="Departmenttreatment('ruleForm')"
+ >{{ task ? "淇濆瓨鍒颁换鍔℃ā鐗�" : "淇濆瓨闅忚妯$増鍩虹淇℃伅" }}</el-button
>
</el-form-item>
</el-form>
@@ -392,8 +382,8 @@
<el-table-column
label="缂栧彿"
align="center"
- key="guid"
- prop="guid"
+ key="targetid"
+ prop="targetid"
/>
<el-table-column
label="鏍囬"
@@ -465,6 +455,12 @@
<el-input
v-model="topicobj.questiontitle"
placeholder="璇蜂粠宸︿晶鍒楄〃閫夋嫨"
+ ></el-input>
+ </el-form-item>
+ <el-form-item label="闂鑺傜偣">
+ <el-input
+ v-model="topicobj.targetid"
+ placeholder="璇蜂粠宸︿晶鍒楄〃閫夋嫨"
:disabled="true"
></el-input>
</el-form-item>
@@ -472,8 +468,8 @@
<el-col :span="12"
><el-form-item label="鏄惁蹇呭~">
<el-select
- v-model="topicobj.ismandatory"
- placeholder="璇烽�夋嫨"
+ v-model="topicobj.isMust"
+ placeholder="榛樿蹇呭~"
>
<el-option
v-for="item in required"
@@ -485,13 +481,14 @@
</el-select> </el-form-item
></el-col>
<el-col :span="12"
- ><el-form-item label="鏄惁鍙敤">
+ ><el-form-item label="鍙栧�肩被鍨�">
<el-select
- v-model="topicobj.isavailable"
+ v-model="topicobj.valueType"
placeholder="璇烽�夋嫨"
+ :disabled="true"
>
<el-option
- v-for="item in usable"
+ v-for="item in valuetype"
:key="item.value"
:label="item.label"
:value="item.value"
@@ -500,301 +497,245 @@
</el-select> </el-form-item
></el-col>
</el-row>
- <div class="headline">
- <div class="basics">閫夐」璁剧疆</div>
- <div class="headbottom">
- <el-button
- type="primary"
- icon="el-icon-circle-plus-outline"
- @click="addzbiao"
- >娣诲姞鎸囨爣</el-button
- >
- </div>
- </div>
- <!-- <div
+ <div
class="topicxq"
- v-for="item in topicobj.ivrLibaScriptTargetoptionList"
+ v-if="topicobj.valueType == 2 || topicobj.valueType == 3"
>
- <el-row :gutter="10">
- <el-col :span="12"
- ><el-form-item label="閫夐」鍚�">
+ <el-row>
+ <el-col :span="20">
+ <el-form-item label="鏀堕泦鍐呭">
<el-input
- type="text"
- placeholder="璇疯緭鍏�"
- v-model="item.targetvalue"
- show-word-limit
- >
- </el-input> </el-form-item
- ></el-col>
- <el-col :span="12"
- ><el-form-item label="鑺傜偣ID">
- <el-input
- type="text"
- placeholder="璇疯緭鍏ヨ妭鐐�"
- v-model="item.targetid"
- show-word-limit
- >
- </el-input> </el-form-item
- ></el-col>
- </el-row>
- <el-row :gutter="10">
- <el-col :span="12"
- ><el-form-item label="澶勭悊">
- <el-input
- type="text"
- placeholder="(榛樿)鏃犲0"
- v-model="item.text"
- maxlength="10"
- show-word-limit
- >
- </el-input> </el-form-item
- ></el-col>
- <el-col :span="12"
- ><el-form-item label="閫変腑璺宠浆(缂�)">
- <el-input
- type="text"
- placeholder="璇疯緭鍏ラ鐩妭鐐�"
- v-model="item.jump"
- show-word-limit
- >
- </el-input> </el-form-item
- ></el-col>
- </el-row>
- <el-form-item label="鍖归厤姝e垯">
- <el-input
- style="width: 24vw"
- type="textarea"
- placeholder="璇疯緭鍏ラ鍙�"
- v-model="item.targetregex"
- show-word-limit
- >
- </el-input>
- </el-form-item>
- <el-row :gutter="10">
- <el-col :span="16">
- <el-form-item label="璇煶鏂囦欢">
- <el-upload
- class="upload-demo"
- style="display: flex"
- action="https://jsonplaceholder.typicode.com/posts/"
- :on-change="handleChange"
- :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="8">
- <div style="text-align: right; padding-right: 10px">
- <el-button type="danger" @click="" round>鍒犻櫎</el-button>
- </div>
+ style="width: 400px"
+ type="textarea"
+ v-model="topicobj.value"
+ placeholder="闂鏀堕泦鍐呭"
+ ></el-input>
+ </el-form-item>
</el-col>
</el-row>
- </div> -->
- <Regular
- :TargetoptionList="topicobj.ivrLibaScriptTargetoptionList"
- @deloption="deloption"
- :controlsc="false"
- />
- <!-- 鏃犲尮閰嶇被鍨� -->
- <div class="topicxq">
- <el-row :gutter="10">
- <el-col :span="12"
- ><el-form-item label="鏃犲尮閰嶈瘽鏈�">
- <el-input
- type="text"
- placeholder="璇疯緭鍏�"
- v-model="topicobj.nomatchtext"
- show-word-limit
- >
- </el-input> </el-form-item
- ></el-col>
- </el-row>
- <el-row :gutter="10">
- <el-col :span="12"
- ><el-form-item label="澶勭悊">
- <el-input
- type="text"
- placeholder="(榛樿)鏃犲0"
- v-model="topicobj.text"
- maxlength="10"
- show-word-limit
- >
- </el-input> </el-form-item
- ></el-col>
- </el-row>
-
- <el-row :gutter="10">
- <el-col :span="16">
- <el-form-item label="璇煶鏂囦欢">
- <el-upload
- class="upload-demo"
- style="display: flex"
- action="https://jsonplaceholder.typicode.com/posts/"
- :on-change="handleChange"
- :file-list="fileList"
- :limit="1"
- :on-exceed="handleExceed"
- >
- <el-button size="small" type="primary"
- >鐐瑰嚮涓婁紶</el-button
- >
- </el-upload>
- </el-form-item></el-col
- >
- </el-row>
</div>
- <div class="topicxq">
- <el-row :gutter="10">
- <el-col :span="12"
- ><el-form-item label="鍚笉娓呰瘽鏈�">
- <el-input
- type="text"
- placeholder="璇疯緭鍏�"
- v-model="topicobj.noclearlytext"
- show-word-limit
- >
- </el-input> </el-form-item
- ></el-col>
- </el-row>
- <el-row :gutter="10">
- <el-col :span="12"
- ><el-form-item label="澶勭悊">
- <el-input
- type="text"
- placeholder="(榛樿)鏃犲0"
- v-model="topicobj.text"
- maxlength="10"
- show-word-limit
- >
- </el-input> </el-form-item
- ></el-col>
- </el-row>
+ <div v-else>
+ <div class="headline">
+ <div class="basics">閫夐」璁剧疆</div>
+ <!-- <div class="headbottom">
+ <el-button
+ type="primary"
+ icon="el-icon-circle-plus-outline"
+ @click="addzbiao"
+ >娣诲姞鎸囨爣</el-button
+ >
+ </div> -->
+ </div>
- <el-row :gutter="10">
- <el-col :span="16">
- <el-form-item label="璇煶鏂囦欢">
- <el-upload
- class="upload-demo"
- style="display: flex"
- action="https://jsonplaceholder.typicode.com/posts/"
- :on-change="handleChange"
- :file-list="fileList"
- :limit="1"
- :on-exceed="handleExceed"
- >
- <el-button size="small" type="primary"
- >鐐瑰嚮涓婁紶</el-button
+ <Regular
+ :TargetoptionList="topicobj.ivrLibaScriptTargetoptionList"
+ @deloption="deloption"
+ :controlsc="false"
+ />
+ <!-- 鏃犲尮閰嶇被鍨� -->
+ <div class="topicxq">
+ <el-row :gutter="10">
+ <el-col :span="12"
+ ><el-form-item label="鏃犲尮閰嶈瘽鏈�">
+ <el-input
+ type="text"
+ placeholder="璇疯緭鍏�"
+ v-model="topicobj.noMatchText"
+ show-word-limit
>
- </el-upload>
- </el-form-item></el-col
- >
- </el-row>
- </div>
- <div class="topicxq">
- <el-row :gutter="10">
- <el-col :span="12"
- ><el-form-item label="闈欓粯璇濇湳">
- <el-input
- type="text"
- placeholder="璇疯緭鍏�"
- v-model="topicobj.sliencetext"
- show-word-limit
- >
- </el-input> </el-form-item
- ></el-col>
- </el-row>
- <el-row :gutter="10">
- <el-col :span="12"
- ><el-form-item label="澶勭悊">
- <el-input
- type="text"
- placeholder="(榛樿)鏃犲0"
- v-model="topicobj.text"
- maxlength="10"
- show-word-limit
- >
- </el-input> </el-form-item
- ></el-col>
- </el-row>
+ </el-input> </el-form-item
+ ></el-col>
+ </el-row>
+ <el-row :gutter="10">
+ <el-col :span="12"
+ ><el-form-item label="澶勭悊">
+ <el-input
+ type="text"
+ placeholder="(榛樿)鏃犲0"
+ v-model="topicobj.text"
+ maxlength="10"
+ show-word-limit
+ >
+ </el-input> </el-form-item
+ ></el-col>
+ </el-row>
- <el-row :gutter="10">
- <el-col :span="16">
- <el-form-item label="璇煶鏂囦欢">
- <el-upload
- class="upload-demo"
- style="display: flex"
- action="https://jsonplaceholder.typicode.com/posts/"
- :on-change="handleChange"
- :file-list="fileList"
- :limit="1"
- :on-exceed="handleExceed"
- >
- <el-button size="small" type="primary"
- >鐐瑰嚮涓婁紶</el-button
+ <el-row :gutter="10">
+ <el-col :span="16">
+ <el-form-item label="璇煶鏂囦欢">
+ <el-upload
+ class="upload-demo"
+ style="display: flex"
+ action="https://jsonplaceholder.typicode.com/posts/"
+ :on-change="handleChange"
+ :file-list="fileList"
+ :limit="1"
+ :on-exceed="handleExceed"
>
- </el-upload>
- </el-form-item></el-col
- >
- </el-row>
+ <el-button size="small" type="primary"
+ >鐐瑰嚮涓婁紶</el-button
+ >
+ </el-upload>
+ </el-form-item></el-col
+ >
+ </el-row>
+ </div>
+ <div class="topicxq">
+ <el-row :gutter="10">
+ <el-col :span="12"
+ ><el-form-item label="鍚笉娓呰瘽鏈�">
+ <el-input
+ type="text"
+ placeholder="璇疯緭鍏�"
+ v-model="topicobj.noClearlyText"
+ show-word-limit
+ >
+ </el-input> </el-form-item
+ ></el-col>
+ </el-row>
+ <el-row :gutter="10">
+ <el-col :span="12"
+ ><el-form-item label="澶勭悊">
+ <el-input
+ type="text"
+ placeholder="(榛樿)鏃犲0"
+ v-model="topicobj.text"
+ maxlength="10"
+ show-word-limit
+ >
+ </el-input> </el-form-item
+ ></el-col>
+ </el-row>
+
+ <el-row :gutter="10">
+ <el-col :span="16">
+ <el-form-item label="璇煶鏂囦欢">
+ <el-upload
+ class="upload-demo"
+ style="display: flex"
+ action="https://jsonplaceholder.typicode.com/posts/"
+ :on-change="handleChange"
+ :file-list="fileList"
+ :limit="1"
+ :on-exceed="handleExceed"
+ >
+ <el-button size="small" type="primary"
+ >鐐瑰嚮涓婁紶</el-button
+ >
+ </el-upload>
+ </el-form-item></el-col
+ >
+ </el-row>
+ </div>
+ <div class="topicxq">
+ <el-row :gutter="10">
+ <el-col :span="12"
+ ><el-form-item label="闈欓粯璇濇湳">
+ <el-input
+ type="text"
+ placeholder="璇疯緭鍏�"
+ v-model="topicobj.slienceText"
+ show-word-limit
+ >
+ </el-input> </el-form-item
+ ></el-col>
+ </el-row>
+ <el-row :gutter="10">
+ <el-col :span="12"
+ ><el-form-item label="澶勭悊">
+ <el-input
+ type="text"
+ placeholder="(榛樿)鏃犲0"
+ v-model="topicobj.text"
+ maxlength="10"
+ show-word-limit
+ >
+ </el-input> </el-form-item
+ ></el-col>
+ </el-row>
+
+ <el-row :gutter="10">
+ <el-col :span="16">
+ <el-form-item label="璇煶鏂囦欢">
+ <el-upload
+ class="upload-demo"
+ style="display: flex"
+ action="https://jsonplaceholder.typicode.com/posts/"
+ :on-change="handleChange"
+ :file-list="fileList"
+ :limit="1"
+ :on-exceed="handleExceed"
+ >
+ <el-button size="small" type="primary"
+ >鐐瑰嚮涓婁紶</el-button
+ >
+ </el-upload>
+ </el-form-item></el-col
+ >
+ </el-row>
+ </div>
</div>
</el-form>
</el-card>
</div>
</div>
- <el-button type="success" @click="nextstep('ruleForm')"
- >涓嬩竴姝�</el-button
+ <el-button type="success" @click="Departmenttreatment('ruleForm')">{{
+ task ? "淇濆瓨鍒颁换鍔℃ā鐗�" : "淇濆瓨棰樼洰鏁版嵁"
+ }}</el-button>
+ <el-button type="primary" plain @click="laststep()">涓婁竴姝�</el-button>
+ <el-button type="success" plain @click="preview('ruleForm')"
+ >鏌ョ湅棰勮</el-button
>
- <el-button type="primary" @click="laststep()">涓婁竴姝�</el-button>
<el-button type="info" @click="closeFm('ruleForm')">鍏抽棴</el-button>
- <el-button @click="Departmenttreatment('ruleForm')"
- >淇濆瓨棰樼洰鏁版嵁</el-button
- >
</div>
<!-- 闅忚妯$増棰勮 -->
<div v-if="Editprogress == 3">
- <div class="leftvlue-jbxx">闅忚妯$増棰勮</div>
+ <div class="leftvlue-jbxx">闅忚妯$増闂棰勮</div>
<el-divider></el-divider>
<div class="preview-left">
<!-- 鍗曢�� -->
- <div class="topic-dev" v-for="item in valssu" :key="item.aaa">
+ <div
+ class="topic-dev"
+ v-for="(item, index) in valssu"
+ :key="item.aaa"
+ >
<div class="dev-text">
- {{ item.idd }}銆乕鍗曢�塢<span>{{ item.wssd }}</span>
+ {{ index + 1 }}銆乕鍗曢�塢<span>{{ item.questionText }}</span>
</div>
<div class="dev-xx">
<el-radio-group v-model="radio">
<el-radio
- v-for="(items, index) in item.sdadd"
+ v-for="(items, index) in item.ivrLibaScriptTargetoptionList"
:key="index"
:label="index"
- >{{ items }}</el-radio
+ >{{ items.targetvalue }}</el-radio
>
</el-radio-group>
</div>
</div>
<!-- 澶氶�� -->
- <div class="topic-dev" v-for="item in valssu" :key="item.aaa">
+ <div
+ class="topic-dev"
+ v-for="(item, index) in valssu"
+ :key="item.aaa"
+ >
<div class="dev-text">
- {{ item.idd }}銆乕澶氶�塢<span>{{ item.wssd }}</span>
+ {{ index + 1 }}銆乕澶氶�塢<span>{{ item.questionText }}</span>
</div>
<div class="dev-xx">
<el-checkbox-group v-model="radios">
<el-checkbox
- v-for="(items, index) in item.sdadd"
- :key="index"
- :label="index"
+ v-for="(items, indexs) in item.ivrLibaScriptTargetoptionList"
+ :key="indexs"
+ :label="indexs"
>
- {{ items }}
+ {{ items.targetvalue }}
</el-checkbox>
</el-checkbox-group>
</div>
</div>
- <!-- 濉┖ -->
+ <!-- 濉┖
<div class="topic-dev" v-for="item in valssu" :key="item.aaa">
<div class="dev-text">
{{ item.idd }}銆乕濉┖]<span>{{ item.wssd }}</span>
@@ -803,11 +744,11 @@
<el-input placeholder="璇疯緭鍏ョ瓟妗�" v-model="radioas" clearable>
</el-input>
</div>
- </div>
+ </div> -->
</div>
+ <el-button type="primary" plain @click="laststep()">涓婁竴姝�</el-button>
+ <el-button type="warning" @click="measurement()">鍓嶅線娴嬭瘯</el-button>
<el-button type="info" @click="closeFm('ruleForm')">鍏抽棴</el-button>
- <el-button>瀵煎嚭涓簆df</el-button>
- <el-button type="primary" @click="laststep()">涓婁竴姝�</el-button>
</div>
</div>
<!-- 娣诲姞棰樼洰寮圭獥 -->
@@ -905,6 +846,7 @@
getillnesslist,
illnesslistget,
getillness,
+ getgenerallist,
} from "@/api/AiCentre/index";
export default {
@@ -917,6 +859,8 @@
drawer: false, //鎺у埗灞曞紑
radios: [], //澶氶�夐閫変腑
radioas: "", //濉┖棰樼瓟妗�
+ task: null, //鏄惁鏉ヨ嚜浠诲姟
+ taskform: null, //浠诲姟淇℃伅
labelInfovalue: [], //鏍囩涓存椂瀛樺偍
deptNamesvalue: [], //绉戝涓存椂瀛樺偍
dynamicTags: [],
@@ -953,6 +897,7 @@
precedencetype: [],
usable: [],
required: [],
+ valuetype: [],
mode: [],
inputVisible: false,
inputVisibleillness: false,
@@ -967,7 +912,7 @@
},
tempDetpRelevanceslist: [],
delScriptVOList: [],
- optionIndex:'',
+ optionIndex: "",
variablelist: [
{ variatename: "濮撳悕", variate: "${name}", default: 1 },
{ variatename: "鐢佃瘽", variate: "${phone}", default: 1 },
@@ -983,37 +928,11 @@
},
],
- valssu: [
- {
- idd: 1,
- wssd: "浣犳渶杩戞�庝箞鏍�",
- sdadd: ["sss", "ssccss", "ssaas", "ss"],
- },
- ],
+ valssu: [],
+ radio: "",
addvalue: "娣诲姞棰樼洰",
// 棰樼洰琛ㄦ牸鏁版嵁
- userList: [
- {
- userid: "1",
- userName: "涓�鍙烽殢璁挎ā鐗�",
- verbaltrick: "涓�鍙烽殢璁挎ā鐗�",
- },
- {
- userid: "2",
- userName: "浜屽彿闅忚妯$増",
- verbaltrick: "涓�鍙烽殢璁挎ā鐗�",
- },
- {
- userid: "3",
- userName: "涓夊彿闅忚妯$増",
- verbaltrick: "涓�鍙烽殢璁挎ā鐗�",
- },
- {
- userid: "4",
- userName: "鍥涘彿闅忚妯$増",
- verbaltrick: "涓�鍙烽殢璁挎ā鐗�",
- },
- ],
+ userList: [],
// 鏌ヨ鍙傛暟
queryParams: {
pageNum: 1,
@@ -1028,35 +947,51 @@
},
created() {
+ this.RoutingDataProcessing();
this.gettabList();
this.getvFollowup();
this.auxiliary();
this.mode = store.getters.mode;
this.usable = store.getters.usable;
this.required = store.getters.required;
+ this.valuetype = store.getters.valuetype;
this.languagelist = store.getters.languagelist;
this.courtyardlist = store.getters.courtyardlist;
this.precedencetype = store.getters.precedencetype;
},
methods: {
+ //鍏叡鏂规硶--------------------
getIndexInArray(arr, obj) {
return arr.indexOf(obj);
},
processElement(element) {
return { ...element, isoperation: 0 };
},
+ // 璺敱鏁版嵁澶勭悊
+ RoutingDataProcessing() {
+ this.id = this.$route.query.id;
+ this.task = this.$route.query.task;
+ console.log(this.task,'task');
+ if (this.task) {
+ this.id = this.$route.query.id;
+ }
+ },
// 鑾峰彇琛ㄥ崟鏁版嵁
getvFollowup() {
- this.id = this.$route.query.id;
-
getvFollowup({ id: this.id }).then((res) => {
this.ruleForm = res.data;
+
this.tempDetpRelevanceslist = JSON.parse(this.ruleForm.deptNames);
this.ruleForm.suitway = this.ruleForm.suitway.split(",");
this.ruleForm.campus = this.ruleForm.campus.split(",");
this.ruleForm.submoduleID = this.ruleForm.submoduleID.split(",");
+ this.ruleForm.submoduleID = this.ruleForm.submoduleID.map((res) => {
+ return Number(res);
+ });
+ console.log(this.ruleForm.submoduleID, "this.ruleForm.submoduleID鍙�");
this.dynamicTags = this.ruleForm.ivrLibaTemplateTagList;
+
this.dynamicTags = this.ruleForm.ivrLibaTemplateTagList.map(
this.processElement
);
@@ -1081,8 +1016,15 @@
getFollowupclassify({}).then((res) => {
this.indexAssortlist = res.rows;
});
+ getgenerallist({
+ pageNum: 1,
+ pageSize: 100,
+ }).then((res) => {
+ this.generallist = res.rows;
+ });
// 鐤剧梾鍒�
},
+ //
submitForm(formName) {
if (this.ruleForm.id) {
this.ruleForm.isoperation = 2;
@@ -1095,6 +1037,19 @@
this.ruleForm.submoduleID = this.ruleForm.submoduleID.join(",");
// 鎻愪氦
+ this.ruleForm.ivrLibaTemplateScriptVOList.forEach((res) => {
+ if (!res.isoperation) {
+ res.isoperation = 2;
+ }
+ res.ivrLibaScriptTargetoptionList =
+ res.ivrLibaScriptTargetoptionList.map((item) => {
+ if (!item.isoperation) {
+ item.isoperation = 2;
+ item.templateID = this.ruleForm.id;
+ }
+ return item;
+ });
+ });
this.illnesslist.forEach((item, index) => {
if (!item.id) {
@@ -1265,31 +1220,44 @@
getverbaltrick({ id: row.id }).then((res) => {
console.log(res, "璇︽儏");
res.data.isoperation = 1;
- res.data.id = null;
+ res.data.pid = this.ruleForm.id;
res.data.ivrLibaScriptTargetoptionList.forEach((item) => {
item.isoperation = 1;
});
this.ruleForm.ivrLibaTemplateScriptVOList.push(res.data);
+ this.sortFn();
});
},
handleDelete(row) {
- let index = this.ruleForm.ivrLibaTemplateScriptVOList.indexOf(row);
- this.ruleForm.ivrLibaTemplateScriptVOList.splice(
- this.ruleForm.ivrLibaTemplateScriptVOList.indexOf(row),
- 1
- );
- row.isoperation = 3;
- this.delScriptVOList.push(row);
+ this.$modal
+ .confirm('鏄惁纭鍒犻櫎闂锛�"' + row.questiontitle + '"锛�')
+ .then(() => {
+ this.ruleForm.ivrLibaTemplateScriptVOList.splice(
+ this.ruleForm.ivrLibaTemplateScriptVOList.indexOf(row),
+ 1
+ );
+ row.isoperation = 3;
+ this.delScriptVOList.push(row);
+ this.$modal.msgSuccess("宸插垹闄わ紝淇濆瓨妯$増鐢熸晥");
+ })
+ .catch(() => {});
},
handleUpdate(row) {
console.log(row);
this.optionIndex = this.ruleForm.ivrLibaTemplateScriptVOList.indexOf(row);
if (row.ivrLibaScriptTargetoptionList.length) {
+ console.log(11);
this.topicobj = row;
+ this.topicobj.valueType = row.valueType;
} else {
getverbaltrick({ id: row.id }).then((res) => {
- this.topicobj = res.data;
- console.log(res.data, "topicobj");
+ if (res.data) {
+ this.topicobj = res.data;
+ console.log(res.data, "topicobj");
+ } else {
+ this.topicobj = row;
+ console.log("娌℃壘鍒伴�夐」锛岃鏌ョ湅闂搴撴槸鍚︽纭厤缃�");
+ }
});
}
},
@@ -1317,21 +1285,30 @@
this.ruleForm.ivrLibaTemplateScriptVOList.splice(index + 1, 0, item); // 灏唅tem鎻掑叆鍒扮储寮曚綅缃殑鍓嶄竴浣�
this.sortFn();
},
+ // 闂鎺掑簭
sortFn() {
this.ruleForm.ivrLibaTemplateScriptVOList =
this.ruleForm.ivrLibaTemplateScriptVOList.map((item, index) => {
- return Object.assign({}, item, { guid: (index + 1).toString() });
+ return Object.assign({}, item, { targetid: (index + 1).toString() });
});
+ this.ruleForm.ivrLibaTemplateScriptVOList.forEach((question, index) => {
+ question.ivrLibaScriptTargetoptionList =
+ question.ivrLibaScriptTargetoptionList.map((option) => {
+ option.nextQuestion = Number(question.targetid) + 1;
+ return option;
+ });
+ });
console.log(this.ruleForm.ivrLibaTemplateScriptVOList);
},
// -----------------------璇濇湳閫夐」
deloption() {},
// 淇敼棰樼洰淇℃伅
Submittopicobj() {
- this.ruleForm.ivrLibaTemplateScriptVOList[this.optionIndex]=this.topicobj;
- this.$modal.msgSuccess("鏆傚瓨閫夐」鎴愬姛");
+ this.ruleForm.ivrLibaTemplateScriptVOList[this.optionIndex] =
+ this.topicobj;
+ this.$modal.msgSuccess("鏆傚瓨閫夐」鎴愬姛");
},
-
+
// ---------------------
resetForm(formName) {
this.$refs[formName].resetFields();
@@ -1378,6 +1355,24 @@
this.inputVisibleillness = false;
this.inputValueillness = "";
},
+ // 棰勮---------------
+ preview() {
+ console.log(this.ruleForm);
+ this.valssu = this.ruleForm.ivrLibaTemplateScriptVOList;
+ this.Editprogress = 3;
+ },
+ // 鍓嶅線娴嬭瘯
+ measurement() {
+ this.$modal
+ .confirm("鍗冲皢鍓嶅線妯$増娴嬭瘯椤甸潰锛岃纭妯$増鏁版嵁宸蹭繚瀛樸��")
+ .then((res) => {
+ this.$router.push({
+ path: "/knowledge/templateku/configurat/measurement",
+ query: { id: this.id, name: this.ruleForm.templateName },
+ });
+ })
+ .catch(() => {});
+ },
},
};
</script>
--
Gitblit v1.9.3