| | |
| | | > |
| | | <el-option |
| | | class="ruleFormaa" |
| | | v-for="item in belongDepts" |
| | | v-for="item in flatArray" |
| | | :key="item.deptCode" |
| | | :label="item.deptName" |
| | | :label="item.label" |
| | | :value="item.deptCode" |
| | | > |
| | | </el-option> |
| | |
| | | size="medium" |
| | | multiple |
| | | filterable |
| | | placeholder="请选择科室" |
| | | placeholder="请选择病区" |
| | | > |
| | | <el-option |
| | | class="ruleFormaa" |
| | | v-for="item in belongWards" |
| | | :key="item.districtCode" |
| | | :label="item.districtName" |
| | | :value="item.districtCode" |
| | | v-for="item in flatArray" |
| | | :key="item.deptCode" |
| | | :label="item.label" |
| | | :value="item.deptCode" |
| | | > |
| | | </el-option> |
| | | </el-select> </el-form-item |
| | |
| | | align="center" |
| | | key="nextScriptno" |
| | | prop="nextScriptno" |
| | | :show-overflow-tooltip="true" |
| | | > |
| | | <template slot-scope="scope"> |
| | | <span>{{ |
| | |
| | | <el-col :span="12"> |
| | | <el-form-item |
| | | label="问题分值" |
| | | v-if="topicobj.scoretype == 1" |
| | | v-if="ruleForm.scoreType == 1" |
| | | > |
| | | <el-input |
| | | v-model="topicobj.score" |
| | |
| | | v-for="item in topicobj.svyLibTemplateTargetoptions" |
| | | > |
| | | <el-row :gutter="5"> |
| | | <el-col :span="16" |
| | | <el-col :span="12" |
| | | ><el-form-item label="选项名称"> |
| | | <el-input |
| | | type="text" |
| | |
| | | > |
| | | </el-input> </el-form-item |
| | | ></el-col> |
| | | <el-col :span="8"> |
| | | <el-col :span="12"> |
| | | <el-form-item |
| | | v-if="topicobj.scoretype == 1" |
| | | v-if="ruleForm.scoreType == 1" |
| | | label="选项分值" |
| | | > |
| | | <el-input |
| | |
| | | </el-input> |
| | | </el-form-item> |
| | | <el-form-item |
| | | v-else-if="topicobj.scoretype == 2" |
| | | v-else-if="ruleForm.scoreType == 2" |
| | | label="ABC等级" |
| | | > |
| | | <el-radio-group v-model="item.score"> |
| | |
| | | </el-radio-group> |
| | | </el-form-item> |
| | | <el-form-item |
| | | v-else-if="topicobj.scoretype == 3" |
| | | v-else-if="ruleForm.scoreType == 3" |
| | | label="优良等级" |
| | | > |
| | | <el-radio-group v-model="item.score"> |
| | |
| | | <el-col :span="12"> |
| | | <el-form-item label="评价类型"> |
| | | <el-select |
| | | v-model="indexform.scoretype" |
| | | v-model="indexform.scoreType" |
| | | placeholder="请选择分类" |
| | | > |
| | | <el-option |
| | |
| | | ></el-col> |
| | | <el-col :span="11"> |
| | | <el-form-item |
| | | v-if="indexform.scoretype == 1" |
| | | v-if="indexform.scoreType == 1" |
| | | label="分值" |
| | | > |
| | | <el-input |
| | |
| | | </el-input> |
| | | </el-form-item> |
| | | <el-form-item |
| | | v-else-if="indexform.scoretype == 2" |
| | | v-else-if="indexform.scoreType == 2" |
| | | label="ABC等级" |
| | | > |
| | | <el-radio-group v-model="item.score"> |
| | |
| | | </el-radio-group> |
| | | </el-form-item> |
| | | <el-form-item |
| | | v-else-if="indexform.scoretype == 3" |
| | | v-else-if="indexform.scoreType == 3" |
| | | label="优良等级" |
| | | > |
| | | <el-radio-group v-model="item.score"> |
| | |
| | | |
| | | <el-col |
| | | :span="2" |
| | | :offsset="indexform.scoretype == 4 ? 11 : 0" |
| | | :offsset="indexform.scoreType == 4 ? 11 : 0" |
| | | > |
| | | <el-button |
| | | type="danger" |
| | |
| | | } from "@/api/AiCentre/index"; |
| | | import OptionalForm from "@/components/OptionalForm"; //正则组件 |
| | | import { getToken } from "@/utils/auth"; |
| | | import { deptTreeSelect } from "@/api/system/user"; |
| | | |
| | | export default { |
| | | name: "Questionnaireinfo", |
| | |
| | | illnessVisible: false, //指标疾病弹框 |
| | | Operateit: true, |
| | | deptOptions: [], |
| | | flatArray: [], |
| | | optionsillness: [], |
| | | delScriptVOList: [], |
| | | illnesslistapi: [], |
| | |
| | | this.ruleForm.svyLibTemplateTagList.filter( |
| | | (item) => item.isoperation != 3 |
| | | ); |
| | | if (this.ruleForm.suitway) |
| | | this.ruleForm.suitway = this.ruleForm.suitway.split(","); |
| | | this.delScriptVOList = []; |
| | | this.tempDetpRelevanceslistform = []; |
| | |
| | | created() { |
| | | this.getissueinfo(); |
| | | this.gettabList(); |
| | | this.getDeptTree(); |
| | | this.mode = store.getters.Askmode; |
| | | this.languagelist = store.getters.languagelist; |
| | | this.usable = store.getters.usable; |
| | |
| | | this.appraiselist = store.getters.appraiselist; |
| | | this.belongWards = store.getters.belongWards; |
| | | this.belongDepts = store.getters.belongDepts; |
| | | console.log(this.belongWards, "belongWards"); |
| | | console.log(this.belongDepts, "belongDepts"); |
| | | |
| | | // this.test(); |
| | | }, |
| | |
| | | this.dynamicTags = this.ruleForm.svyLibTemplateTagList.map( |
| | | this.processElement |
| | | ); |
| | | this.ruleForm.suitway = this.ruleForm.suitway.split(","); |
| | | console.log(this.dynamicTags, "this.dynamicTags"); |
| | | if (this.ruleForm.suitway) |
| | | this.ruleForm.suitway = this.ruleForm.suitway.split(","); |
| | | }); |
| | | getillness({ outid: this.id, type: 5 }).then((res) => { |
| | | this.illnesslist = res.rows; |
| | |
| | | }); |
| | | this.tempDetpRelevanceslist = []; |
| | | this.tempbelongWards = []; |
| | | |
| | | depthospgetsonlist(this.queryParamsdept).then((res) => { |
| | | if (res.code == 200) { |
| | | let arr = res.rows; |
| | | arr.forEach((item) => { |
| | | if (item.deptType == 1) { |
| | | this.deptlist.push(item); |
| | | this.tempDetpRelevanceslist.push(item.deptCode); |
| | | } else if (item.deptType == 2) { |
| | | this.hosplist.push(item); |
| | | this.tempbelongWards.push(item.deptCode); |
| | | } |
| | | }); |
| | | } |
| | | if (this.queryParamsdept.tempid) { |
| | | depthospgetsonlist(this.queryParamsdept).then((res) => { |
| | | if (res.code == 200) { |
| | | let arr = res.rows; |
| | | arr.forEach((item) => { |
| | | if (item.deptType == 1) { |
| | | this.deptlist.push(item); |
| | | this.tempDetpRelevanceslist.push(item.deptCode); |
| | | } else if (item.deptType == 2) { |
| | | this.hosplist.push(item); |
| | | this.tempbelongWards.push(item.deptCode); |
| | | } |
| | | }); |
| | | } |
| | | }); |
| | | } |
| | | }, |
| | | // 获取科室树 |
| | | getDeptTree() { |
| | | // 科室列表 |
| | | deptTreeSelect().then((response) => { |
| | | this.deptOptions = response.data; |
| | | this.flatArray = this.flattenArray(response.data); |
| | | }); |
| | | }, |
| | | flattenArray(multiArray) { |
| | | let result = []; |
| | | |
| | | // 递归函数,用于将多级数组转换为一维数组,只包含最底层的元素 |
| | | function flatten(element) { |
| | | // 如果当前元素有子元素,继续递归 |
| | | if (element.children && element.children.length > 0) { |
| | | element.children.forEach((child) => flatten(child)); |
| | | } else { |
| | | // 克隆元素以避免修改原始数据 |
| | | let item = JSON.parse(JSON.stringify(element)); |
| | | result.push(item); // 将最底层的元素添加到结果数组 |
| | | } |
| | | } |
| | | |
| | | // 从顶层元素开始递归 |
| | | multiArray.forEach((element) => flatten(element)); |
| | | return result; // 返回只包含最底层元素的一维数组 |
| | | }, |
| | | submitForm(formName) { |
| | | this.$modal.loading("正在修正保存数据,请稍候..."); |
| | |
| | | if (!this.ruleForm.categoryid) { |
| | | this.ruleForm.categoryid = -1; |
| | | } |
| | | // 题目保存处理 |
| | | // 提交 |
| | | this.ruleForm.svyTemplateLibScripts.forEach((res) => { |
| | | if (!res.isoperation) { |
| | | res.isoperation = 2; |
| | | } |
| | | res.ivrLibaScriptTargetoptionList = res.svyLibTemplateTargetoptions.map( |
| | | (item) => { |
| | | if (!item.isoperation) { |
| | | item.isoperation = 2; |
| | | item.templateID = this.ruleForm.id; |
| | | } |
| | | return item; |
| | | } |
| | | ); |
| | | }); |
| | | this.delScriptVOList.forEach((item) => { |
| | | this.ruleForm.svyTemplateLibScripts.push(item); |
| | | }); |
| | | if (this.id) { |
| | | this.ruleForm.isoperation = 2; |
| | | this.ruleForm.tempDetpRelevances = null; |
| | |
| | | this.confirmillness(); |
| | | this.putbelongDepts(); |
| | | this.$modal.closeLoading(); |
| | | this.$router.go(-1); |
| | | // this.$router.go(-1); |
| | | window.location.reload(); |
| | | }); |
| | | } else { |
| | | this.ruleForm.isoperation = 1; |
| | |
| | | }, |
| | | // 科室/院区处理 |
| | | Departmenttreatment() { |
| | | console.log(this.tempDetpRelevanceslist, "tempDetpRelevanceslist"); |
| | | console.log(this.deptlist, "deptlist"); |
| | | console.log(this.hosplist, "deptlist"); |
| | | this.tempDetpRelevanceslist.forEach((item) => { |
| | | console.log(item); |
| | | let result = this.deptlist.some((obj) => obj.deptCode == item); |
| | |
| | | }); |
| | | this.tempbelongWards.forEach((item) => { |
| | | let result = this.hosplist.some((obj) => obj.deptCode == item); |
| | | |
| | | console.log(this.result, "resulthhh"); |
| | | |
| | | if (!result) { |
| | | this.tempbelongWardsform.push({ |
| | | deptType: 2, |
| | |
| | | }); |
| | | } |
| | | }); |
| | | console.log(this.tempbelongWardsform, "tempbelongWardsform"); |
| | | console.log( |
| | | this.tempDetpRelevanceslistform, |
| | | "tempDetpRelevanceslistform" |
| | | ); |
| | | |
| | | // return |
| | | setTimeout(() => { |
| | |
| | | let result = this.hosplist |
| | | .filter((item) => item.deptCode == row) |
| | | .map((item) => item.id); |
| | | if (result.length) { |
| | | depthospgetsondel(result).then((res) => { |
| | | if (res.code) { |
| | | } |
| | | }); |
| | | } |
| | | if (result.length) { |
| | | depthospgetsondel(result).then((res) => { |
| | | if (res.code) { |
| | | } |
| | | }); |
| | | } |
| | | }, |
| | | // 下一步 |
| | | nextstep() { |
| | |
| | | // 获取问题列表 |
| | | getaddtopiclist() { |
| | | this.drawer = true; |
| | | this.queryParams.scoretype = this.ruleForm.scoreType; |
| | | this.queryParams.scoreType = this.ruleForm.scoreType; |
| | | getissuelist(this.queryParams).then((res) => { |
| | | this.loading = false; |
| | | this.userList = res.rows; |
| | |
| | | }, |
| | | // 保存科室/病区 |
| | | putbelongDepts(id) { |
| | | this.tempDetpRelevanceslistform.forEach((item) => { |
| | | if (!item.tempid) item.tempid = id; |
| | | }); |
| | | this.tempbelongWardsform.forEach((item) => { |
| | | if (!item.tempid) item.tempid = id; |
| | | }); |
| | | if (this.tempDetpRelevanceslistform.length > 0) { |
| | | depthospgetson(this.tempDetpRelevanceslistform).then((res) => { |
| | | if (res.code == 200) { |