| | |
| | | <el-table-column type="selection" :reserve-selection="true" width="25" align="center" /> |
| | | <el-table-column fixed label="序号" sortable type="index" align="center" :index="(queryParams.pageNum-1)*queryParams.pageSize+1" width="60"/> |
| | | <el-table-column label="类型" prop="type" sortable width="80" align="center"> |
| | | <template slot-scope="scope">{{ getSrc(scope.row.type) }}</template> |
| | | <!-- <template slot-scope="scope">{{scope.row.type? scope.row.type: '————'}}</template>--> |
| | | <!-- <template slot-scope="scope">{{ getSrc(scope.row.type) }}</template>--> |
| | | <template slot-scope="scope">{{scope.row.type? scope.row.type: '————'}}</template> |
| | | </el-table-column> |
| | | <el-table-column label="症状" prop="symptom" sortable :show-overflow-tooltip="true" width="120" align="center" > |
| | | <template slot-scope="scope">{{scope.row.symptom? scope.row.symptom: '————'}}</template> |
| | |
| | | <el-option v-for="(item, index) in typeOptions" :key="index" :label="item.label" :value="item.value" |
| | | ></el-option> |
| | | </el-select> |
| | | <el-input v-model="newOption" v-if="showInput" placeholder="若未在上述选项中找到对应类别,请在此输入新的类别" @change="addNewOption"></el-input> |
| | | </el-form-item> |
| | | |
| | | <el-form-item label="症状" prop="symptom"> |
| | |
| | | dateRange: [], |
| | | // 数据范围选项 |
| | | fot:[".jpg",".jif"], |
| | | fileList:[ |
| | | ], |
| | | fileListOther:[ |
| | | |
| | | ], |
| | | fileList:[], |
| | | fileListOther:[], |
| | | dsb:true, |
| | | btn:false, |
| | | fit:['fill'], |
| | |
| | | rules: { |
| | | |
| | | type: [{ |
| | | required: true, |
| | | // required: true, |
| | | message: '请输入类型', |
| | | trigger: 'blur' |
| | | }], |
| | |
| | | value:'内科', |
| | | label:'内科' |
| | | }], |
| | | newOption: undefined, |
| | | showInput: true |
| | | }; |
| | | }, |
| | | created() { |
| | |
| | | return "statistics-warning-row"; |
| | | } |
| | | }, |
| | | //类别 |
| | | addNewOption() { |
| | | const newOption = this.newOption.trim(); |
| | | if (newOption && !this.typeOptions.includes(newOption)) { |
| | | this.typeOptions.push(newOption); |
| | | } |
| | | }, |
| | | /** 查询记录列表 */ |
| | | getList() { |
| | | this.loading = true; |
| | |
| | | ); |
| | | }, |
| | | /** 查询类别信息 */ |
| | | getCateInfor() |
| | | { |
| | | let _this = this |
| | | getCategory().then(response=>{ |
| | | |
| | | response.data.itemValues.replace("{","").replace("}","").split(",").map(elem=>{ |
| | | _this.typeOptions.push({"label":elem.split(":")[0], "value":elem.split(":")[0]}) |
| | | }) |
| | | }) |
| | | }, |
| | | // getCateInfor() |
| | | // { |
| | | // let _this = this |
| | | // getCategory().then(response=>{ |
| | | // |
| | | // response.data.itemValues.replace("{","").replace("}","").split(",").map(elem=>{ |
| | | // _this.typeOptions.push({"label":elem.split(":")[0], "value":elem.split(":")[0]}) |
| | | // }) |
| | | // }) |
| | | // }, |
| | | //类别选择 |
| | | getSrc(type) { |
| | | if (type === '神经科'){ |
| | |
| | | }).catch(() => { Message({ message: "导入失败", type: 'error' })}); |
| | | |
| | | } |
| | | }, |
| | | watch: { |
| | | type(value) { |
| | | if (value === '') { |
| | | this.showInput = true; |
| | | } else { |
| | | this.showInput = false; |
| | | } |
| | | } |
| | | } |
| | | }; |
| | | </script> |