From a4dff39e4fd1e29b4b94997c79a1dd5f575f56de Mon Sep 17 00:00:00 2001
From: WXL <1785969728@qq.com>
Date: 星期一, 29 七月 2024 11:15:42 +0800
Subject: [PATCH] 测试完成
---
src/views/repositoryai/templateku/configurat/index.vue | 270 +++++++++++++++++++++++++++++++++---------------------
1 files changed, 165 insertions(+), 105 deletions(-)
diff --git a/src/views/repositoryai/templateku/configurat/index.vue b/src/views/repositoryai/templateku/configurat/index.vue
index b9fbd06..52f5ed0 100644
--- a/src/views/repositoryai/templateku/configurat/index.vue
+++ b/src/views/repositoryai/templateku/configurat/index.vue
@@ -188,6 +188,7 @@
@change="handleInputConfirm"
filterable
remote
+ allow-create
reserve-keyword
default-first-option
:remote-method="remoteMethodtag"
@@ -351,8 +352,10 @@
>涓嬩竴姝�</el-button
>
<el-button type="info" @click="closeFm('ruleForm')">鍏抽棴</el-button>
- <el-button type="success" @click="Departmenttreatment('ruleForm')"
- >淇濆瓨闅忚妯$増鍩虹淇℃伅</el-button
+ <el-button
+ type="success"
+ @click="Departmenttreatment('ruleForm')"
+ >{{ task ? "淇濆瓨鍒颁换鍔℃ā鐗�" : "淇濆瓨闅忚妯$増鍩虹淇℃伅" }}</el-button
>
</el-form-item>
</el-form>
@@ -386,15 +389,15 @@
<el-table-column
label="鏍囬"
align="center"
- key="questiontitle"
- prop="questiontitle"
+ key="scriptTopic"
+ prop="scriptTopic"
:show-overflow-tooltip="true"
/>
<el-table-column
label="闂璇濇湳"
align="center"
- key="questionText"
- prop="questionText"
+ key="scriptContent"
+ prop="scriptContent"
:show-overflow-tooltip="true"
/>
@@ -451,9 +454,8 @@
</div>
<el-form-item label="棰樼洰鏍囬">
<el-input
- v-model="topicobj.questiontitle"
+ v-model="topicobj.scriptTopic"
placeholder="璇蜂粠宸︿晶鍒楄〃閫夋嫨"
- :disabled="true"
></el-input>
</el-form-item>
<el-form-item label="闂鑺傜偣">
@@ -534,10 +536,11 @@
<!-- 鏃犲尮閰嶇被鍨� -->
<div class="topicxq">
<el-row :gutter="10">
- <el-col :span="12"
+ <el-col :span="20"
><el-form-item label="鏃犲尮閰嶈瘽鏈�">
<el-input
- type="text"
+ type="textarea"
+ style="width: 400px"
placeholder="璇疯緭鍏�"
v-model="topicobj.noMatchText"
show-word-limit
@@ -545,7 +548,7 @@
</el-input> </el-form-item
></el-col>
</el-row>
- <el-row :gutter="10">
+ <!-- <el-row :gutter="10">
<el-col :span="12"
><el-form-item label="澶勭悊">
<el-input
@@ -557,7 +560,7 @@
>
</el-input> </el-form-item
></el-col>
- </el-row>
+ </el-row> -->
<el-row :gutter="10">
<el-col :span="16">
@@ -581,10 +584,11 @@
</div>
<div class="topicxq">
<el-row :gutter="10">
- <el-col :span="12"
+ <el-col :span="20"
><el-form-item label="鍚笉娓呰瘽鏈�">
<el-input
- type="text"
+ style="width: 400px"
+ type="textarea"
placeholder="璇疯緭鍏�"
v-model="topicobj.noClearlyText"
show-word-limit
@@ -592,7 +596,7 @@
</el-input> </el-form-item
></el-col>
</el-row>
- <el-row :gutter="10">
+ <!-- <el-row :gutter="10">
<el-col :span="12"
><el-form-item label="澶勭悊">
<el-input
@@ -604,7 +608,7 @@
>
</el-input> </el-form-item
></el-col>
- </el-row>
+ </el-row> -->
<el-row :gutter="10">
<el-col :span="16">
@@ -628,10 +632,11 @@
</div>
<div class="topicxq">
<el-row :gutter="10">
- <el-col :span="12"
+ <el-col :span="20"
><el-form-item label="闈欓粯璇濇湳">
<el-input
- type="text"
+ type="textarea"
+ style="width: 400px"
placeholder="璇疯緭鍏�"
v-model="topicobj.slienceText"
show-word-limit
@@ -639,7 +644,7 @@
</el-input> </el-form-item
></el-col>
</el-row>
- <el-row :gutter="10">
+ <!-- <el-row :gutter="10">
<el-col :span="12"
><el-form-item label="澶勭悊">
<el-input
@@ -651,7 +656,7 @@
>
</el-input> </el-form-item
></el-col>
- </el-row>
+ </el-row> -->
<el-row :gutter="10">
<el-col :span="16">
@@ -679,9 +684,9 @@
</div>
</div>
- <el-button type="success" @click="Departmenttreatment('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
@@ -692,18 +697,20 @@
<div v-if="Editprogress == 3">
<div class="leftvlue-jbxx">闅忚妯$増闂棰勮</div>
<el-divider></el-divider>
+
<div class="preview-left">
<!-- 鍗曢�� -->
<div
- class="topic-dev"
- v-for="(item, index) in valssu"
- :key="item.aaa"
+ class="scriptTopic-dev"
+ v-for="item in valssu"
+ :key="item.targetid"
+ v-if="item.valueType == 1"
>
<div class="dev-text">
- {{ index + 1 }}銆乕鍗曢�塢<span>{{ item.questionText }}</span>
+ {{ item.targetid }}銆乕鍗曢�塢<span>{{ item.scriptContent }}</span>
</div>
<div class="dev-xx">
- <el-radio-group v-model="radio">
+ <el-radio-group v-model="item.remark">
<el-radio
v-for="(items, index) in item.ivrLibaScriptTargetoptionList"
:key="index"
@@ -715,35 +722,41 @@
</div>
<!-- 澶氶�� -->
<div
- class="topic-dev"
- v-for="(item, index) in valssu"
- :key="item.aaa"
+ class="scriptTopic-dev"
+ v-for="item in valssu"
+ :key="item.targetid"
+ v-if="item.valueType == 2"
>
<div class="dev-text">
- {{ index + 1 }}銆乕澶氶�塢<span>{{ item.questionText }}</span>
+ {{ item.targetid }}銆乕澶氶�塢<span>{{ item.scriptContent }}</span>
</div>
<div class="dev-xx">
- <el-checkbox-group v-model="radios">
+ <el-checkbox-group v-model="item.remark">
<el-checkbox
- v-for="(items, indexs) in item.ivrLibaScriptTargetoptionList"
- :key="indexs"
- :label="indexs"
+ v-for="(items, index) in item.ivrLibaScriptTargetoptionList"
+ :key="index"
+ :label="index"
>
{{ items.targetvalue }}
</el-checkbox>
</el-checkbox-group>
</div>
</div>
- <!-- 濉┖
- <div class="topic-dev" v-for="item in valssu" :key="item.aaa">
+ <!-- 濉┖ -->
+ <div
+ class="scriptTopic-dev"
+ v-for="item in valssu"
+ :key="item.targetid"
+ v-if="item.valueType == 3"
+ >
<div class="dev-text">
- {{ item.idd }}銆乕濉┖]<span>{{ item.wssd }}</span>
+ {{ item.targetid }}銆乕濉┖]<span>{{ item.scriptContent }}</span>
</div>
<div class="dev-xx">
<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>
@@ -755,7 +768,7 @@
title="娣诲姞棰樼洰"
:visible.sync="drawer"
custom-class="demo-drawer"
- width="50%"
+ size="50%"
>
<div class="preview-left">
<el-form
@@ -767,7 +780,7 @@
>
<el-form-item label="鏍囬" prop="userName">
<el-input
- v-model="queryParams.questiontitle"
+ v-model="queryParams.scriptTopic"
placeholder="璇疯緭鍏�"
clearable
style="width: 200px"
@@ -792,15 +805,23 @@
<el-table-column
label="鏍囬"
align="center"
- key="questiontitle"
- prop="questiontitle"
+ key="scriptTopic"
+ prop="scriptTopic"
width="100"
/>
<el-table-column
label="闂璇濇湳"
align="center"
- key="questionText"
- prop="questionText"
+ key="scriptContent"
+ prop="scriptContent"
+ width="200"
+ :show-overflow-tooltip="true"
+ />
+ <el-table-column
+ label="閫夐」鍐呭"
+ align="center"
+ key="targetoptions"
+ prop="targetoptions"
width="200"
:show-overflow-tooltip="true"
/>
@@ -819,6 +840,12 @@
</template>
</el-table-column>
</el-table>
+ <pagination
+ :total="total"
+ :page.sync="queryParams.pageNum"
+ :limit.sync="queryParams.pageSize"
+ @pagination="getaddtopiclist"
+ />
</div>
</el-drawer>
</div>
@@ -858,16 +885,27 @@
drawer: false, //鎺у埗灞曞紑
radios: [], //澶氶�夐閫変腑
radioas: "", //濉┖棰樼瓟妗�
+ task: null, //鏄惁鏉ヨ嚜浠诲姟
+ taskform: null, //浠诲姟淇℃伅
labelInfovalue: [], //鏍囩涓存椂瀛樺偍
deptNamesvalue: [], //绉戝涓存椂瀛樺偍
dynamicTags: [],
indexAssortlist: [],
inputValue: "",
inputValueillness: "",
- topicobj: {},
+ topicobj: {
+ noMatchText: "",
+ noClearlyText: "",
+ slienceText: "",
+ },
total: 1,
id: "",
- ruleForm: {},
+ ruleForm: {
+ templateName: "",
+ ivrLibaTemplateTagList: [],
+ ivrLibaTemplateScriptVOList: [],
+ tempDetpRelevances: [],
+ },
rules: {},
optionstag: [],
prefollowuplist: [],
@@ -925,38 +963,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,
@@ -971,6 +982,7 @@
},
created() {
+ this.RoutingDataProcessing();
this.gettabList();
this.getvFollowup();
this.auxiliary();
@@ -982,6 +994,7 @@
this.courtyardlist = store.getters.courtyardlist;
this.precedencetype = store.getters.precedencetype;
},
+ mounted() {},
methods: {
//鍏叡鏂规硶--------------------
@@ -991,37 +1004,54 @@
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;
+ if (this.id) {
+ getvFollowup({ id: this.id }).then((res) => {
+ if (res.code == 200) {
+ console.log(2211);
+ 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;
- 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);
+ this.dynamicTags = this.ruleForm.ivrLibaTemplateTagList.map(
+ this.processElement
+ );
+ console.log(this.ruleForm.suitway);
+ }
});
- console.log(this.ruleForm.submoduleID, "this.ruleForm.submoduleID鍙�");
- this.dynamicTags = this.ruleForm.ivrLibaTemplateTagList;
-
- this.dynamicTags = this.ruleForm.ivrLibaTemplateTagList.map(
- this.processElement
- );
- console.log(this.ruleForm.suitway);
- });
+ }
getillnesslist({
pageNum: 1,
pageSize: 100,
}).then((response) => {
this.optionsillness = response.rows;
});
- getillness({ outid: this.id, type: 3 }).then((res) => {
- this.illnesslist = res.rows;
- });
+ if (this.id) {
+ getillness({ outid: this.id, type: 3 }).then((res) => {
+ this.illnesslist = res.rows;
+ });
+ }
listDept(this.queryParams).then((response) => {
this.deptList = this.handleTree(response.data, "deptId");
});
@@ -1031,6 +1061,20 @@
// 鍒嗙被
getFollowupclassify({}).then((res) => {
this.indexAssortlist = res.rows;
+ if (this.$route.query.assortid) {
+ this.ruleForm.assortid = Number(this.$route.query.assortid);
+ }
+ });
+ // 绉戝
+ listDept(this.queryParams).then((response) => {
+ this.deptList = this.handleTree(response.data, "deptId");
+ });
+ // 鐤剧梾
+ getillnesslist({
+ pageNum: 1,
+ pageSize: 100,
+ }).then((response) => {
+ this.optionsillness = response.rows;
});
getgenerallist({
pageNum: 1,
@@ -1066,8 +1110,17 @@
return item;
});
});
-
+ compileFollowup(this.ruleForm).then((res) => {
+ this.$modal.msgSuccess("缂栬緫鎴愬姛");
+ this.confirmillness(res.data);
+ this.$router.go(-1);
+ });
+ },
+ confirmillness(guid) {
this.illnesslist.forEach((item, index) => {
+ if (guid) {
+ item.outid = guid;
+ }
if (!item.id) {
addtargetillness(item).then((res) => {});
}
@@ -1075,10 +1128,8 @@
if (this.illnesslistapi.length) {
deltargetillness(this.illnesslistapi.join(",")).then((res) => {});
}
- compileFollowup(this.ruleForm).then((res) => {
- this.$modal.msgSuccess("缂栬緫鎴愬姛");
- this.$router.go(-1);
- });
+ this.illnessVisible = false;
+ this.$modal.msgSuccess("缂栬緫鎴愬姛");
},
// 绉戝澶勭悊
Departmenttreatment() {
@@ -1233,6 +1284,14 @@
},
addtopic(row) {
console.log(row);
+ if (
+ this.ruleForm.ivrLibaTemplateScriptVOList.some(
+ (obj) => obj.scriptTopic == row.scriptTopic
+ )
+ ) {
+ this.$modal.msgError("璇ラ鐩凡瀛樺湪");
+ return;
+ }
getverbaltrick({ id: row.id }).then((res) => {
console.log(res, "璇︽儏");
res.data.isoperation = 1;
@@ -1242,11 +1301,12 @@
});
this.ruleForm.ivrLibaTemplateScriptVOList.push(res.data);
this.sortFn();
+ this.$modal.msgSuccess("娣诲姞鎴愬姛");
});
},
handleDelete(row) {
this.$modal
- .confirm('鏄惁纭鍒犻櫎闂锛�"' + row.questiontitle + '"锛�')
+ .confirm('鏄惁纭鍒犻櫎闂锛�"' + row.scriptTopic + '"锛�')
.then(() => {
this.ruleForm.ivrLibaTemplateScriptVOList.splice(
this.ruleForm.ivrLibaTemplateScriptVOList.indexOf(row),
@@ -1443,7 +1503,7 @@
border: 1px solid #dcdfe6;
-webkit-box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.12),
0 0 6px 0 rgba(0, 0, 0, 0.04);
- .topic-dev {
+ .scriptTopic-dev {
margin-bottom: 25px;
font-size: 20px !important;
.dev-text {
--
Gitblit v1.9.3