From 2ef938e02a1c64c7e7c641d46a2db91e4cdd1b75 Mon Sep 17 00:00:00 2001 From: WXL <1785969728@qq.com> Date: 星期四, 28 十二月 2023 15:52:46 +0800 Subject: [PATCH] 指标完成 --- src/views/repositoryai/templateku/configurat/index.vue | 565 +++++++++++++++++++++++++++++++++---------------------- 1 files changed, 336 insertions(+), 229 deletions(-) diff --git a/src/views/repositoryai/templateku/configurat/index.vue b/src/views/repositoryai/templateku/configurat/index.vue index 97892d0..b818ccc 100644 --- a/src/views/repositoryai/templateku/configurat/index.vue +++ b/src/views/repositoryai/templateku/configurat/index.vue @@ -29,26 +29,28 @@ <el-row> <el-col :span="12"> <el-form-item label="妯$増鍚嶇О" prop="region"> - <div style="width: 30%"> - <el-input v-model="ruleForm.name"></el-input> + <div> + <el-input + v-model="ruleForm.templateName" + placeholder="璇疯緭鍏ュ悕绉�" + ></el-input> </div> </el-form-item> </el-col> <el-col :span="12"> <el-form-item label="闅忚妯$増鍒嗙被" prop="region"> <el-select - v-model="ruleForm.classify" + v-model="ruleForm.assortid" size="medium" - multiple filterable placeholder="璇烽�夋嫨鍒嗙被" > <el-option class="ruleFormaa" - v-for="item in options" - :key="item.value" - :label="item.label" - :value="item.value" + v-for="item in indexAssortlist" + :key="item.id" + :label="item.indexAssortName" + :value="item.id" > </el-option> </el-select> @@ -56,28 +58,33 @@ </el-col> </el-row> - <el-form-item label="妯$増绠�浠�" prop="name"> + <el-form-item label="妯$増绠�浠�" prop="note"> <div style="width: 50%"> - <el-input type="textarea" v-model="ruleForm.name"></el-input> + <el-input + type="textarea" + placeholder="璇疯緭鍏ョ畝浠�" + v-model="ruleForm.note" + ></el-input> </div> </el-form-item> <el-row :gutter="20"> - <el-col :span="6"> - <el-form-item label="鐗堟湰鍙�" prop="name"> - <el-input v-model="currentVersion"></el-input> </el-form-item + <el-col :span="10"> + <el-form-item label="鐗堟湰鍙�" prop="version"> + <el-input + v-model="ruleForm.version" + placeholder="榛樿1.0.1" + ></el-input> </el-form-item ></el-col> - <el-col :span="9"> + <el-col :span="12"> <el-form-item label="鍙敤鐘舵��" prop="region"> <el-select - v-model="ruleForm.classify" + v-model="ruleForm.usestate" size="medium" - multiple - filterable - placeholder="璇烽�夋嫨鍒嗙被" + placeholder="璇烽�夋嫨" > <el-option class="ruleFormaa" - v-for="item in options" + v-for="item in usable" :key="item.value" :label="item.label" :value="item.value" @@ -86,93 +93,34 @@ </el-select> </el-form-item ></el-col> </el-row> - <el-form-item label="閫氱煡鍙橀噺" prop="name"> - <el-row v-for="item in variablelist"> - <el-col :span="4"> - <el-input v-model="item.variable"></el-input> - </el-col> - <el-col :span="8" :offset="1"> - <el-input v-model="item.value"></el-input> - </el-col> - <el-col :span="4" :offset="1"> - <el-button - type="success" - icon="el-icon-plus" - circle - @click="addvariable(item)" - ></el-button> - <el-button - type="danger" - icon="el-icon-delete" - circle - @click="delvariable(item)" - ></el-button> - </el-col> - </el-row> - </el-form-item> - <el-form-item label="鏍囩" prop="desc"> - <div class="xinz-inf"> - <el-tag - :key="tag" - type="success" - v-for="tag in dynamicTags" - closable - :disable-transitions="false" - @close="handleClose(tag)" - > - {{ tag }} - </el-tag> - <el-select - v-model="inputValue" - v-if="inputVisible" - @change="handleInputConfirm" - filterable - allow-create - default-first-option - placeholder="璇烽�夋嫨" - > - <el-option - v-for="item in optionstag" - :key="item.tagname" - :label="item.tagname" - :value="item.tagname" - > - </el-option> - </el-select> - <el-button - v-else - class="button-new-tag" - size="small" - @click="showInput" - >+ 鏂板鏍囩</el-button - > - </div> - </el-form-item> <el-row :gutter="20"> - <el-col :span="6"> + <el-col :span="10"> <el-form-item label="璇█" prop="name"> <el-select v-model="ruleForm.language" size="medium" filterable - placeholder="璇烽�夋嫨鍒嗙被" + placeholder="璇烽�夋嫨璇█" > <el-option class="ruleFormaa" v-for="item in languagelist" - :key="item.value" + :key="item.label" :label="item.label" - :value="item.value" + :value="item.label" > </el-option> </el-select> </el-form-item ></el-col> - <el-col :span="9"> - <el-form-item label="鎾姤浼樺厛" prop="region"> - <el-radio-group v-model="ruleForm.classify"> - <el-radio :label="3">璇█鍚堟垚浼樺厛</el-radio> - <el-radio :label="6">璇█鏂囦欢浼樺厛</el-radio> + <el-col :span="12"> + <el-form-item label="鎾姤浼樺厛" prop="playType"> + <el-radio-group v-model="ruleForm.playType"> + <el-radio + v-for="item in precedencetype" + :label="item.value" + >{{ item.label }}</el-radio + > </el-radio-group> </el-form-item></el-col > @@ -188,7 +136,7 @@ > <el-option class="ruleFormaa" - v-for="item in xjxsoptions" + v-for="item in mode" :key="item.value" :label="item.label" :value="item.value" @@ -196,38 +144,103 @@ </el-option> </el-select> </el-form-item> - <el-form-item label="閫傜敤鐤剧梾" prop="region"> - <el-select - style="width: 500px" - v-model="ruleForm.illness" - size="medium" - multiple - filterable - placeholder="璇烽�夋嫨鍒嗙被锛堝閫夛級" - > - <el-option - class="ruleFormaa" - v-for="item in options" - :key="item.value" - :label="item.label" - :value="item.value" + <el-form-item label="鏍囩" prop="desc"> + <div class="xinz-inf"> + <el-tag + :key="tag.tagname" + type="success" + v-for="tag in dynamicTags" + closable + :disable-transitions="false" + @close="handleClosetag(tag)" > - </el-option> - </el-select> + {{ tag.tagname }} + </el-tag> + <el-select + v-model="inputValue" + v-if="inputVisible" + @change="handleInputConfirm" + filterable + remote + reserve-keyword + default-first-option + :remote-method="remoteMethodtag" + :loading="loading" + placeholder="璇烽�夋嫨" + > + <el-option + v-for="item in optionstag" + :key="item.tagid" + :label="item.tagname" + :value="item.tagname" + > + </el-option> + </el-select> + <el-button + v-else + class="button-new-tag" + size="small" + @click="showInput" + >+ 鏂板鏍囩</el-button + > + </div> + </el-form-item> + + <el-form-item label="閫傜敤鐤剧梾" prop="region"> + <div class="xinz-inf"> + <el-tag + :key="item.icd10name" + type="warning" + v-for="item in illnesslist" + closable + :disable-transitions="false" + @close="handleCloseillness(item)" + > + {{ item.icd10name }} + </el-tag> + <el-select + v-model="inputValueillness" + v-if="inputVisibleillness" + @change="illnessConfirm" + :remote-method="remoteMethod" + filterable + remote + allow-create + default-first-option + placeholder="璇烽�夋嫨/鏌ヨ" + :loading="loading" + > + <el-option + v-for="item in optionsillness" + :key="item.icdid" + :label="item.icdname" + :value="item.icdid" + > + </el-option> + </el-select> + <el-button + v-else + class="button-new-tag" + size="small" + @click="inputVisibleillness = true" + >+ 鏂板鐤剧梾</el-button + > + </div> </el-form-item> <el-form-item label="閫傜敤闄㈠尯" prop="region"> <el-select - v-model="ruleForm.courtyard" + v-model="campusvalue" size="medium" + multiple filterable placeholder="璇烽�夋嫨鍒嗙被" > <el-option class="ruleFormaa" - v-for="item in options" - :key="item.value" + v-for="item in courtyardlist" + :key="item.label" :label="item.label" - :value="item.value" + :value="item.label" > </el-option> </el-select> @@ -235,7 +248,7 @@ <el-form-item label="閫傜敤绉戝" prop="region"> <el-select style="width: 500px" - v-model="ruleForm.administrative" + v-model="deptNamesvalue" size="medium" multiple filterable @@ -243,10 +256,10 @@ > <el-option class="ruleFormaa" - v-for="item in options" - :key="item.value" + v-for="item in administrativelist" + :key="item.label" :label="item.label" - :value="item.value" + :value="item.label" > </el-option> </el-select> @@ -254,7 +267,7 @@ <el-form-item label="閫氱敤搴�" prop="region"> <el-select style="width: 500px" - v-model="ruleForm.way" + v-model="ruleForm.waya" size="medium" multiple filterable @@ -262,7 +275,7 @@ > <el-option class="ruleFormaa" - v-for="item in xjxsoptions" + v-for="item in generallist" :key="item.value" :label="item.label" :value="item.value" @@ -274,14 +287,14 @@ <el-col :span="8"> <el-form-item label="闅忚鍓嶅鐞�" prop="name"> <el-select - v-model="ruleForm.languageq" + v-model="ruleForm.prefollowup" size="medium" filterable - placeholder="璇烽�夋嫨鍒嗙被" + placeholder="璇烽�夋嫨" > <el-option class="ruleFormaa" - v-for="item in xjxsoptions" + v-for="item in prefollowuplist" :key="item.value" :label="item.label" :value="item.value" @@ -292,14 +305,14 @@ <el-col :span="9"> <el-form-item label="闅忚鍚庡鐞�" prop="region"> <el-select - v-model="ruleForm.languageh" + v-model="ruleForm.postfollowup" size="medium" filterable placeholder="璇烽�夋嫨鍒嗙被" > <el-option class="ruleFormaa" - v-for="item in xjxsoptions" + v-for="item in postfollowuplist" :key="item.value" :label="item.label" :value="item.value" @@ -309,14 +322,14 @@ ></el-col> </el-row> <el-row :gutter="20"> - <el-col :span="8"> + <el-col :span="10"> <el-form-item label="闈欓粯鏃堕棿(绉�)" prop="name"> <div style="width: 40%"> <el-input v-model="ruleForm.name" ></el-input></div></el-form-item ></el-col> - <el-col :span="8"> + <el-col :span="10"> <el-form-item label="鏃犲尮閰嶉噸澶�(娆�)" prop="region"> <div style="width: 40%"> <el-input v-model="ruleForm.name"></el-input> @@ -467,10 +480,10 @@ <div class="topicxq" v-for="item in 2"> <el-row :gutter="10"> <el-col :span="12" - ><el-form-item label="澶勭悊"> + ><el-form-item label="閫夐」鍚�"> <el-input type="text" - placeholder="(榛樿)鏃犲0" + placeholder="璇疯緭鍏�" v-model="queryParams.text" show-word-limit > @@ -480,7 +493,7 @@ ><el-form-item label="鑺傜偣ID"> <el-input type="text" - placeholder="璇疯緭鍏ュ垎鍊�" + placeholder="璇疯緭鍏ヨ妭鐐�" v-model="queryParams.text" show-word-limit > @@ -489,10 +502,10 @@ </el-row> <el-row :gutter="10"> <el-col :span="12" - ><el-form-item label="閫変腑鎻愮ず"> + ><el-form-item label="澶勭悊"> <el-input type="text" - placeholder="璇疯緭鍏ュ唴瀹�" + placeholder="(榛樿)鏃犲0" v-model="queryParams.text" maxlength="10" show-word-limit @@ -503,14 +516,14 @@ ><el-form-item label="閫変腑璺宠浆"> <el-input type="text" - placeholder="璇疯緭鍏ラ鍙�" + placeholder="璇疯緭鍏ラ鐩妭鐐�" v-model="queryParams.text" show-word-limit > </el-input> </el-form-item ></el-col> </el-row> - <el-form-item label="璇煶鏂囨湰"> + <el-form-item label="鍖归厤姝e垯"> <el-input style="width: 24vw" type="textarea" @@ -640,13 +653,11 @@ <el-select v-model="ruleForm.classify" size="medium" - multiple - filterable placeholder="璇烽�夋嫨鍒嗙被" > <el-option class="ruleFormaa" - v-for="item in options" + v-for="item in themelist" :key="item.value" :label="item.label" :value="item.value" @@ -708,91 +719,76 @@ <script> import { listtag } from "@/api/system/label"; +import store from "@/store"; + +import { + getFollowupclassify, + delFollowupclassify, + addFollowupclassify, + addtargetillness, + getvFollowup, + compileFollowup, + delFollowupinfo, + Followupinfo, + getFollowuplist, + getillnesslist, + illnesslistget, + getillness, +} from "@/api/AiCentre/index"; export default { data() { return { - sidecolumnrabs: "left", //鏂瑰悜 - Editprogress: 2, //缂栬緫杩涘害 - currentVersion: "1.2.3", //褰撳墠鐗堟湰 + Editprogress: 1, //缂栬緫杩涘害 loading: false, // 閬僵灞� drawer: false, //鎺у埗灞曞紑 - radio: "false", //鍗曢�夐閫変腑 radios: [], //澶氶�夐閫変腑 radioas: "", //濉┖棰樼瓟妗� - dynamicTags: ["鏍囩涓�", "鏍囩浜�", "鏍囩涓�"], - inputVisible: false, + campusvalue: [], //闄㈠尯涓存椂瀛樺偍 + labelInfovalue: [], //鏍囩涓存椂瀛樺偍 + deptNamesvalue: [], //绉戝涓存椂瀛樺偍 + dynamicTags: [], + indexAssortlist: [], inputValue: "", + inputValueillness: "", topicobj: {}, - // 鎬绘潯鏁� total: 1, - ruleForm: { - name: "", - region: "", - date1: "", - date2: "", - delivery: false, - type: [], - resource: "", - desc: "", - templatevalue: "", - data2: "", - }, + id: "", + ruleForm: {}, rules: {}, - rulesa: {}, - optionstag:[], - xjxsoptions: [ - { - value: "閫夐」1", - label: "鍥炬枃", - }, - { - value: "閫夐」2", - label: "瑙嗛", - }, - { - value: "閫夐」3", - label: "闊抽", - }, - ], + optionstag: [], + prefollowuplist: [], + postfollowuplist: [], + generallist: [{ value: "1", label: "闅忚閫氱敤搴撲竴" }], + fileList: [ { name: "food.jpeg", url: "https://fuss10.elemecdn.com/3/63/4e7f3a15429bfda99bce42a18cdd1jpeg.jpeg?imageMogr2/thumbnail/360x360/format/webp/quality/100", }, ], - options: [ - { - value: "閫夐」1", - label: "鐤剧梾闅忚妯$増", - }, - { - value: "閫夐」2", - label: "鍏ラ櫌闅忚妯$増", - }, - { - value: "閫夐」3", - label: "鎵嬫湳闅忚妯$増", - }, - { - value: "閫夐」4", - label: "鎶ょ悊闅忚妯$増", - }, + administrativelist: [ + { value: "1", label: "蹇冨绉�" }, + { value: "2", label: "蹇冨唴绉�" }, ], - languagelist: [ - { - value: "1", - label: "鏅�氳瘽", - }, - { - value: "2", - label: "绮よ", - }, - { - value: "3", - label: "鑻辨枃", - }, - ], + themelist: [], + languagelist: [], + courtyardlist: [], + precedencetype: [], + usable: [], + mode: [], + inputVisible: false, + inputVisibleillness: false, + illnessVisible: false, //鎸囨爣鐤剧梾寮规 + deptOptions: [], + optionsillness: [], + illnesslistapi: [], + illnesslist: [], + defaultProps: { + children: "ivrLibaTemplateAssortList", + label: "indexAssortName", + }, + variablelist: [ { variable: "paitent", @@ -846,19 +842,59 @@ created() { this.gettabList(); - + this.getvFollowup(); + this.auxiliary(); + this.mode = store.getters.mode; + this.usable = store.getters.usable; + this.languagelist = store.getters.languagelist; + this.courtyardlist = store.getters.courtyardlist; + this.precedencetype = store.getters.precedencetype; }, methods: { getIndexInArray(arr, obj) { return arr.indexOf(obj); }, + // 鑾峰彇琛ㄥ崟鏁版嵁 + getvFollowup() { + this.id = this.$route.query.id; + + getvFollowup({ id: this.id }).then((res) => { + this.ruleForm = res.data; + }); + getillnesslist({ + pageNum: 1, + pageSize: 100, + }).then((response) => { + this.optionsillness = response.rows; + }); + getillness({ outid: this.id, type: 3 }).then((res) => { + this.illnesslist = res.rows; + }); + }, + // 闄勫睘鏁版嵁琛� + auxiliary() { + // 鍒嗙被 + getFollowupclassify({}).then((res) => { + this.indexAssortlist = res.rows; + }); + // 鐤剧梾鍒� + }, submitForm(formName) { - this.rules = this.rulesa; + if (this.ruleForm.id) { + this.ruleForm.isoperation = 2; + } else { + this.ruleForm.isoperation = 2; + } + this.ruleForm.campus = JSON.stringify(this.illnesslist); + this.ruleForm.deptNames = this.deptNamesvalue.join(","); + this.ruleForm.labelInfo = JSON.stringify(this.dynamicTags); // 鎻愪氦 this.$refs[formName].validate((valid) => { if (valid) { - alert("submit!"); + compileFollowup(this.ruleForm).then((res) => { + this.$modal.msgSuccess("淇敼鎴愬姛"); + }); } else { console.log("error submit!!"); return false; @@ -910,22 +946,7 @@ }, // 淇敼棰樼洰淇℃伅 Submittopicobj() {}, - // 鏂板鍙橀噺 - addvariable() { - this.variablelist.push({ - variable: "", - value: "", - }); - }, - // 鍒犻櫎鍙橀噺 - delvariable(item) { - const index = this.variablelist.indexOf(item); - if (index !== -1) { - this.variablelist.splice(index, 1); // 浠庣储寮曚綅缃垹闄や竴涓厓绱� - } else { - console.log("鏈壘鍒拌瀵硅薄"); - } - }, + // 鎺у埗鏂囦欢 handleChange(file, fileList) { this.fileList = fileList.slice(-3); @@ -950,23 +971,54 @@ this.optionstag = response.rows; }); }, - handleClose(tag) { + handleClosetag(tag) { + console.log(tag); + console.log(this.dynamicTags.indexOf(tag)); + const lindex = this.dynamicTags.indexOf(tag); this.dynamicTags.splice(this.dynamicTags.indexOf(tag), 1); + this.ruleForm.ivrLibaTemplateTargetList[lindex].isoperation = 3; }, handleInputConfirm() { - let inputValue = this.inputValue; - if (inputValue) { - this.dynamicTags.push(inputValue); + let tagvalue = {}; + let tagname = this.inputValue; + if (tagname) { + listtag({ + pageNum: 1, + pageSize: 1000, + tagcategoryid: "0", + tagname: tagname, + }).then((res) => { + if (res.rows[0]) { + tagvalue = res.rows[0]; + tagvalue.isoperation = 1; + } else { + tagvalue = { + tagname: tagname, + isoperation: 1, + }; + } + this.ruleForm.ivrLibaTemplateTargetList.push(tagvalue); + this.dynamicTags.push(tagvalue); + }); } this.inputVisible = false; this.inputValue = ""; }, + remoteMethodtag(query) { + if (query !== "") { + this.loading = true; + setTimeout(() => { + this.loading = false; + listtag({ tagname: query, tagcategoryid: "0" }).then((res) => { + this.optionstag = res.rows; + }); + }, 200); + } else { + this.optionstag = []; + } + }, showInput() { this.inputVisible = true; - // 鑷姩鑾峰彇鐒︾偣 - // this.$nextTick((_) => { - // this.$refs.saveTagInput.$refs.input.focus(); - // }); }, //娴嬭瘯琛ㄥ崟 --------------------------------- addzbiao() {}, @@ -1009,6 +1061,61 @@ resetForm(formName) { this.$refs[formName].resetFields(); }, + + // 鐤剧梾----------------------- + + handleCloseillness(tag) { + this.illnesslist.splice(this.illnesslist.indexOf(tag), 1); + if (tag.id) { + this.illnesslistapi.push(tag.id); + } + }, + remoteMethod(value) { + console.log(value); + const illnessqueryParams = { + pageNum: 1, + pageSize: 100, + icdname: value, + }; + this.loading = true; + setTimeout(() => { + this.loading = false; + getillnesslist(illnessqueryParams).then((response) => { + this.optionsillness = response.rows; + }); + }, 200); + }, + illnessConfirm(item) { + let opeavalue = {}; + let tagname = this.inputValueillness; + illnesslistget(item).then((res) => { + opeavalue = res.data; + opeavalue.outid = this.id; + opeavalue.type = 3; + opeavalue.icd10id = opeavalue.icdid; + opeavalue.icd10name = opeavalue.icdname; + opeavalue.icd10code = opeavalue.icdcode; + if (tagname) { + this.illnesslist.push(opeavalue); + } + }); + console.log(this.illnesslist); + this.inputVisibleillness = false; + this.inputValueillness = ""; + }, + // 淇濆瓨 + confirmillness() { + this.illnesslist.forEach((item, index) => { + if (!item.id) { + addtargetillness(item).then((res) => {}); + } + }); + if (this.illnesslistapi.length) { + deltargetillness(this.illnesslistapi.join(",")).then((res) => {}); + } + this.illnessVisible = false; + this.$modal.msgSuccess("缂栬緫鎴愬姛"); + }, }, }; </script> @@ -1018,7 +1125,7 @@ display: flex; } .sidecolumn { - width: 300px; + width: 250px; min-height: 100vh; text-align: center; // display: flex; -- Gitblit v1.9.3