| | |
| | | </div> |
| | | <div v-if="Editprogress == 1"> |
| | | <el-card class="box-card"> |
| | | <el-form :inline="true" ref="topicobj" :model="topicobj" :rules="rules" class="demo-form-inline"> |
| | | <el-form |
| | | :inline="true" |
| | | ref="topicobj" |
| | | :model="topicobj" |
| | | :rules="rules" |
| | | class="demo-form-inline" |
| | | > |
| | | <div class="headline"> |
| | | 基础信息配置 |
| | | <span style="margin-left: 30px" |
| | |
| | | v-model="topicobj.categoryid" |
| | | size="medium" |
| | | filterable |
| | | @change="categoryidChange" |
| | | placeholder="请选择分类" |
| | | > |
| | | <el-option-group |
| | |
| | | <el-form-item label="评价类型" prop="scoretype"> |
| | | <el-select |
| | | v-model="topicobj.scoretype" |
| | | placeholder="请选择分类" |
| | | placeholder="请选择类型" |
| | | > |
| | | <el-option |
| | | v-for="group in appraiselist" |
| | |
| | | ><el-form-item label="是否可用" prop="isavailable"> |
| | | <el-radio-group v-model="topicobj.isavailable"> |
| | | <el-radio |
| | | @change="$forceUpdate()" |
| | | @change="$forceUpdate()" |
| | | v-for="(item, index) in usable" |
| | | :label="item.value" |
| | | >{{ item.label }}</el-radio |
| | |
| | | </el-col> --> |
| | | </el-row> |
| | | <el-row :gutter="10"> |
| | | |
| | | <el-col :span="8" |
| | | ><el-form-item label="问题类型" prop="scriptType"> |
| | | <el-select |
| | |
| | | @change="changefn" |
| | | size="medium" |
| | | filterable |
| | | placeholder="请选择分类" |
| | | placeholder="请选择类型" |
| | | > |
| | | <el-option |
| | | class="topicobjaa" |
| | |
| | | v-model="topicobj.language" |
| | | size="medium" |
| | | filterable |
| | | placeholder="请选择分类" |
| | | placeholder="请选择" |
| | | > |
| | | <el-option |
| | | class="topicobjaa" |
| | |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> --> |
| | | |
| | | |
| | | <!-- <el-form-item label="选中指标:"> |
| | | <span style="margin-left: 30px" |
| | |
| | | <el-image |
| | | style="width: 100px; height: 100px" |
| | | :src="topicobj.picturePath" |
| | | :preview-src-list="[...topicobj.picturePath]" |
| | | :preview-src-list=" |
| | | topicobj.picturePath ? [topicobj.picturePath] : [] |
| | | " |
| | | > |
| | | </el-image> |
| | | </div> |
| | |
| | | </div> |
| | | <div v-if="Editprogress == 2"> |
| | | <el-card class="box-card"> |
| | | <el-form :inline="true" ref="topicobj" :model="topicobj" class="demo-form-inline"> |
| | | <el-form |
| | | :inline="true" |
| | | ref="topicobj" |
| | | :model="topicobj" |
| | | class="demo-form-inline" |
| | | > |
| | | <div class="headline"> |
| | | 指标设置详情 |
| | | <span v-if="topicobj.targetname" style="margin-left: 30px" |
| | |
| | | label="ABC等级" |
| | | > |
| | | <el-radio-group v-model="item.score"> |
| | | <el-radio label="A">A</el-radio> |
| | | <el-radio label="B">B</el-radio> |
| | | <el-radio label="C">C</el-radio> |
| | | <el-radio :label="1">A</el-radio> |
| | | <el-radio :label="2">B</el-radio> |
| | | <el-radio :label="3">C</el-radio> |
| | | </el-radio-group> |
| | | </el-form-item> |
| | | <el-form-item |
| | |
| | | <el-image |
| | | style="width: 100px; height: 100px" |
| | | :src="item.picturePath" |
| | | :preview-src-list="[...item.picturePath]" |
| | | :preview-src-list=" |
| | | item.picturePath ? [item.picturePath] : [] |
| | | " |
| | | > |
| | | </el-image> |
| | | </div> |
| | |
| | | svyLibScriptOptions: [], |
| | | svyLibScriptTagList: [], |
| | | suitway: "1", |
| | | scoretype:'4', |
| | | language:'普通话', |
| | | scoretype: "4", |
| | | language: "普通话", |
| | | }, |
| | | headers: { |
| | | Authorization: "Bearer " + getToken(), |
| | |
| | | // 获取数据 |
| | | getissueinfo() { |
| | | this.id = this.$route.query.id; |
| | | if (this.$route.query.categoryid) { |
| | | this.topicobj.categoryid = Number(this.$route.query.categoryid); |
| | | } |
| | | |
| | | // 分类 |
| | | getissueclassify({}).then((res) => { |
| | | this.classifylist = res.rows; |
| | | if (this.$route.query.categoryid) { |
| | | this.topicobj.categoryid = Number(this.$route.query.categoryid); |
| | | } |
| | | }); |
| | | if (!this.id) { |
| | | return; |
| | |
| | | this.drawer = true; |
| | | }); |
| | | }, |
| | | // categoryidChange(id) { |
| | | // // 遍历所有分组,在每个分组的 svyLibScriptCategoryList 中查找 |
| | | // let targetOption = null; |
| | | // for (const group of this.classifylist) { |
| | | // targetOption = group.svyLibScriptCategoryList.find(item => item.id == id); |
| | | // if (targetOption) break; |
| | | // } |
| | | |
| | | // if (targetOption) { |
| | | // console.log('选中的选项:', targetOption); |
| | | // // 注意:这里 targetOption.name 是选项名,如“住院满意度调查” |
| | | // if (targetOption.name.includes('住院')) { |
| | | // this.topicobj.type = "zymyd"; |
| | | // } else if (targetOption.name.includes('门诊')) { |
| | | // this.topicobj.type = "mzmyd"; |
| | | // } else if (targetOption.name.includes('出院')) { |
| | | // this.topicobj.type = "cymyd"; |
| | | // } else if (targetOption.name.includes('常用')) { |
| | | // this.topicobj.type = "cymyd"; // 注意:这里和“出院”重复了,确认是否需区分 |
| | | // } |
| | | // } |
| | | // }, |
| | | // 新增或修改详情 |
| | | compileissue() { |
| | | this.$refs["topicobj"].validate((valid) => { |
| | | if (valid) { |
| | | this.topicobj.svyLibScriptOptions = this.topicobj.svyLibScriptOptions.map( |
| | | (item) => { |
| | | if (item.isoperation != 1 && item.isoperation != 3) { |
| | | item.isoperation = 2; |
| | | } |
| | | return item; |
| | | } |
| | | ); |
| | | this.topicobj.targetoptions = this.topicobj.svyLibScriptOptions |
| | | .filter((item) => item.isoperation != 3) |
| | | .map((item) => item.optioncontent) |
| | | .join(", "); |
| | | this.topicobj.otherdata = JSON.stringify(this.variablelist); |
| | | if (this.id) { |
| | | this.topicobj.isoperation = 2; |
| | | compileissue(this.topicobj).then((res) => { |
| | | if (res.code == 200) { |
| | | this.$message({ |
| | | message: "修改成功", |
| | | type: "success", |
| | | this.topicobj.svyLibScriptOptions = |
| | | this.topicobj.svyLibScriptOptions.map((item) => { |
| | | if (item.isoperation != 1 && item.isoperation != 3) { |
| | | item.isoperation = 2; |
| | | } |
| | | return item; |
| | | }); |
| | | this.$router.go(-1); |
| | | this.topicobj.targetoptions = this.topicobj.svyLibScriptOptions |
| | | .filter((item) => item.isoperation != 3) |
| | | .map((item) => item.optioncontent) |
| | | .join(", "); |
| | | this.topicobj.otherdata = JSON.stringify(this.variablelist); |
| | | if (this.id) { |
| | | this.topicobj.isoperation = 2; |
| | | compileissue(this.topicobj).then((res) => { |
| | | if (res.code == 200) { |
| | | this.$message({ |
| | | message: "修改成功", |
| | | type: "success", |
| | | }); |
| | | this.$router.go(-1); |
| | | } else { |
| | | this.$message({ |
| | | message: "修改失败", |
| | | type: "error", |
| | | }); |
| | | } |
| | | }); |
| | | } else { |
| | | this.$message({ |
| | | message: "修改失败", |
| | | type: "error", |
| | | this.topicobj.isoperation = 1; |
| | | compileissue(this.topicobj).then((res) => { |
| | | if (res.code == 200) { |
| | | this.$message({ |
| | | message: "新增成功", |
| | | type: "success", |
| | | }); |
| | | this.$router.go(-1); |
| | | } else { |
| | | this.$message({ |
| | | message: "新增失败", |
| | | type: "error", |
| | | }); |
| | | } |
| | | }); |
| | | } |
| | | }); |
| | | } else { |
| | | this.topicobj.isoperation = 1; |
| | | compileissue(this.topicobj).then((res) => { |
| | | if (res.code == 200) { |
| | | this.$message({ |
| | | message: "新增成功", |
| | | type: "success", |
| | | }); |
| | | this.$router.go(-1); |
| | | } else { |
| | | this.$message({ |
| | | message: "新增失败", |
| | | type: "error", |
| | | }); |
| | | this.illnesslist.forEach((item, index) => { |
| | | if (!item.id) { |
| | | addtargetillness(item).then((res) => {}); |
| | | } |
| | | }); |
| | | if (this.illnesslistapi.length) { |
| | | deltargetillness(this.illnesslistapi.join(",")).then((res) => {}); |
| | | } |
| | | }); |
| | | } |
| | | this.illnesslist.forEach((item, index) => { |
| | | if (!item.id) { |
| | | addtargetillness(item).then((res) => {}); |
| | | } |
| | | }); |
| | | if (this.illnesslistapi.length) { |
| | | deltargetillness(this.illnesslistapi.join(",")).then((res) => {}); |
| | | } |
| | | } |
| | | }) |
| | | |
| | | |
| | | }, |
| | | // 判断分值 |
| | | Scorejudgment() { |
| | | let scorearr = this.topicobj.svyLibScriptOptions; |
| | | let isValid = scorearr.every((score, index) => { |
| | | if (this.topicobj.scriptType == 1) { |
| | | if (score.score||score.score==0) { |
| | | if (score.score || score.score == 0) { |
| | | if ( |
| | | Number(score.score) < 0 || |
| | | Number(score.score) > Number(this.topicobj.score) |
| | |
| | | ) |
| | | .then(() => { |
| | | console.log(row); |
| | | this.topicobj.scriptTopic = row.targetname; |
| | | // this.topicobj.scriptTopic = row.targetname; |
| | | this.topicobj.valueType = row.valueType; |
| | | this.topicobj.scriptType = row.scriptType; |
| | | this.topicobj.scriptContent = row.targetdesc; |
| | | // this.topicobj.scriptContent = row.targetdesc; |
| | | this.topicobj.targetid = row.id; |
| | | this.topicobj.targetname = row.targetname; |
| | | this.topicobj.svyLibScriptOptions = []; |