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/followvisit/tasklist/index.vue | 35 ------ src/views/repositoryai/templateku/configurat/index.vue | 58 ++++------- src/api/AiCentre/SingleTask.js | 28 +++++ src/views/patient/propaganda/particty.vue | 120 +++++++++++++++++++++-- 4 files changed, 160 insertions(+), 81 deletions(-) diff --git a/src/api/AiCentre/SingleTask.js b/src/api/AiCentre/SingleTask.js index 13ab124..5943022 100644 --- a/src/api/AiCentre/SingleTask.js +++ b/src/api/AiCentre/SingleTask.js @@ -93,4 +93,30 @@ method: "post", data: data, }); - } \ No newline at end of file + } + + // 鑾峰彇浠诲姟妯$増璇︽儏 + export function TaskTemplategetinfo(id) { + return request({ + url: "/smartor/ivrTaskTemplate/getInfo/"+id, + method: "get", + }); + } + // 浠诲姟妯$増鏂板淇敼 + export function TaskTemplatecomit(data) { + return request({ + url: "/smartor/ivrTaskTemplate/saveOrUpdateTempScript", + method: "post", + data: data, + }); + } + // 浠诲姟鍙戦�侊紝鎵ц + export function TaskTemplateSendExecution(data) { + return request({ + url: "/dev-api/smartor/tasksingle/taskSend", + method: "post", + data: data, + }); + } + + diff --git a/src/views/followvisit/tasklist/index.vue b/src/views/followvisit/tasklist/index.vue index 71c8e71..b6d3ecc 100644 --- a/src/views/followvisit/tasklist/index.vue +++ b/src/views/followvisit/tasklist/index.vue @@ -333,7 +333,7 @@ resetUserPwd, changeUserStatus, } from "@/api/system/user"; -import { getTasklist, getTaskInfo } from "@/api/AiCentre/index"; +import { getTasklist, getTaskInfo,TaskTemplateSendExecution } from "@/api/AiCentre/index"; import Treeselect from "@riophae/vue-treeselect"; import "@riophae/vue-treeselect/dist/vue-treeselect.css"; @@ -623,21 +623,7 @@ this.options = []; } }, - // 闂ㄨ瘖闅忚鐘舵�佷慨鏀� - handleStatusChange(row) { - let text = row.status === "0" ? "鍚敤" : "鍋滅敤"; - this.$modal - .confirm('纭瑕�"' + text + '""' + row.userName + '"鐢ㄦ埛鍚楋紵') - .then(function () { - return changeUserStatus(row.userId, row.status); - }) - .then(() => { - this.$modal.msgSuccess(text + "鎴愬姛"); - }) - .catch(function () { - row.status = row.status === "0" ? "1" : "0"; - }); - }, + // 鍙栨秷鎸夐挳 cancel() { this.addalteropen = false; @@ -716,22 +702,7 @@ }, // 鍒犻櫎浠诲姟 deletefn(){}, - /** 閲嶇疆瀵嗙爜鎸夐挳鎿嶄綔 */ - handleResetPwd(row) { - this.$prompt('璇疯緭鍏�"' + row.userName + '"鐨勬柊瀵嗙爜', "鎻愮ず", { - confirmButtonText: "纭畾", - cancelButtonText: "鍙栨秷", - closeOnClickModal: false, - inputPattern: /^.{5,20}$/, - inputErrorMessage: "鐢ㄦ埛瀵嗙爜闀垮害蹇呴』浠嬩簬 5 鍜� 20 涔嬮棿", - }) - .then(({ value }) => { - resetUserPwd(row.userId, value).then((response) => { - this.$modal.msgSuccess("淇敼鎴愬姛锛屾柊瀵嗙爜鏄細" + value); - }); - }) - .catch(() => {}); - }, + /** 鎻愪氦鎸夐挳 */ submitForm: function () { diff --git a/src/views/patient/propaganda/particty.vue b/src/views/patient/propaganda/particty.vue index d191f38..54a2be1 100644 --- a/src/views/patient/propaganda/particty.vue +++ b/src/views/patient/propaganda/particty.vue @@ -41,7 +41,7 @@ placeholder="璇疯緭鍏ヤ换鍔″悕绉�" /> </el-form-item ></el-col> - <el-col :span="12" + <el-col :span="8" ><el-form-item label="妯$増鍚嶇О"> <el-input style="width: 220px" @@ -50,6 +50,13 @@ placeholder="璇峰湪涓嬪垪閫夋嫨" /> </el-form-item ></el-col> + <el-col :span="4"> + <el-button + type="primary" + icon="el-icon-edit" + circle + ></el-button> + </el-col> </el-row> <el-form-item label="浠诲姟鎻忚堪"> @@ -637,6 +644,43 @@ > </span> </el-dialog> + <el-dialog title="妯$増棰勮" :visible.sync="previewtf" width="60%"> + <div class="preview-left"> + <!-- 鍗曢�� --> + <div + class="topic-dev" + v-for="(item, index) in questionList" + :key="item.aaa" + > + <div class="dev-text"> + {{ index + 1 }}銆�<span>{{ item.questionText }}</span> + </div> + + <div class="dev-xx" v-if="item.valueType == 1"> + <el-radio-group v-model="item.radio"> + <el-radio + v-for="(items, index) in item.ivrLibaScriptTargetoptionList" + :key="items.id" + :label="items.id" + >{{ items.targetvalue }}</el-radio + > + </el-radio-group> + </div> + <div v-else> + <el-input + type="textarea" + placeholder="鏈幏鍙栧埌淇℃伅" + v-model.sync="item.questionResult" + :rows="2" + /> + </div> + </div> + </div> + <span slot="footer" class="dialog-footer"> + <el-button @click="previewGo">鍓嶅線妯$増璇︽儏淇敼</el-button> + <el-button type="primary" @click="previewFn">纭浣跨敤</el-button> + </span> + </el-dialog> </div> </template> @@ -648,6 +692,7 @@ getlibrarylist, getFollowuplist, getQtemplatelist, + TaskTemplatecomit, getTaskInfo, gethetaskinfo, delhetaskinfo, @@ -665,13 +710,18 @@ title: "瀹f暀鍐呭鍒楄〃", currenttype: 1, //1瀹f暀2闂ㄨ瘖3鍑洪櫌4澶嶈瘖5浣撴6闂嵎 id: "", + previewid: "", + libName: "", + libId: null, Editprogress: 1, //缂栬緫杩涘害 + previewtf: false, //棰勮 loading: false, // 閬僵灞� patientloading: false, // 閬僵灞� dialogVisiblepatient: false, //娣诲姞鎮h�呭脊妗� radio: 1, checkboxlist: [], tableLabel: [], + questionList: [], // 鎮h�呰〃鍗� tableLabelhz: [ @@ -811,6 +861,7 @@ sendType: 1, templatename: "", templateid: null, + libtemplateid: null, }, taskoptions: [ { @@ -967,15 +1018,20 @@ currenttype == 5 || currenttype == 7 ) { - this.form.templatename = row.templateName; - this.form.templateid = row.id; + this.libName = row.templateName; + this.libId = row.id; } else if (this.currenttype == 1) { - this.form.templatename = row.preachname; - this.form.templateid = row.id; + this.libName = row.preachname; + this.libId = row.id; } getvFollowup({ id: row.id }).then((res) => { if (res.code == 200) { + this.Tasktemplate = res.data; const data = res.data; + this.questionList = data.ivrLibaTemplateScriptVOList; + this.previewtf = true; + this.previewid = data.id; + console.log(this.questionList, "questionList"); this.Variablehandling(data.ivrLibaTemplateScriptVOList, 1); } }); @@ -1097,17 +1153,15 @@ }); this.form.patTaskRelevances.push(...this.SelectPatientslist); this.dialogVisiblepatient = false; - this.assignedVariable() + this.assignedVariable(); }, // 鍙橀噺澶勭悊璧嬪�兼湇鍔� assignedVariable() { // 鑾峰彇鎮h�呭垪琛ㄤ俊鎭惊鐜� - console.log(this.variableList,'this.variableList'); + console.log(this.variableList, "this.variableList"); this.form.patTaskRelevances.forEach((item) => { - this.variableList.forEach((item1) => { - - }) - }) + this.variableList.forEach((item1) => {}); + }); // 鍙栨暟鎹~鍏呭彉閲忔暟缁� // 鏁扮粍杞璞″瓨鍏� }, @@ -1187,6 +1241,34 @@ if (this.time2) this.form.sendlimitnbegin = this.time2.join(","); if (this.time3) this.form.sendlimitnend = this.time3.join(","); console.log(combinedData, "combinedData"); + }, + // 鏌ョ湅妯$増 + previewGo() { + this.$router.push({ + path: "/knowledge/templateku/configurat/", + query: { id: this.previewid, task: true, data: this.form }, + }); + }, + previewFn() { + let id = this.Tasktemplate.id; + this.Tasktemplate.id = null; + this.Tasktemplate.ivrLibaTemplateScriptVOList.ivrTaskScriptTargetoptionList = + this.Tasktemplate.ivrLibaTemplateScriptVOList.ivrLibaScriptTargetoptionList; + this.Tasktemplate.ivrTaskTemplateScriptVOList = + this.Tasktemplate.ivrLibaTemplateScriptVOList; + this.Tasktemplate.ivrLibaTemplateTagList = null; + this.Tasktemplate.tempDetpRelevances = null; + this.Tasktemplate.libtemplateid = id; + this.Tasktemplate.isoperation = 1; + this.Tasktemplate.libtemplatename = this.Tasktemplate.templateName; + TaskTemplatecomit(this.Tasktemplate).then((response) => { + console.log(response); + this.previewtf = false; + this.form.templateid = response.data; + this.form.libtemplateid = this.libId; + this.form.templatename = this.libName; + this.$modal.msgSuccess("閫夋嫨鎴愬姛"); + }); }, }, }; @@ -1280,6 +1362,22 @@ // margin: 0 20px; // } // } +.preview-left { + margin: 20px; + // margin: 20px; + padding: 30px; + background: #ffff; + 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 { + margin-bottom: 25px; + font-size: 20px !important; + .dev-text { + margin-bottom: 10px; + } + } +} .jic-value { font-size: 20px; border-top: 1px solid #a7abac; diff --git a/src/views/repositoryai/templateku/configurat/index.vue b/src/views/repositoryai/templateku/configurat/index.vue index b9fbd06..a18c9ff 100644 --- a/src/views/repositoryai/templateku/configurat/index.vue +++ b/src/views/repositoryai/templateku/configurat/index.vue @@ -351,8 +351,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> @@ -453,7 +455,6 @@ <el-input v-model="topicobj.questiontitle" placeholder="璇蜂粠宸︿晶鍒楄〃閫夋嫨" - :disabled="true" ></el-input> </el-form-item> <el-form-item label="闂鑺傜偣"> @@ -679,9 +680,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 @@ -858,6 +859,8 @@ drawer: false, //鎺у埗灞曞紑 radios: [], //澶氶�夐閫変腑 radioas: "", //濉┖棰樼瓟妗� + task: null, //鏄惁鏉ヨ嚜浠诲姟 + taskform: null, //浠诲姟淇℃伅 labelInfovalue: [], //鏍囩涓存椂瀛樺偍 deptNamesvalue: [], //绉戝涓存椂瀛樺偍 dynamicTags: [], @@ -925,38 +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, @@ -971,6 +947,7 @@ }, created() { + this.RoutingDataProcessing(); this.gettabList(); this.getvFollowup(); this.auxiliary(); @@ -991,10 +968,17 @@ 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; -- Gitblit v1.9.3