From f93cb40b76468c6f1063081a3be16027d69b4832 Mon Sep 17 00:00:00 2001 From: WXL <1785969728@qq.com> Date: 星期四, 04 一月 2024 09:46:01 +0800 Subject: [PATCH] 指标完成 --- src/views/knowledge/questionbank/particulars/index.vue | 753 ++++++++++++++++++++++++++++++++++++++++++--------------- 1 files changed, 556 insertions(+), 197 deletions(-) diff --git a/src/views/knowledge/questionbank/particulars/index.vue b/src/views/knowledge/questionbank/particulars/index.vue index 841e5cb..e05bd41 100644 --- a/src/views/knowledge/questionbank/particulars/index.vue +++ b/src/views/knowledge/questionbank/particulars/index.vue @@ -11,166 +11,213 @@ ></span > </div> + <div style="margin-left: 8%"> + <el-row :gutter="10"> + <el-col :span="6" + ><el-form-item label="棰樼洰鏍囬"> + <el-input + v-model="topicobj.topic" + placeholder="璇疯緭鍏ユ爣棰�" + ></el-input> </el-form-item + ></el-col> + <el-col :span="6" + ><el-form-item label="鏄惁鍙敤"> + <el-select + v-model="topicobj.ishide" + size="medium" + filterable + placeholder="璇烽�夋嫨鍒嗙被" + > + <el-option + class="topicobjaa" + v-for="item in usable" + :key="item.value" + :label="item.label" + :value="item.value" + > + </el-option> + </el-select> </el-form-item + ></el-col> + <el-col :span="8" + ><el-form-item label="璇█(缂�)"> + <el-select + v-model="topicobj.languageh" + size="medium" + filterable + placeholder="璇烽�夋嫨鍒嗙被" + > + <el-option + class="topicobjaa" + v-for="item in languagelist" + :key="item.value" + :label="item.label" + :value="item.value" + > + </el-option> + </el-select> </el-form-item + ></el-col> + </el-row> + <el-row :gutter="10"> + <el-col :span="6" + ><el-form-item label="鏄惁蹇呯瓟"> + <el-radio-group v-model="topicobj.ismandatory"> + <el-radio label="1">鏄�</el-radio> + <el-radio label="2">鍚�</el-radio> + </el-radio-group> + </el-form-item></el-col + > + <el-col :span="6" + ><el-form-item label="棰樼洰绫诲瀷"> + <el-select + v-model="topicobj.topictype" + size="medium" + filterable + placeholder="璇烽�夋嫨鍒嗙被" + > + <el-option + class="topicobjaa" + v-for="item in xjxsoptions" + :key="item.value" + :label="item.label" + :value="item.value" + > + </el-option> + </el-select> </el-form-item + ></el-col> + <el-col :span="8" + ><el-form-item label="閫傜敤鏂瑰紡(缂�)"> + <el-select + v-model="topicobj.languageh" + size="medium" + filterable + placeholder="璇烽�夋嫨鍒嗙被" + > + <el-option + class="topicobjaa" + v-for="item in mode" + :key="item.value" + :label="item.label" + :value="item.value" + > + </el-option> </el-select></el-form-item + ></el-col> + </el-row> + <el-form-item label="棰樼洰鍐呭(缂�)"> + <el-input + style="width: 40vw" + type="textarea" + v-model="topicobj.topic" + placeholder="璇疯緭鍏ユ爣棰�" + ></el-input> + </el-form-item> - <el-row :gutter="10"> - <el-col :span="8" - ><el-form-item label="棰樼洰鏍囬"> - <el-input - v-model="topicobj.title" - placeholder="璇疯緭鍏ユ爣棰�" - ></el-input> </el-form-item - ></el-col> - <el-col :span="6" - ><el-form-item label="鏄惁闅愯棌"> - <el-radio-group v-model="topicobj.resourcea"> - <el-radio label="鏄�"></el-radio> - <el-radio label="鍚�"></el-radio> - </el-radio-group> </el-form-item - ></el-col> - <el-col :span="6" - ><el-form-item label="璇█"> - <el-select - v-model="topicobj.languageh" - size="medium" - filterable - placeholder="璇烽�夋嫨鍒嗙被" - > - <el-option - class="topicobjaa" - v-for="item in xjxsoptions" - :key="item.value" - :label="item.label" - :value="item.value" + <el-row> + <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> </el-form-item - ></el-col> - </el-row> - <el-row :gutter="10"> - <el-col :span="8" - ><el-form-item label="鏄惁蹇呯瓟"> - <el-radio-group v-model="topicobj.resource"> - <el-radio label="鏄�"></el-radio> - <el-radio label="鍚�"></el-radio> - </el-radio-group> </el-form-item - ></el-col> - <el-col :span="12" - ><el-form-item label="棰樼洰绫诲瀷"> - <el-select - v-model="topicobj.languageh" - size="medium" - filterable - placeholder="璇烽�夋嫨鍒嗙被" - > - <el-option - class="topicobjaa" - v-for="item in xjxsoptions" - :key="item.value" - :label="item.label" - :value="item.value" + {{ 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> - </el-select> </el-form-item - ></el-col> - </el-row> - <el-form-item label="棰樼洰鍐呭"> - <el-input - style="width: 40vw" - type="textarea" - v-model="topicobj.title" - placeholder="璇疯緭鍏ユ爣棰�" - ></el-input> - </el-form-item> - <el-row :gutter="10"> - <el-col :span="8" - ><el-form-item label="閫傜敤鏂瑰紡"> - <el-select - v-model="topicobj.languageh" - size="medium" - filterable - placeholder="璇烽�夋嫨鍒嗙被" - > - <el-option - class="topicobjaa" - v-for="item in xjxsoptions" - :key="item.value" - :label="item.label" - :value="item.value" + <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 > - </el-option> </el-select></el-form-item - ></el-col> - <el-col :span="12" - ><el-form-item label="閫傜敤鐤剧梾"> - <el-select - v-model="topicobj.languageh" - size="medium" - filterable - placeholder="璇烽�夋嫨鍒嗙被" - > - <el-option - class="topicobjaa" - v-for="item in xjxsoptions" - :key="item.value" - :label="item.label" - :value="item.value" + </div> + </el-form-item> + </el-row> + <el-row> + <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)" > - </el-option> - </el-select> </el-form-item - ></el-col> - </el-row> - <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> + {{ 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-row> + </div> + <div class="headline"> 閫夐」璁剧疆<span style="margin-left: 30px" - ><el-button type="primary" @click="addoption" + ><el-button type="primary" round @click="addoption" >+鏂板</el-button + ></span + ><span style="margin-left: 30px" + ><el-button type="success" round @click="drawer = true" + >+閫夋嫨鎸囨爣</el-button ></span > </div> <div class="topicxq" v-for="item in optionlist"> <el-row :gutter="10"> <el-col :span="11" - ><el-form-item label="閫夐」"> + ><el-form-item label="棰樺彿"> <el-input type="text" - placeholder="璇疯緭鍏ラ�夐」" - v-model="text" + placeholder="璇疯緭鍏�" + v-model="item.optionid" show-word-limit > </el-input> </el-form-item @@ -179,28 +226,20 @@ ><el-form-item label="鍒嗗��"> <el-input type="text" - placeholder="璇疯緭鍏ュ垎鍊�" - v-model="text" + placeholder="璇疯緭鍏�" + v-model="item.score" show-word-limit > </el-input> </el-form-item ></el-col> - <el-col :span="2"> - <el-button - type="danger" - icon="el-icon-delete" - circle - ></el-button> - </el-col> </el-row> <el-row :gutter="10"> <el-col :span="11" - ><el-form-item label="閫変腑鎻愮ず"> + ><el-form-item label="閫夐」"> <el-input type="text" - placeholder="璇疯緭鍏ュ唴瀹�" - v-model="text" - maxlength="10" + placeholder="璇疯緭鍏ラ�夐」" + v-model="item.optioncontent" show-word-limit > </el-input> </el-form-item @@ -210,21 +249,147 @@ <el-input type="text" placeholder="璇疯緭鍏ラ鍙�" - v-model="text" + v-model="item.jump" show-word-limit > </el-input> </el-form-item ></el-col> + <el-col :span="2"> + <el-button + type="danger" + icon="el-icon-delete" + circle + @click="deletexuanx(item)" + ></el-button> + </el-col> + </el-row> + <el-row :gutter="10"> + <el-form-item label="閫変腑鎻愮ず"> + <el-input + style="width: 40vw" + type="textarea" + autosize + placeholder="璇疯緭鍏ュ唴瀹�" + v-model="item.prompt" + > + </el-input + ></el-form-item> </el-row> </div> </el-form> </el-card> </div> + <el-drawer + title="娣诲姞棰樼洰" + :visible.sync="drawer" + custom-class="demo-drawer" + width="50%" + > + <div class="preview-left"> + <el-form + :model="queryParams" + ref="queryForm" + size="small" + :inline="true" + label-width="98px" + > + <el-form-item label="鏍囬" prop="userName"> + <el-input + v-model="queryParams.userName" + placeholder="璇疯緭鍏�" + clearable + style="width: 200px" + @keyup.enter.native="handleQuery" + /> + </el-form-item> + <el-form-item label="涓婚" prop="sickness"> + <el-select + v-model="queryParams.classify" + size="medium" + multiple + filterable + placeholder="璇烽�夋嫨鍒嗙被" + > + <el-option + class="ruleFormaa" + v-for="item in optionsclass" + :key="item.value" + :label="item.label" + :value="item.value" + > + </el-option> + </el-select> + </el-form-item> + <el-form-item> + <el-button + type="primary" + icon="el-icon-search" + size="medium" + @click="handleQuery" + >鎼滅储</el-button + > + <el-button icon="el-icon-refresh" size="medium" @click="resetQuery" + >閲嶇疆</el-button + > + </el-form-item> + </el-form> + <el-table v-loading="loading" :data="userList"> + <el-table-column + label="鏍囬" + align="center" + key="userid" + prop="userid" + width="100" + /> + <el-table-column + label="闂鍐呭" + align="center" + key="userName" + prop="userName" + width="200" + :show-overflow-tooltip="true" + /> + + <el-table-column + label="鎿嶄綔" + align="center" + class-name="small-padding fixed-width" + > + <template slot-scope="scope"> + <el-button + size="medium" + type="text" + @click="selectlabel(scope.row)" + ><span class="button-textxg" + ><i class="el-icon-circle-plus-outline"></i>娣诲姞</span + ></el-button + > + </template> + </el-table-column> + </el-table> + </div> + </el-drawer> </div> </template> <script> import { listtag } from "@/api/system/label"; +import store from "@/store"; +import { + getissueclassify, + delissueclassify, + addissueclassify, + getissuelist, + issueinfo, + compileissue, + delissueinfo, + Followupinfo, + deltargetillness, + addtargetillness, + getillnesslist, + illnesslistget, + getillness, +} from "@/api/AiCentre/index"; export default { data() { @@ -232,50 +397,130 @@ topicobj: {}, inputVisible: false, inputValue: "", - dynamicTags: ["鏍囩涓�", "鏍囩浜�", "鏍囩涓�"], + drawer: false, + loading: false, + id: [], + userList: [ + { + userid: "1", + userName: "鎸囨爣", + }, + { + userid: "2", + userName: "浜屽彿闂嵎", + }, + ], + dynamicTags: [], + // 鏌ヨ鍙傛暟 + queryParams: { + pageNum: 1, + pageSize: 10, + }, optionlist: [ { value: "topic", table: "topic" }, { value: "topic", table: "topic" }, { value: "topic", table: "topic" }, ], - options: [ - { - value: "閫夐」1", - label: "蹇冭绠�", - }, - { - value: "閫夐」2", - label: "楠ㄧ", - }, - { - value: "閫夐」3", - label: "濡囩", - }, - ], - optionstag:[], - xjxsoptions: [ - { - value: "1", - label: "鍗曢��", - }, - { - value: "2", - label: "澶氶��", - }, - ], + inputValueillness: "", + themelist: [], + languagelist: [], + courtyardlist: [], + precedencetype: [], + inputVisible: false, + inputVisibleillness: false, + illnessVisible: false, //鎸囨爣鐤剧梾寮规 + deptOptions: [], + optionsillness: [], + illnesslistapi: [], + illnesslist: [], + + optionstag: [], + xjxsoptions: [], + usable: [], + mode: [], //鏂瑰紡 }; }, created() { this.gettabList(); + this.getissueinfo(); + this.mode = store.getters.mode; + this.languagelist = store.getters.languagelist; + this.usable = store.getters.usable; + this.xjxsoptions = store.getters.xjxsoptions; }, methods: { Submittopicobj() {}, + getIndexInArray(arr, obj) { + return arr.indexOf(obj); + }, + + // 鑾峰彇鏁版嵁 + getissueinfo() { + this.id = this.$route.query.id; + issueinfo(this.id).then((res) => { + this.topicobj = res.data; + }); + getillnesslist({ + pageNum: 1, + pageSize: 100, + }).then((response) => { + this.optionsillness = response.rows; + }); + getillness({ outid: this.id, type: 4 }).then((res) => { + this.illnesslist = res.rows; + }); + }, + // 鏂板鎴栦慨鏀硅鎯� + compileissue() { + if (this.id) { + this.topicobj.isoperation = 1; + compileissue(this.topicobj).then((res) => { + if (res.code == 1) { + this.$message({ + message: "淇敼鎴愬姛", + type: "success", + }); + this.$router.go(-1); + } else { + this.$message({ + message: "淇敼澶辫触", + type: "error", + }); + } + }); + } else { + this.topicobj.isoperation = 2; + compileissue(this.topicobj).then((res) => { + if (res.code == 1) { + this.$message({ + message: "鏂板鎴愬姛", + type: "success", + }); + this.$router.go(-1); + } else { + this.$message({ + message: "鏂板澶辫触", + type: "error", + }); + } + }); + } + }, + // 鍒犻櫎閫夐」 + deletexuanx(row) { + const index = this.getIndexInArray(this.optionlist, row); + this.optionlist.splice(index, 1); + }, // 鏂板閫夐」 - addoption() {}, + addoption() { + this.optionlist.push({ value: "topic", table: "topic" }); + }, + // 閫夋嫨鎸囨爣 + selectlabel(row) {}, + // 鏍囩----------------- - /** 鏌ヨ鏍囩鍒楄〃 */ gettabList() { const tagqueryParams = { pageNum: 1, @@ -284,27 +529,115 @@ }; listtag(tagqueryParams).then((response) => { console.log(response); - this.options = response.rows; + 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(); - // }); }, + // 鐤剧梾----------------------- + + 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 = 4; + 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("缂栬緫鎴愬姛"); + }, + // 鏌ヨ棰樺簱 + handleQuery() {}, + resetQuery() {}, }, }; </script> @@ -322,13 +655,18 @@ margin: 15px 0; } .topicxq { - width: 50%; + width: 68%; background-color: #e2f5fc; border-radius: 4px; - margin-top: 10px; + margin-top: 15px; + margin-left: 10%; padding-left: 10px; padding-top: 15px; + 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); } + .xinz-inf { font-size: 18px; white-space: nowrap; @@ -353,4 +691,25 @@ } } } +.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; + } + } +} +::v-deep.ruleFormaa.el-select { + display: inline-block; + position: relative; + width: 700px; +} </style> -- Gitblit v1.9.3