|  |  |  | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | <div v-if="Editprogress == 1"> | 
|---|
|  |  |  | <el-card class="box-card"> | 
|---|
|  |  |  | <el-form :inline="true" :model="topicobj" 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" | 
|---|
|  |  |  | 
|---|
|  |  |  | <el-divider></el-divider> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <div style="margin-left: 8%"> | 
|---|
|  |  |  | <el-form-item label="问题内容" prop="scriptContent"> | 
|---|
|  |  |  | <el-input | 
|---|
|  |  |  | style="width: 40vw" | 
|---|
|  |  |  | type="textarea" | 
|---|
|  |  |  | id="scriptContent" | 
|---|
|  |  |  | v-model="topicobj.scriptContent" | 
|---|
|  |  |  | @focus="handleInput('scriptContent')" | 
|---|
|  |  |  | placeholder="请输入问题内容" | 
|---|
|  |  |  | ></el-input> | 
|---|
|  |  |  | </el-form-item> | 
|---|
|  |  |  | <el-form-item label="问题说明" prop="targetname"> | 
|---|
|  |  |  | <el-input | 
|---|
|  |  |  | style="width: 40vw" | 
|---|
|  |  |  | type="textarea" | 
|---|
|  |  |  | v-model="topicobj.scriptDesc" | 
|---|
|  |  |  | placeholder="请输入说明" | 
|---|
|  |  |  | ></el-input> | 
|---|
|  |  |  | </el-form-item> | 
|---|
|  |  |  | <el-row :gutter="10"> | 
|---|
|  |  |  | <el-col :span="8"> | 
|---|
|  |  |  | <el-form-item label="问题分类"> | 
|---|
|  |  |  | <el-form-item label="问题分类" prop="categoryid"> | 
|---|
|  |  |  | <el-select | 
|---|
|  |  |  | v-model="topicobj.categoryid" | 
|---|
|  |  |  | size="medium" | 
|---|
|  |  |  | 
|---|
|  |  |  | </el-form-item> | 
|---|
|  |  |  | </el-col> | 
|---|
|  |  |  | <el-col :span="8"> | 
|---|
|  |  |  | <el-form-item label="评价类型"> | 
|---|
|  |  |  | <el-form-item label="评价类型" prop="scoretype"> | 
|---|
|  |  |  | <el-select | 
|---|
|  |  |  | v-model="topicobj.scoretype" | 
|---|
|  |  |  | placeholder="请选择分类" | 
|---|
|  |  |  | 
|---|
|  |  |  | </el-form-item> | 
|---|
|  |  |  | </el-col> | 
|---|
|  |  |  | <el-col :span="8" v-if="topicobj.scoretype == 1"> | 
|---|
|  |  |  | <el-form-item label="题目得分"> | 
|---|
|  |  |  | <el-form-item label="问题得分" prop="score"> | 
|---|
|  |  |  | <el-input | 
|---|
|  |  |  | v-model="topicobj.score" | 
|---|
|  |  |  | placeholder="请输入分数" | 
|---|
|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <el-row :gutter="10"> | 
|---|
|  |  |  | <el-col :span="8" | 
|---|
|  |  |  | ><el-form-item label="题目标题"> | 
|---|
|  |  |  | ><el-form-item label="问题标题" prop="scriptTopic"> | 
|---|
|  |  |  | <el-input | 
|---|
|  |  |  | v-model="topicobj.scriptTopic" | 
|---|
|  |  |  | placeholder="请输入标题" | 
|---|
|  |  |  | ></el-input> </el-form-item | 
|---|
|  |  |  | ></el-col> | 
|---|
|  |  |  | <el-col :span="8" | 
|---|
|  |  |  | ><el-form-item label="是否可用"> | 
|---|
|  |  |  | <el-radio-group v-model="topicobj.isAvailable"> | 
|---|
|  |  |  | ><el-form-item label="是否可用" prop="isavailable"> | 
|---|
|  |  |  | <el-radio-group v-model="topicobj.isavailable"> | 
|---|
|  |  |  | <el-radio | 
|---|
|  |  |  | @change="$forceUpdate()" | 
|---|
|  |  |  | v-for="(item, index) in usable" | 
|---|
|  |  |  | :label="item.value" | 
|---|
|  |  |  | >{{ item.label }}</el-radio | 
|---|
|  |  |  | 
|---|
|  |  |  | </el-radio-group> | 
|---|
|  |  |  | </el-form-item></el-col | 
|---|
|  |  |  | > | 
|---|
|  |  |  | <el-col :span="8"> | 
|---|
|  |  |  | <el-form-item label="是否必填"> | 
|---|
|  |  |  | <!-- <el-col :span="8"> | 
|---|
|  |  |  | <el-form-item label="是否必填" prop="ismandatory"> | 
|---|
|  |  |  | <el-radio-group v-model="topicobj.ismandatory"> | 
|---|
|  |  |  | <el-radio | 
|---|
|  |  |  | @change="$forceUpdate()" | 
|---|
|  |  |  | v-for="(item, index) in required" | 
|---|
|  |  |  | :label="item.value" | 
|---|
|  |  |  | >{{ item.label }}</el-radio | 
|---|
|  |  |  | > | 
|---|
|  |  |  | </el-radio-group> | 
|---|
|  |  |  | </el-form-item> | 
|---|
|  |  |  | </el-col> | 
|---|
|  |  |  | </el-col> --> | 
|---|
|  |  |  | </el-row> | 
|---|
|  |  |  | <el-row :gutter="10"> | 
|---|
|  |  |  | <el-col :span="8"> | 
|---|
|  |  |  | <el-form-item label="语言"> | 
|---|
|  |  |  | <el-select | 
|---|
|  |  |  | v-model="topicobj.language" | 
|---|
|  |  |  | 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-col :span="8" | 
|---|
|  |  |  | ><el-form-item label="题目类型"> | 
|---|
|  |  |  | ><el-form-item label="问题类型" prop="scriptType"> | 
|---|
|  |  |  | <el-select | 
|---|
|  |  |  | v-model="topicobj.scriptType" | 
|---|
|  |  |  | @change="changefn" | 
|---|
|  |  |  | 
|---|
|  |  |  | </el-select> </el-form-item | 
|---|
|  |  |  | ></el-col> | 
|---|
|  |  |  | <el-col :span="8" | 
|---|
|  |  |  | ><el-form-item label="适用方式"> | 
|---|
|  |  |  | ><el-form-item label="适用方式" prop="suitway"> | 
|---|
|  |  |  | <el-select | 
|---|
|  |  |  | v-model="topicobj.suitway" | 
|---|
|  |  |  | disabled | 
|---|
|  |  |  | 
|---|
|  |  |  | > | 
|---|
|  |  |  | </el-option> </el-select></el-form-item | 
|---|
|  |  |  | ></el-col> | 
|---|
|  |  |  | <el-col :span="8"> | 
|---|
|  |  |  | <el-form-item label="语言" prop="language"> | 
|---|
|  |  |  | <el-select | 
|---|
|  |  |  | v-model="topicobj.language" | 
|---|
|  |  |  | 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-form-item label="题目内容"> | 
|---|
|  |  |  | <el-input | 
|---|
|  |  |  | style="width: 40vw" | 
|---|
|  |  |  | type="textarea" | 
|---|
|  |  |  | id="scriptContent" | 
|---|
|  |  |  | v-model="topicobj.scriptContent" | 
|---|
|  |  |  | @focus="handleInput('scriptContent')" | 
|---|
|  |  |  | placeholder="请输入题目内容" | 
|---|
|  |  |  | ></el-input> | 
|---|
|  |  |  | </el-form-item> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <!-- <el-form-item | 
|---|
|  |  |  | label="" | 
|---|
|  |  |  | prop="scriptContent" | 
|---|
|  |  |  | 
|---|
|  |  |  | </el-form-item> | 
|---|
|  |  |  | </el-col> | 
|---|
|  |  |  | </el-row> --> | 
|---|
|  |  |  | <el-form-item label="题目说明"> | 
|---|
|  |  |  | <el-input | 
|---|
|  |  |  | style="width: 40vw" | 
|---|
|  |  |  | type="textarea" | 
|---|
|  |  |  | v-model="topicobj.scriptDesc" | 
|---|
|  |  |  | placeholder="请输入说明" | 
|---|
|  |  |  | ></el-input> | 
|---|
|  |  |  | </el-form-item> | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <!-- <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" :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" | 
|---|
|  |  |  | 
|---|
|  |  |  | topicobj.targetname ? "修改指标" : "+选择指标" | 
|---|
|  |  |  | }}</el-button></span | 
|---|
|  |  |  | > | 
|---|
|  |  |  | <span style="margin-left: 30px" | 
|---|
|  |  |  | ><el-button type="primary" @click="Saveproblem" | 
|---|
|  |  |  | >保 存</el-button | 
|---|
|  |  |  | > | 
|---|
|  |  |  | </span> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | <el-divider></el-divider> | 
|---|
|  |  |  | <el-form ref="form"> | 
|---|
|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <el-row> | 
|---|
|  |  |  | <el-col :span="10"> | 
|---|
|  |  |  | <el-form-item label="值类型"> | 
|---|
|  |  |  | <el-form-item label="结果类型"> | 
|---|
|  |  |  | <el-radio-group | 
|---|
|  |  |  | :disabled="true" | 
|---|
|  |  |  | v-model="topicobj.valueType" | 
|---|
|  |  |  | 
|---|
|  |  |  | </el-form-item> | 
|---|
|  |  |  | </el-col> | 
|---|
|  |  |  | <el-col :span="12"> | 
|---|
|  |  |  | <el-form-item label="题目类型"> | 
|---|
|  |  |  | <el-form-item label="问题题型"> | 
|---|
|  |  |  | <el-radio-group | 
|---|
|  |  |  | :disabled="true" | 
|---|
|  |  |  | v-model="topicobj.scriptType" | 
|---|
|  |  |  | 
|---|
|  |  |  | </el-col> | 
|---|
|  |  |  | </el-row> | 
|---|
|  |  |  | </el-form> | 
|---|
|  |  |  | <div v-if="topicobj.scriptType != 4"> | 
|---|
|  |  |  | <div class="headline"> | 
|---|
|  |  |  | 选项设置<span style="margin-left: 30px" | 
|---|
|  |  |  | ><el-button type="primary" round @click="addoption" | 
|---|
|  |  |  | >+新增</el-button | 
|---|
|  |  |  | ></span | 
|---|
|  |  |  | > | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | <div> | 
|---|
|  |  |  | <el-divider></el-divider> | 
|---|
|  |  |  | <div v-if="topicobj.scriptType != 4"> | 
|---|
|  |  |  | <div class="headline"> | 
|---|
|  |  |  | 选项设置<span style="margin-left: 30px" | 
|---|
|  |  |  | ><el-button type="primary" round @click="addoption" | 
|---|
|  |  |  | >+新增</el-button | 
|---|
|  |  |  | ></span | 
|---|
|  |  |  | > | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | <div | 
|---|
|  |  |  | class="topicxq" | 
|---|
|  |  |  | v-for="item in topicobj.svyLibScriptOptions" | 
|---|
|  |  |  | v-if="item.isoperation != 3" | 
|---|
|  |  |  | > | 
|---|
|  |  |  | <el-row :gutter="10"> | 
|---|
|  |  |  | <el-col :span="11" | 
|---|
|  |  |  | ><el-form-item label="选项名称"> | 
|---|
|  |  |  | <el-input | 
|---|
|  |  |  | type="text" | 
|---|
|  |  |  | placeholder="请输入选项分值" | 
|---|
|  |  |  | v-model="item.optioncontent" | 
|---|
|  |  |  | show-word-limit | 
|---|
|  |  |  | > | 
|---|
|  |  |  | </el-input> </el-form-item | 
|---|
|  |  |  | ></el-col> | 
|---|
|  |  |  | <el-col :span="11"> | 
|---|
|  |  |  | <el-form-item v-if="topicobj.scoretype == 1" label="分值"> | 
|---|
|  |  |  | <el-input | 
|---|
|  |  |  | type="text" | 
|---|
|  |  |  | placeholder="请输入选项分值" | 
|---|
|  |  |  | v-model="item.score" | 
|---|
|  |  |  | show-word-limit | 
|---|
|  |  |  | > | 
|---|
|  |  |  | </el-input> | 
|---|
|  |  |  | </el-form-item> | 
|---|
|  |  |  | <el-form-item | 
|---|
|  |  |  | v-else-if="topicobj.scoretype == 2" | 
|---|
|  |  |  | label="ABC等级" | 
|---|
|  |  |  | > | 
|---|
|  |  |  | <el-radio-group v-model="item.score"> | 
|---|
|  |  |  | <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 | 
|---|
|  |  |  | v-else-if="topicobj.scoretype == 3" | 
|---|
|  |  |  | label="优良等级" | 
|---|
|  |  |  | > | 
|---|
|  |  |  | <el-radio-group v-model="item.score"> | 
|---|
|  |  |  | <el-radio label="优">优</el-radio> | 
|---|
|  |  |  | <el-radio label="良">良</el-radio> | 
|---|
|  |  |  | <el-radio label="差">差</el-radio> | 
|---|
|  |  |  | </el-radio-group> | 
|---|
|  |  |  | </el-form-item> | 
|---|
|  |  |  | </el-col> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <div | 
|---|
|  |  |  | class="topicxq" | 
|---|
|  |  |  | v-for="item in topicobj.svyLibScriptOptions" | 
|---|
|  |  |  | v-if="item.isoperation != 3" | 
|---|
|  |  |  | > | 
|---|
|  |  |  | <el-row :gutter="10"> | 
|---|
|  |  |  | <el-col :span="11" | 
|---|
|  |  |  | ><el-form-item label="选项名称"> | 
|---|
|  |  |  | <el-input | 
|---|
|  |  |  | type="text" | 
|---|
|  |  |  | placeholder="请输入选项分值" | 
|---|
|  |  |  | v-model="item.optioncontent" | 
|---|
|  |  |  | show-word-limit | 
|---|
|  |  |  | > | 
|---|
|  |  |  | </el-input> </el-form-item | 
|---|
|  |  |  | ></el-col> | 
|---|
|  |  |  | <el-col :span="11"> | 
|---|
|  |  |  | <el-form-item v-if="topicobj.scoretype == 1" label="分值"> | 
|---|
|  |  |  | <el-input | 
|---|
|  |  |  | type="text" | 
|---|
|  |  |  | placeholder="请输入选项分值" | 
|---|
|  |  |  | v-model="item.score" | 
|---|
|  |  |  | show-word-limit | 
|---|
|  |  |  | > | 
|---|
|  |  |  | </el-input> | 
|---|
|  |  |  | </el-form-item> | 
|---|
|  |  |  | <el-form-item | 
|---|
|  |  |  | v-else-if="topicobj.scoretype == 2" | 
|---|
|  |  |  | label="ABC等级" | 
|---|
|  |  |  | <el-col | 
|---|
|  |  |  | :span="2" | 
|---|
|  |  |  | :offsset="topicobj.scoretype == 4 ? 11 : 0" | 
|---|
|  |  |  | > | 
|---|
|  |  |  | <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-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-radio-group v-model="item.isabnormal"> | 
|---|
|  |  |  | <el-radio :label="1">是</el-radio> | 
|---|
|  |  |  | <el-radio :label="0">否</el-radio> | 
|---|
|  |  |  | </el-radio-group> | 
|---|
|  |  |  | </el-form-item> | 
|---|
|  |  |  | <el-form-item | 
|---|
|  |  |  | v-else-if="topicobj.scoretype == 3" | 
|---|
|  |  |  | label="优良等级" | 
|---|
|  |  |  | > | 
|---|
|  |  |  | <el-radio-group v-model="item.score"> | 
|---|
|  |  |  | <el-radio label="优">优</el-radio> | 
|---|
|  |  |  | <el-radio label="良">良</el-radio> | 
|---|
|  |  |  | <el-radio label="差">差</el-radio> | 
|---|
|  |  |  | </el-radio-group> | 
|---|
|  |  |  | </el-form-item> | 
|---|
|  |  |  | </el-col> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <el-col :span="2" :offsset="topicobj.scoretype == 4 ? 11 : 0"> | 
|---|
|  |  |  | <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-radio-group v-model="item.isabnormal"> | 
|---|
|  |  |  | <el-radio :label="1">是</el-radio> | 
|---|
|  |  |  | <el-radio :label="0">否</el-radio> | 
|---|
|  |  |  | </el-radio-group> | 
|---|
|  |  |  | </el-form-item> | 
|---|
|  |  |  | </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> | 
|---|
|  |  |  | <el-form-item label="选项文件" prop="sickness"> | 
|---|
|  |  |  | <div style="width: 40vw"> | 
|---|
|  |  |  | <el-upload | 
|---|
|  |  |  | class="upload-demo" | 
|---|
|  |  |  | :action="uploadImgUrl" | 
|---|
|  |  |  | :headers="headers" | 
|---|
|  |  |  | accept=".jpg,.png,image/*" | 
|---|
|  |  |  | :on-success="handleChange.bind(this, item)" | 
|---|
|  |  |  | > | 
|---|
|  |  |  | <el-button size="small" type="primary" | 
|---|
|  |  |  | >点击上传</el-button | 
|---|
|  |  |  | </el-row> | 
|---|
|  |  |  | <el-row :gutter="10"> | 
|---|
|  |  |  | <el-form-item label="选中提示"> | 
|---|
|  |  |  | <el-input | 
|---|
|  |  |  | style="width: 40vw" | 
|---|
|  |  |  | type="textarea" | 
|---|
|  |  |  | autosize | 
|---|
|  |  |  | placeholder="请输入内容" | 
|---|
|  |  |  | v-model="item.prompt" | 
|---|
|  |  |  | > | 
|---|
|  |  |  | </el-upload> | 
|---|
|  |  |  | <div style="margin: 20px"> | 
|---|
|  |  |  | <el-image | 
|---|
|  |  |  | style="width: 100px; height: 100px" | 
|---|
|  |  |  | :src="item.picturePath" | 
|---|
|  |  |  | :preview-src-list="[...item.picturePath]" | 
|---|
|  |  |  | </el-input | 
|---|
|  |  |  | ></el-form-item> | 
|---|
|  |  |  | </el-row> | 
|---|
|  |  |  | <el-form-item label="选项文件" prop="sickness"> | 
|---|
|  |  |  | <div style="width: 40vw"> | 
|---|
|  |  |  | <el-upload | 
|---|
|  |  |  | class="upload-demo" | 
|---|
|  |  |  | :action="uploadImgUrl" | 
|---|
|  |  |  | :headers="headers" | 
|---|
|  |  |  | accept=".jpg,.png,image/*" | 
|---|
|  |  |  | :on-success="handleChange.bind(this, item)" | 
|---|
|  |  |  | > | 
|---|
|  |  |  | </el-image> | 
|---|
|  |  |  | <el-button size="small" type="primary" | 
|---|
|  |  |  | >点击上传</el-button | 
|---|
|  |  |  | > | 
|---|
|  |  |  | </el-upload> | 
|---|
|  |  |  | <div style="margin: 20px"> | 
|---|
|  |  |  | <el-image | 
|---|
|  |  |  | style="width: 100px; height: 100px" | 
|---|
|  |  |  | :src="item.picturePath" | 
|---|
|  |  |  | :preview-src-list=" | 
|---|
|  |  |  | item.picturePath ? [item.picturePath] : [] | 
|---|
|  |  |  | " | 
|---|
|  |  |  | > | 
|---|
|  |  |  | </el-image> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </el-form-item> | 
|---|
|  |  |  | </el-form-item> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | <div v-else class="topicxq"> | 
|---|
|  |  |  | <el-input | 
|---|
|  |  |  | type="textarea" | 
|---|
|  |  |  | :rows="4" | 
|---|
|  |  |  | placeholder="此处展示收集信息" | 
|---|
|  |  |  | placeholder="此处展示问答题收集信息" | 
|---|
|  |  |  | v-model="testgovalue" | 
|---|
|  |  |  | > | 
|---|
|  |  |  | </el-input> | 
|---|
|  |  |  | 
|---|
|  |  |  | :show-overflow-tooltip="true" | 
|---|
|  |  |  | /> | 
|---|
|  |  |  | <el-table-column | 
|---|
|  |  |  | label="语言" | 
|---|
|  |  |  | align="center" | 
|---|
|  |  |  | key="language" | 
|---|
|  |  |  | prop="language" | 
|---|
|  |  |  | width="200" | 
|---|
|  |  |  | :show-overflow-tooltip="true" | 
|---|
|  |  |  | /> | 
|---|
|  |  |  | <el-table-column | 
|---|
|  |  |  | label="是否可用" | 
|---|
|  |  |  | align="center" | 
|---|
|  |  |  | key="isAvailable" | 
|---|
|  |  |  | prop="isAvailable" | 
|---|
|  |  |  | key="isavailable" | 
|---|
|  |  |  | prop="isavailable" | 
|---|
|  |  |  | > | 
|---|
|  |  |  | <template slot-scope="scope"> | 
|---|
|  |  |  | <dict-tag :options="usable" :value="scope.row.isAvailable" /> | 
|---|
|  |  |  | <dict-tag :options="usable" :value="scope.row.isavailable" /> | 
|---|
|  |  |  | </template> | 
|---|
|  |  |  | </el-table-column> | 
|---|
|  |  |  | <el-table-column | 
|---|
|  |  |  | 
|---|
|  |  |  | /> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </el-drawer> | 
|---|
|  |  |  | <el-dialog title="题目预览" :visible.sync="topicVisible" width="50%"> | 
|---|
|  |  |  | <el-dialog title="问题预览" :visible.sync="topicVisible" width="50%"> | 
|---|
|  |  |  | <div class="preview-left"> | 
|---|
|  |  |  | <div class="dev-text"> | 
|---|
|  |  |  | <span>{{ topicobj.scriptContent }}</span> | 
|---|
|  |  |  | 
|---|
|  |  |  | svyLibScriptOptions: [], | 
|---|
|  |  |  | svyLibScriptTagList: [], | 
|---|
|  |  |  | suitway: "1", | 
|---|
|  |  |  | scoretype:'4', | 
|---|
|  |  |  | language:'普通话', | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | headers: { | 
|---|
|  |  |  | Authorization: "Bearer " + getToken(), | 
|---|
|  |  |  | 
|---|
|  |  |  | { value: "scriptTopic", table: "scriptTopic" }, | 
|---|
|  |  |  | ], | 
|---|
|  |  |  | inputValueillness: "", | 
|---|
|  |  |  | testgovalue: "", | 
|---|
|  |  |  | required: [], | 
|---|
|  |  |  | themelist: [], | 
|---|
|  |  |  | languagelist: [], | 
|---|
|  |  |  | 
|---|
|  |  |  | valuetype: [], | 
|---|
|  |  |  | usable: [], | 
|---|
|  |  |  | mode: [], //方式 | 
|---|
|  |  |  | // 表单校验 | 
|---|
|  |  |  | rules: { | 
|---|
|  |  |  | categoryid: [ | 
|---|
|  |  |  | { required: true, message: "问题分类不能为空", trigger: "blur" }, | 
|---|
|  |  |  | ], | 
|---|
|  |  |  | scoretype: [ | 
|---|
|  |  |  | { required: true, message: "评价类型不能为空", trigger: "blur" }, | 
|---|
|  |  |  | ], | 
|---|
|  |  |  | language: [ | 
|---|
|  |  |  | { required: true, message: "语言不能为空", trigger: "blur" }, | 
|---|
|  |  |  | ], | 
|---|
|  |  |  | isavailable: [ | 
|---|
|  |  |  | { required: true, message: "可用状态不能为空", trigger: "blur" }, | 
|---|
|  |  |  | ], | 
|---|
|  |  |  | scriptTopic: [ | 
|---|
|  |  |  | { required: true, message: "问题标题不能为空", trigger: "blur" }, | 
|---|
|  |  |  | ], | 
|---|
|  |  |  | ismandatory: [ | 
|---|
|  |  |  | { required: true, message: "是否必填不能为空", trigger: "blur" }, | 
|---|
|  |  |  | ], | 
|---|
|  |  |  | scriptType: [ | 
|---|
|  |  |  | { required: true, message: "问题类型不能为空", trigger: "blur" }, | 
|---|
|  |  |  | ], | 
|---|
|  |  |  | suitway: [ | 
|---|
|  |  |  | { required: true, message: "适用方式不能为空", trigger: "blur" }, | 
|---|
|  |  |  | ], | 
|---|
|  |  |  | scriptContent: [ | 
|---|
|  |  |  | { required: true, message: "问题内容不能为空", trigger: "blur" }, | 
|---|
|  |  |  | ], | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | }; | 
|---|
|  |  |  | }, | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | // 获取数据 | 
|---|
|  |  |  | getissueinfo() { | 
|---|
|  |  |  | this.id = this.$route.query.id; | 
|---|
|  |  |  | this.topicobj.categoryid = Number(this.$route.query.categoryid); | 
|---|
|  |  |  | console.log(this.topicobj.categoryid); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | this.topicobj.isavailable = "1"; | 
|---|
|  |  |  | this.topicobj.language = "普通话"; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | // 分类 | 
|---|
|  |  |  | getissueclassify({}).then((res) => { | 
|---|
|  |  |  | this.classifylist = res.rows; | 
|---|
|  |  |  | console.log(this.classifylist, "分类"); | 
|---|
|  |  |  | if (this.$route.query.categoryid) { | 
|---|
|  |  |  | this.topicobj.categoryid = Number(this.$route.query.categoryid); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }); | 
|---|
|  |  |  | if (!this.id) { | 
|---|
|  |  |  | return; | 
|---|
|  |  |  | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | // 新增或修改详情 | 
|---|
|  |  |  | compileissue() { | 
|---|
|  |  |  | this.topicobj.svyLibScriptOptions = this.topicobj.svyLibScriptOptions.map( | 
|---|
|  |  |  | 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; | 
|---|
|  |  |  | 
|---|
|  |  |  | if (this.illnesslistapi.length) { | 
|---|
|  |  |  | deltargetillness(this.illnesslistapi.join(",")).then((res) => {}); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }) | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | // 判断分值 | 
|---|
|  |  |  | Scorejudgment() { | 
|---|
|  |  |  | let scorearr = this.topicobj.svyLibScriptOptions; | 
|---|
|  |  |  | let isValid = scorearr.every((score) => { | 
|---|
|  |  |  | if (score.score) { | 
|---|
|  |  |  | console.log(Number(score.score), this.topicobj.score, "分值"); | 
|---|
|  |  |  | if ( | 
|---|
|  |  |  | Number(score.score) < 0 || | 
|---|
|  |  |  | Number(score.score) > Number(this.topicobj.score) | 
|---|
|  |  |  | ) { | 
|---|
|  |  |  | console.log(score, "错误分值"); | 
|---|
|  |  |  | let isValid = scorearr.every((score, index) => { | 
|---|
|  |  |  | if (this.topicobj.scriptType == 1) { | 
|---|
|  |  |  | if (score.score||score.score==0) { | 
|---|
|  |  |  | if ( | 
|---|
|  |  |  | Number(score.score) < 0 || | 
|---|
|  |  |  | Number(score.score) > Number(this.topicobj.score) | 
|---|
|  |  |  | ) { | 
|---|
|  |  |  | console.log(score, "错误分值"); | 
|---|
|  |  |  | this.$message({ | 
|---|
|  |  |  | message: "选项分值必须在0到" + this.topicobj.score + "分之间", | 
|---|
|  |  |  | type: "warning", | 
|---|
|  |  |  | }); | 
|---|
|  |  |  | return false; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | return true; | 
|---|
|  |  |  | } else { | 
|---|
|  |  |  | this.$message({ | 
|---|
|  |  |  | message: "选项分值必须在0到" + this.topicobj.score + "分之间", | 
|---|
|  |  |  | message: "选项分值未设置", | 
|---|
|  |  |  | type: "warning", | 
|---|
|  |  |  | }); | 
|---|
|  |  |  | return false; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } else if (this.topicobj.scriptType == 2) { | 
|---|
|  |  |  | // 累加分值 | 
|---|
|  |  |  | const totalScore = scorearr.reduce((acc, score) => { | 
|---|
|  |  |  | if (score.score) { | 
|---|
|  |  |  | return acc + Number(score.score); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | return acc; // 如果 score.score 不存在,不累加 | 
|---|
|  |  |  | }, 0); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | // 检查累加的分值是否等于 this.topicobj.score | 
|---|
|  |  |  | if (totalScore !== Number(this.topicobj.score)) { | 
|---|
|  |  |  | this.$message({ | 
|---|
|  |  |  | message: | 
|---|
|  |  |  | "多选题选项分值总和必须等于 " + this.topicobj.score + " 分", | 
|---|
|  |  |  | type: "warning", | 
|---|
|  |  |  | }); | 
|---|
|  |  |  | return false; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | return true; // 如果总分正确,返回 true | 
|---|
|  |  |  | } else if (this.topicobj.scriptType == 4) { | 
|---|
|  |  |  | return true; | 
|---|
|  |  |  | } else if (this.topicobj.scriptType == 3) { | 
|---|
|  |  |  | return true; | 
|---|
|  |  |  | } else { | 
|---|
|  |  |  | this.$message({ | 
|---|
|  |  |  | message: "选项分值未设置", | 
|---|
|  |  |  | type: "warning", | 
|---|
|  |  |  | }); | 
|---|
|  |  |  | return false; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | if (isValid) { | 
|---|
|  |  |  | this.compileissue(); | 
|---|
|  |  |  | // console.log("到保存了"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | Saveproblem() { | 
|---|
|  |  |  | 
|---|
|  |  |  | // 判断指标 | 
|---|
|  |  |  | changefn(item) { | 
|---|
|  |  |  | console.log(item); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | if (this.topicobj.targetname || this.topicobj.svyLibScriptOptions[0]) { | 
|---|
|  |  |  | this.$modal | 
|---|
|  |  |  | .confirm("更改类型后选项将清空是否继续?") | 
|---|
|  |  |  | .then(() => { | 
|---|
|  |  |  | this.scriptTypels = this.topicobj.scriptType; | 
|---|
|  |  |  | this.topicobj.svyLibScriptOptions = []; | 
|---|
|  |  |  | this.topicobj.svyLibScriptOptions.forEach((item) => { | 
|---|
|  |  |  | item.isoperation = 3; | 
|---|
|  |  |  | }); | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | .catch(() => { | 
|---|
|  |  |  | this.topicobj.scriptType = this.scriptTypels; | 
|---|
|  |  |  | 
|---|
|  |  |  | console.log(this.topicobj.svyLibScriptOptions); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | if (this.topicobj.svyLibScriptOptions[index].id) { | 
|---|
|  |  |  | console.log(2); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | this.topicobj.svyLibScriptOptions[index].isoperation = 3; | 
|---|
|  |  |  | } else { | 
|---|
|  |  |  | this.topicobj.svyLibScriptOptions.splice(index, 1); | 
|---|
|  |  |  | 
|---|
|  |  |  | ) | 
|---|
|  |  |  | .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.isavailable = "0"; | 
|---|
|  |  |  | this.topicobj.language = "普通话"; | 
|---|
|  |  |  | this.topicobj.svyLibScriptOptions = []; | 
|---|
|  |  |  | const labellist = row.targetoptionList; | 
|---|
|  |  |  | labellist.forEach((item) => { | 
|---|
|  |  |  | 
|---|
|  |  |  | tagcategoryid: "0", | 
|---|
|  |  |  | }; | 
|---|
|  |  |  | listtag(tagqueryParams).then((response) => { | 
|---|
|  |  |  | console.log(response, "待选标签"); | 
|---|
|  |  |  | this.optionstag = response.rows; | 
|---|
|  |  |  | }); | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | 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); | 
|---|
|  |  |  | 
|---|
|  |  |  | border-radius: 4px; | 
|---|
|  |  |  | margin-top: 15px; | 
|---|
|  |  |  | margin-left: 10%; | 
|---|
|  |  |  | padding-left: 20px; | 
|---|
|  |  |  | padding-top: 15px; | 
|---|
|  |  |  | padding: 20px; | 
|---|
|  |  |  | 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); | 
|---|