AddTerm.vue 61 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778
  1. <template>
  2. <div>
  3. <crumbs :title="minTitle" :param="$route.params" linkTo="BasicTermsMaintenance"></crumbs>
  4. <div class="contents">
  5. <div class="content">
  6. <h3>添加术语:</h3>
  7. <p class="titl">医学标准术语:</p>
  8. <table class="deptbox" v-if="id == ''">
  9. <tr>
  10. <td class="ind">序号</td>
  11. <td>
  12. 医学标准术语
  13. <span class="necess">*</span>
  14. </td>
  15. <td>拼音</td>
  16. <td>
  17. 术语类型
  18. <span class="necess">*</span>
  19. </td>
  20. <td class="desc">说明</td>
  21. </tr>
  22. <tr>
  23. <td class="ind">1</td>
  24. <td :title="data.libName&&data.libName.length>9?data.libName:''">
  25. <!-- 修改时标准词不能修改,修改了会当做新增处理 4-17 -->
  26. <p v-if="id">{{data.libName}}</p>
  27. <!-- 4-18 需求变更 -->
  28. <input
  29. v-else
  30. type="text"
  31. v-model.trim="data.libName"
  32. placeholder="请输入术语"
  33. maxlength="50"
  34. @blur="handleBlur(1)"
  35. />
  36. <SimilarListDrag
  37. :searchType="searchType"
  38. :similarList="similarList"
  39. isShow="true"
  40. @closeTable="closeTable"
  41. ></SimilarListDrag>
  42. </td>
  43. <td>
  44. <input
  45. type="text"
  46. v-model.trim="data.spell"
  47. placeholder="请输入拼音"
  48. maxlength="50"
  49. @input="handlePinyin($event,1)"
  50. />
  51. </td>
  52. <td>
  53. <!-- <el-select v-if="!id" v-model="data.type" filterable placeholder="请选择" size="small" @change="selectType">
  54. <el-option
  55. v-for="item in typeList"
  56. :key="item.id"
  57. :label="item.name"
  58. :value="item.name">
  59. </el-option>
  60. </el-select>-->
  61. <template v-if="!id">
  62. <el-select
  63. v-model="data.type"
  64. filterable
  65. clearable
  66. placeholder="请选择"
  67. @clear="clearDataCi"
  68. size="small"
  69. @change="selectType"
  70. >
  71. <el-option-group v-for="group in options" :key="group.label">
  72. <el-option
  73. v-for="item in group.options"
  74. :key="item.id"
  75. :label="item.name"
  76. :value="item.name"
  77. ></el-option>
  78. </el-option-group>
  79. </el-select>
  80. </template>
  81. <span v-else>{{data.type}}</span>
  82. </td>
  83. <td class="desc">
  84. <input v-model.trim="data.remark" placeholder="请输入术语说明" maxlength="120" />
  85. </td>
  86. </tr>
  87. </table>
  88. <div class="deptboxChange" v-else>
  89. <table class="deptbox deptboxTable">
  90. <tr>
  91. <td class="ind">序号</td>
  92. <td class="desc">医学标准术语</td>
  93. <td>拼音</td>
  94. <td>术语类型</td>
  95. <td class="desc">说明</td>
  96. <td class="descs">术语性质</td>
  97. <td v-if="id">操作</td>
  98. </tr>
  99. <tr v-for="(item,index) in allwords" :key="index">
  100. <td class="ind">{{index+1}}</td>
  101. <td :title="item.libName&&item.libName.length>9?item.libName:''">
  102. <!-- 使用原生input,输入限制 -->
  103. <!-- <el-input v-model="item.name" placeholder="请输入术语" maxlength="30" size="small" @input.native="handleInput(2,index)"></el-input> -->
  104. <input
  105. type="text"
  106. v-model.trim="item.libName"
  107. :title="item.name"
  108. placeholder="请输入术语"
  109. maxlength="50"
  110. @blur="handleBlur(2,index,99)"
  111. />
  112. <SimilarListDrag
  113. :searchType="searchType"
  114. :similarList="similarList"
  115. :isShow="index ===searchIndex"
  116. @closeTable="closeTable"
  117. ></SimilarListDrag>
  118. </td>
  119. <!-- <td v-if="!item.isEdit">
  120. {{item.spell}}
  121. </td>
  122. <td v-else>-->
  123. <td>
  124. <input
  125. type="text"
  126. v-model.trim="item.spell"
  127. placeholder="请输入拼音"
  128. maxlength="50"
  129. @input="handlePinyin($event,2,index)"
  130. class="spell"
  131. />
  132. </td>
  133. <td>
  134. <template v-if="index==0&&copy">
  135. <el-select
  136. v-model="data.type"
  137. filterable
  138. placeholder="请选择"
  139. size="small"
  140. @clear="clearDataCi"
  141. @change="selectType"
  142. >
  143. <el-option-group v-for="group in options" :key="group.label">
  144. <el-option
  145. v-for="item in group.options"
  146. :key="item.id"
  147. :label="item.name"
  148. :value="item.name"
  149. ></el-option>
  150. </el-option-group>
  151. </el-select>
  152. </template>
  153. <span v-else>{{data.type}}</span>
  154. </td>
  155. <td class="desc">
  156. <input v-model.trim="item.remark" placeholder="请输入术语说明" maxlength="120" />
  157. </td>
  158. <td class="desc">{{item.isConcept == 1?"医学标准术语":"同义词"}}</td>
  159. <td v-if="id">
  160. <span class="displayColor" v-if="item.isConcept == 1">删除</span>
  161. <span @click="deleLine(index,55,item)" class="delete" v-else>删除</span>
  162. </td>
  163. </tr>
  164. <tr @click="addSpan(55)">
  165. <td colspan="7" class="addSpan">+</td>
  166. </tr>
  167. </table>
  168. <div class="actionDo"></div>
  169. </div>
  170. <p class="titl" v-if="id == ''">同义词:</p>
  171. <table class="deptbox" v-if="id == ''">
  172. <tr>
  173. <td class="ind">序号</td>
  174. <td>医学标准术语</td>
  175. <td>拼音</td>
  176. <td>术语类型</td>
  177. <td class="desc">说明</td>
  178. <td v-if="id">操作</td>
  179. </tr>
  180. <tr v-for="(item,index) in synonymous" :key="index">
  181. <td class="ind">{{index+1}}</td>
  182. <td :title="item.libName&&item.libName.length>9?item.libName:''">
  183. <!-- 使用原生input,输入限制 -->
  184. <!-- <el-input v-model="item.name" placeholder="请输入术语" maxlength="30" size="small" @input.native="handleInput(2,index)"></el-input> -->
  185. <input
  186. type="text"
  187. v-model.trim="item.libName"
  188. placeholder="请输入术语"
  189. maxlength="50"
  190. @blur="handleBlur(2,index)"
  191. />
  192. <SimilarListDrag
  193. :searchType="searchType"
  194. :similarList="similarList"
  195. :isShow="index ===searchIndex"
  196. @closeTable="closeTable"
  197. ></SimilarListDrag>
  198. </td>
  199. <td>
  200. <input
  201. type="text"
  202. v-model.trim="item.spell"
  203. placeholder="请输入拼音"
  204. maxlength="50"
  205. @input="handlePinyin($event,3,index)"
  206. />
  207. </td>
  208. <td>{{data.type}}</td>
  209. <td class="desc">
  210. <input v-model.trim="item.remark" placeholder="请输入术语说明" maxlength="120" />
  211. </td>
  212. <td v-if="id">
  213. <span @click="deleLine(index,1,item)" class="delete">删除</span>
  214. </td>
  215. </tr>
  216. <tr @click="addSpan">
  217. <td :colspan="colspan" class="addSpan">+</td>
  218. </tr>
  219. </table>
  220. <div class="moreInfo" v-if="showMore == 1">
  221. <p>更多信息:</p>
  222. <el-form label-width="150px">
  223. <el-form-item label="性别:">
  224. <el-select v-model="sexType">
  225. <el-option v-for="(it,i) in sex" :key="i" :label="it.name" :value="it.name"></el-option>
  226. </el-select>
  227. </el-form-item>
  228. <el-form-item label="年龄:" class="ages is-required">
  229. <el-input v-model.number="minAge" type="number" @input="inputAge"></el-input>
  230. <span class="ageLine">~</span>
  231. <el-input v-model.number="maxAge" type="number" @input="inputAge"></el-input>
  232. </el-form-item>
  233. <el-form-item v-if="data.type=='实验室检查子项目'" label="参考范围" class="ages">
  234. <el-radio-group v-model="radio" @change="changeRadio">
  235. <el-radio :label="1">数值内容</el-radio>
  236. <el-radio :label="2">文本内容</el-radio>
  237. </el-radio-group>
  238. </el-form-item>
  239. <el-form-item
  240. v-if="data.type=='实验室检查子项目' && (radio == 1 || klLisVO.minValue || klLisVO.maxValue)"
  241. class="ages"
  242. >
  243. <el-input v-model.trim="klLisVO.minValue" type="number" @input="inputAge"></el-input>
  244. <span class="ageLine">~</span>
  245. <el-input v-model.trim="klLisVO.maxValue" type="number" @input="inputAge"></el-input>
  246. <el-input
  247. class="inp"
  248. v-model.trim="klLisVO.unit"
  249. placeholder="输入单位"
  250. maxlength="6"
  251. type="text"
  252. @input="inputAge"
  253. ></el-input>
  254. </el-form-item>
  255. <el-form-item
  256. v-if="data.type=='实验室检查子项目' && (radio == 2 || klLisVO.qualitative !='')"
  257. class="ages"
  258. >
  259. <div-editable v-model="klLisVO.qualitative" :Maincontent="'Maincontent'"></div-editable>
  260. </el-form-item>
  261. <div
  262. v-if="data.type=='实验室检查子项目'"
  263. style=" display:inlne;position: relative;right: -530px;top: -40px;"
  264. >
  265. <span style="margin-right:15px">范围</span>
  266. <el-select v-model="klLisVO.type">
  267. <el-option v-for="(it,i) in range" :key="i" :label="it.name" :value="it.value"></el-option>
  268. </el-select>
  269. </div>
  270. <el-form-item label="科室:" v-if="dioType" class="marT">
  271. <el-select v-model="dept">
  272. <!-- <el-option v-for="(it,i) in deptList" :label="it.name" :value="it.name"></el-option> -->
  273. <el-option-group v-for="group in deptListArr" :key="group.label">
  274. <el-option
  275. v-for="item in group.deptList"
  276. :key="item.id"
  277. :label="item.name"
  278. :value="item.name"
  279. ></el-option>
  280. </el-option-group>
  281. </el-select>
  282. </el-form-item>
  283. <el-form-item label="归属类型:" v-if="dioType" class="marT">
  284. <el-select v-model="dioType">
  285. <el-option v-for="(it,i) in dioTypeList" :key="i" :label="it.name" :value="it.val"></el-option>
  286. </el-select>
  287. </el-form-item>
  288. <el-form-item label="药品类型:" v-if="data.type=='药品通用名'" class="marT is-required">
  289. <el-select v-model="drug">
  290. <el-option v-for="(it,i) in drugTypeList" :key="i" :label="it.name" :value="it.val"></el-option>
  291. </el-select>
  292. </el-form-item>
  293. <el-form-item
  294. label="危急标识:"
  295. v-if="data.type=='辅助检查项目' || data.type=='辅助检查子项目'"
  296. class="marT is-required"
  297. >
  298. <el-radio-group v-model="klPacsVO.emergencySign">
  299. <el-radio :label="1">是</el-radio>
  300. <el-radio :label="0">否</el-radio>
  301. </el-radio-group>
  302. </el-form-item>
  303. <el-form-item
  304. label="方法:"
  305. v-if="data.type=='辅助检查项目' || data.type=='辅助检查子项目'"
  306. class="marT"
  307. >
  308. <div-editable v-model="klPacsVO.checkMethod" :Maincontent="'checkMethod'"></div-editable>
  309. </el-form-item>
  310. <el-form-item
  311. label="检查技术:"
  312. v-if="data.type=='辅助检查项目' || data.type=='辅助检查子项目'"
  313. class="marT"
  314. >
  315. <div-editable v-model="klPacsVO.checkSkillful" :Maincontent="'checkSkillful'"></div-editable>
  316. </el-form-item>
  317. <el-form-item
  318. label="项目定义:"
  319. v-if="data.type=='辅助检查项目' || data.type=='辅助检查子项目'"
  320. class="marT"
  321. >
  322. <el-input
  323. type="textarea"
  324. row="3"
  325. v-model.trim="klPacsVO.definition"
  326. placeholder="请输入"
  327. maxlength="500"
  328. ></el-input>
  329. </el-form-item>
  330. <el-form-item
  331. label="检查目的:"
  332. v-if="data.type=='辅助检查项目' || data.type=='辅助检查子项目'"
  333. class="marT"
  334. >
  335. <el-input
  336. type="textarea"
  337. row="3"
  338. v-model.trim="klPacsVO.checkObjective"
  339. placeholder="请输入"
  340. maxlength="500"
  341. ></el-input>
  342. </el-form-item>
  343. <el-form-item
  344. label="禁忌症和局限性:"
  345. v-if="data.type=='辅助检查项目' || data.type=='辅助检查子项目'"
  346. class="marT"
  347. >
  348. <el-input
  349. type="textarea"
  350. row="3"
  351. v-model.trim="klPacsVO.condLimit"
  352. placeholder="请输入"
  353. maxlength="500"
  354. ></el-input>
  355. </el-form-item>
  356. <el-form-item
  357. label="适应症:"
  358. v-if="data.type=='辅助检查项目' || data.type=='辅助检查子项目'"
  359. class="marT"
  360. >
  361. <el-input
  362. type="textarea"
  363. row="3"
  364. v-model.trim="klPacsVO.interventional"
  365. placeholder="请输入"
  366. maxlength="500"
  367. ></el-input>
  368. </el-form-item>
  369. <el-form-item
  370. label="检查前准备:"
  371. v-if="data.type=='辅助检查项目' || data.type=='辅助检查子项目'"
  372. class="marT"
  373. >
  374. <el-input
  375. type="textarea"
  376. row="3"
  377. v-model.trim="klPacsVO.checkPrepare"
  378. placeholder="请输入"
  379. maxlength="500"
  380. ></el-input>
  381. </el-form-item>
  382. <el-form-item v-if="data.type=='症状'" label="阳性症状:" prop="description" class="marT">
  383. <el-radio v-model="klSymptomVO.isPositive" :label="1">是</el-radio>
  384. <el-radio v-model="klSymptomVO.isPositive" :label="0">否</el-radio>
  385. </el-form-item>
  386. <el-form-item v-if="data.type=='症状'" label="英文名称:" prop="description" class="marT">
  387. <div-editable v-model="klSymptomVO.enName" :Maincontent="'enNamekl'"></div-editable>
  388. </el-form-item>
  389. <el-form-item v-if="data.type=='症状'" label="就诊科室:" prop="description" class="marT">
  390. <searchTerm :refbool.sync="klSymptomVO.deptList" :type="115"></searchTerm>
  391. </el-form-item>
  392. <el-form-item v-if="data.type=='症状'" label="发病部位:" prop="description" class="marT">
  393. <searchTerm :refbool.sync="klSymptomVO.partList" :type="122"></searchTerm>
  394. </el-form-item>
  395. <el-form-item v-if="data.type=='症状'" label="常见伴随症状:" prop="description" class="marT">
  396. <searchTerm :refbool.sync="klSymptomVO.conSymptomList" :type="103"></searchTerm>
  397. </el-form-item>
  398. <el-form-item v-if="data.type=='症状'" label="性质:" prop="description" class="marT">
  399. <searchTerm :refbool.sync="klSymptomVO.natureList" :type="126"></searchTerm>
  400. </el-form-item>
  401. <el-form-item v-if="data.type=='症状'" label="缓解因素:" prop="description" class="marT">
  402. <div-editable v-model="klSymptomVO.mitigatingFac" :Maincontent="'mitigatingFac'"></div-editable>
  403. </el-form-item>
  404. <el-form-item v-if="data.type=='症状'" label="加重因素:" prop="description" class="marT">
  405. <div-editable v-model="klSymptomVO.aggravateFac" :Maincontent="'aggravateFac'"></div-editable>
  406. </el-form-item>
  407. <el-form-item v-if="data.type=='症状'" label="通俗解释:" prop="description" class="marT">
  408. <div-editable v-model="klSymptomVO.commonExplain" :Maincontent="'commonExplain'"></div-editable>
  409. </el-form-item>
  410. <el-form-item v-if="data.type=='症状'" label="定义:" prop="description" class="marT">
  411. <el-input
  412. type="textarea"
  413. row="3"
  414. v-model.trim="klSymptomVO.definition"
  415. placeholder="请输入"
  416. maxlength="500"
  417. ></el-input>
  418. </el-form-item>
  419. <el-form-item v-if="data.type=='症状'" label="症状起因:" prop="description" class="marT">
  420. <el-input
  421. type="textarea"
  422. row="3"
  423. v-model.trim="klSymptomVO.cause"
  424. placeholder="请输入"
  425. maxlength="500"
  426. ></el-input>
  427. </el-form-item>
  428. <el-form-item v-if="data.type=='症状'" label="常见疾病:" prop="description" class="marT">
  429. <el-input
  430. type="textarea"
  431. row="3"
  432. v-model.trim="klSymptomVO.commonDis"
  433. placeholder="请输入"
  434. maxlength="500"
  435. ></el-input>
  436. </el-form-item>
  437. <el-form-item v-if="data.type=='症状'" label="预防措施:" prop="description" class="marT">
  438. <el-input
  439. type="textarea"
  440. row="3"
  441. v-model.trim="klSymptomVO.preMeasures"
  442. placeholder="请输入"
  443. maxlength="500"
  444. ></el-input>
  445. </el-form-item>
  446. <el-form-item v-if="data.type=='症状'" label="饮食禁忌:" prop="description" class="marT">
  447. <el-input
  448. type="textarea"
  449. row="3"
  450. v-model.trim="klSymptomVO.foodProhibition"
  451. placeholder="请输入"
  452. maxlength="500"
  453. ></el-input>
  454. </el-form-item>
  455. <el-form-item
  456. v-if="data.type=='疾病'"
  457. label="ICD10编码:"
  458. prop="description"
  459. class="marT description"
  460. >
  461. <el-input v-model.trim="klDiseaseVO.icd10Code" maxlength="30" placeholder="请输入"></el-input>
  462. </el-form-item>
  463. <el-form-item
  464. v-if="data.type=='疾病'"
  465. label="发病率:"
  466. prop="description"
  467. class="marT description"
  468. >
  469. <el-input v-model.trim="klDiseaseVO.incidence" placeholder="请输入"></el-input>
  470. </el-form-item>
  471. <el-form-item label="遗传性:" v-if="data.type=='疾病'" class="marT">
  472. <el-radio-group v-model="klDiseaseVO.isHeredity">
  473. <el-radio :label="1">是</el-radio>
  474. <el-radio :label="0">否</el-radio>
  475. </el-radio-group>
  476. </el-form-item>
  477. <el-form-item label="常见病:" v-if="data.type=='疾病'" class="marT">
  478. <el-radio-group v-model="klDiseaseVO.isCommonDis">
  479. <el-radio :label="1">是</el-radio>
  480. <el-radio :label="0">否</el-radio>
  481. </el-radio-group>
  482. </el-form-item>
  483. <el-form-item label="传染性:" v-if="data.type=='疾病'" class="marT">
  484. <el-radio-group v-model="klDiseaseVO.isInfect">
  485. <el-radio :label="1">是</el-radio>
  486. <el-radio :label="0">否</el-radio>
  487. </el-radio-group>
  488. </el-form-item>
  489. <el-form-item label="疾病就诊科室:" v-if="data.type=='疾病'" class="marT">
  490. <searchTerm :refbool.sync="klDiseaseVO.deptList" :type="115"></searchTerm>
  491. </el-form-item>
  492. <el-form-item label="疾病发病部位:" v-if="data.type=='疾病'" class="marT">
  493. <searchTerm :refbool.sync="klDiseaseVO.partList" :type="122"></searchTerm>
  494. </el-form-item>
  495. <el-form-item label="疾病系统分类:" v-if="data.type=='疾病'" class="marT">
  496. <searchTerm :refbool.sync="klDiseaseVO.systemTypeList" :type="307"></searchTerm>
  497. </el-form-item>
  498. <el-form-item v-if="data.type=='疾病'" label="肿瘤/细胞类型:" prop="description" class="marT">
  499. <div-editable v-model="klDiseaseVO.tumorCellType" :Maincontent="'tumorCellType'"></div-editable>
  500. </el-form-item>
  501. <el-form-item v-if="data.type=='疾病'" label="形态学分类代码:" prop="description" class="marT">
  502. <div-editable v-model="klDiseaseVO.morphology" :Maincontent="'morphology'"></div-editable>
  503. </el-form-item>
  504. <el-form-item v-if="data.type=='疾病'" label="英文名称:" prop="description" class="marT">
  505. <div-editable v-model="klDiseaseVO.enName" :Maincontent="'enNamej'"></div-editable>
  506. </el-form-item>
  507. <el-form-item v-if="data.type=='疾病'" label="英文简称:" prop="description" class="marT">
  508. <div-editable v-model="klDiseaseVO.enNameSimple" :Maincontent="'enNameSimple'"></div-editable>
  509. </el-form-item>
  510. <el-form-item v-if="data.type=='疾病'" label="疾病简称:" prop="description" class="marT">
  511. <div-editable v-model="klDiseaseVO.nameSimple" :Maincontent="'nameSimple'"></div-editable>
  512. </el-form-item>
  513. <el-form-item v-if="data.type=='疾病'" label="好发人群:" prop="description" class="marT">
  514. <div-editable v-model="klDiseaseVO.vulCrowd" :Maincontent="'vulCrowd'"></div-editable>
  515. </el-form-item>
  516. <el-form-item v-if="data.type=='疾病'" label="好发地区:" prop="description" class="marT">
  517. <div-editable v-model="klDiseaseVO.vulArea" :Maincontent="'vulArea'"></div-editable>
  518. </el-form-item>
  519. <el-form-item v-if="data.type=='疾病'" label="病程:" prop="description" class="marT">
  520. <div-editable v-model="klDiseaseVO.course" :Maincontent="'course'"></div-editable>
  521. </el-form-item>
  522. <el-form-item v-if="data.type=='疾病'" label="危害性:" prop="description" class="marT">
  523. <div-editable v-model="klDiseaseVO.pernicious" :Maincontent="'pernicious'"></div-editable>
  524. </el-form-item>
  525. <el-form-item v-if="data.type=='疾病'" label="治愈性:" prop="description" class="marT">
  526. <div-editable v-model="klDiseaseVO.healing" :Maincontent="'healing'"></div-editable>
  527. </el-form-item>
  528. <el-form-item v-if="data.type=='疾病'" label="诱因:" prop="description" class="marT">
  529. <div-editable v-model="klDiseaseVO.inducement" :Maincontent="'inducement'"></div-editable>
  530. </el-form-item>
  531. <el-form-item v-if="data.type=='疾病'" label="疾病分型:" prop="description" class="marT">
  532. <el-input
  533. v-model.trim="klDiseaseVO.disType"
  534. maxlength="500"
  535. placeholder="请输入"
  536. row="3"
  537. type="textarea"
  538. ></el-input>
  539. </el-form-item>
  540. <el-form-item v-if="data.type=='疾病'" label="并发症:" prop="description" class="marT">
  541. <el-input
  542. v-model.trim="klDiseaseVO.complication"
  543. maxlength="500"
  544. placeholder="请输入"
  545. row="3"
  546. type="textarea"
  547. ></el-input>
  548. </el-form-item>
  549. <el-form-item v-if="data.type=='疾病'" label="临床分类:" prop="description" class="marT">
  550. <el-input
  551. v-model.trim="klDiseaseVO.clinicType"
  552. maxlength="500"
  553. placeholder="请输入"
  554. row="3"
  555. type="textarea"
  556. ></el-input>
  557. </el-form-item>
  558. <el-form-item v-if="data.type=='疾病'" label="病因:" prop="description" class="marT">
  559. <el-input
  560. v-model.trim="klDiseaseVO.pathogeny"
  561. maxlength="500"
  562. placeholder="请输入"
  563. row="3"
  564. type="textarea"
  565. ></el-input>
  566. </el-form-item>
  567. <el-form-item v-if="data.type=='疾病'" label="危险因素:" prop="description" class="marT">
  568. <el-input
  569. v-model.trim="klDiseaseVO.hazard"
  570. maxlength="500"
  571. placeholder="请输入"
  572. row="3"
  573. type="textarea"
  574. ></el-input>
  575. </el-form-item>
  576. <el-form-item v-if="data.type=='疾病'" label="饮食禁忌:" prop="description" class="marT">
  577. <el-input
  578. v-model.trim="klDiseaseVO.foodProhibition"
  579. maxlength="500"
  580. placeholder="请输入"
  581. row="3"
  582. type="textarea"
  583. ></el-input>
  584. </el-form-item>
  585. <el-form-item
  586. v-if="data.type=='实验室检查套餐' || data.type=='实验室检查子项目'"
  587. label="英文缩写:"
  588. prop="description"
  589. class="marT"
  590. >
  591. <div-editable v-model="klLisVO.enName" :Maincontent="'enName'"></div-editable>
  592. </el-form-item>
  593. <el-form-item
  594. v-if="data.type=='实验室检查套餐' || data.type=='实验室检查子项目'"
  595. label="所属类别:"
  596. prop="description"
  597. class="marT"
  598. >
  599. <div-editable v-model="klLisVO.category" :Maincontent="'category'"></div-editable>
  600. </el-form-item>
  601. <el-form-item
  602. v-if="data.type=='实验室检查套餐' || data.type=='实验室检查子项目'"
  603. label="检查标本:"
  604. prop="description"
  605. class="marT"
  606. >
  607. <div-editable v-model="klLisVO.checkSpecimen" :Maincontent="'checkSpecimen'"></div-editable>
  608. </el-form-item>
  609. <el-form-item
  610. v-if="data.type=='实验室检查套餐' || data.type=='实验室检查子项目'"
  611. label="临床意义:"
  612. prop="description"
  613. class="marT"
  614. >
  615. <el-input
  616. v-model.trim="klLisVO.clinicalSig"
  617. maxlength="200"
  618. placeholder="请输入"
  619. row="3"
  620. type="textarea"
  621. ></el-input>
  622. </el-form-item>
  623. <el-form-item
  624. v-if="data.type=='实验室检查套餐' || data.type=='实验室检查子项目'"
  625. label="影响因素:"
  626. prop="description"
  627. class="marT"
  628. >
  629. <el-input
  630. v-model.trim="klLisVO.influenceFac"
  631. maxlength="200"
  632. placeholder="请输入"
  633. row="3"
  634. type="textarea"
  635. ></el-input>
  636. </el-form-item>
  637. <el-form-item
  638. v-if="data.type=='实验室检查套餐' || data.type=='实验室检查子项目'"
  639. label="检查方法:"
  640. prop="description"
  641. class="marT"
  642. >
  643. <el-input
  644. v-model.trim="klLisVO.checkMethod"
  645. maxlength="200"
  646. placeholder="请输入"
  647. row="3"
  648. type="textarea"
  649. ></el-input>
  650. </el-form-item>
  651. <el-form-item v-if="data.type=='体格检查结果'" label="科室:" prop="description" class="marT">
  652. <searchTerm :refbool.sync="klVitalResultVO.deptList" :type="115"></searchTerm>
  653. </el-form-item>
  654. <el-form-item v-if="data.type=='体格检查结果'" label="部位:" prop="description" class="marT">
  655. <searchTerm :refbool.sync="klVitalResultVO.partList" :type="122"></searchTerm>
  656. </el-form-item>
  657. <el-form-item v-if="data.type=='体格检查结果'" label="不适宜人群:" prop="description" class="marT">
  658. <div-editable v-model="klVitalResultVO.suitablePopNo" :Maincontent="'Maincontent1'"></div-editable>
  659. </el-form-item>
  660. <el-form-item v-if="data.type=='体格检查结果'" label="操作方法:" prop="description" class="marT">
  661. <el-input
  662. v-model.trim="klVitalResultVO.checkMethod"
  663. maxlength="200"
  664. placeholder="请输入"
  665. row="3"
  666. type="textarea"
  667. ></el-input>
  668. </el-form-item>
  669. <el-form-item v-if="data.type=='手术和操作'" label="级别分类:" prop="description" class="marT">
  670. <el-select v-model="klOperationVO.operationLevel" placeholder="请选择">
  671. <el-option
  672. v-for="item in operationLevelList"
  673. :key="item.id"
  674. :label="item.label"
  675. :value="item.id"
  676. ></el-option>
  677. </el-select>
  678. </el-form-item>
  679. <el-form-item v-if="data.type=='手术和操作'" label="手术操作代码:" prop="description" class="marT">
  680. <div-editable v-model="klOperationVO.operationCode" :Maincontent="'Maincontent'"></div-editable>
  681. </el-form-item>
  682. <el-form-item v-if="data.type=='中医疾病'" label="编码:" class="marT is-required">
  683. <el-input
  684. style="width:300px"
  685. v-model.trim="klTcmDiseaseVO.code"
  686. maxlength="200"
  687. placeholder="请输入"
  688. ></el-input>
  689. </el-form-item>
  690. <el-form-item v-if="data.type=='中医证候'" label="编码:" class="marT is-required">
  691. <el-input
  692. style="width:300px"
  693. v-model.trim="klTcmSyndromeVO.code"
  694. maxlength="200"
  695. placeholder="请输入"
  696. ></el-input>
  697. </el-form-item>
  698. <!-- <el-form-item
  699. v-if="data.type=='症状'"
  700. label="填写单患者界面展示通俗内容:"
  701. prop="description"
  702. class="marT description"
  703. >
  704. <span class="necess">*</span>
  705. <el-input v-model.trim="description" maxlength="7" placeholder="请输入填写单患者界面展示通俗内容"></el-input>
  706. </el-form-item>-->
  707. <!-- <el-form-item v-if="data.type=='症状'" label="医学教育说明:" prop="explains" class="marT">
  708. <el-input
  709. type="textarea"
  710. v-model.trim="explains"
  711. maxlength="100"
  712. style="width: 500px;"
  713. :rows="4"
  714. ></el-input>
  715. </el-form-item>-->
  716. </el-form>
  717. </div>
  718. <div class="btn">
  719. <el-button type="primary" :disabled="saveDisable" @click="comfirn">确 定</el-button>
  720. </div>
  721. </div>
  722. </div>
  723. </div>
  724. </template>
  725. <script type="text/javascript">
  726. import DivEditable from './DivEditable';
  727. import searchTerm from './searchTerm';
  728. import api from '@api/knowledgeTree.js';
  729. import pinyin from '../../js/Convert_Pinyin.js';
  730. import utils from '@api/utils.js';
  731. import SimilarListDrag from './SimilarListDrag';
  732. export default {
  733. name: 'AddMedicalName',
  734. data() {
  735. return {
  736. radio: 1,
  737. minTitle: '基础术语维护-添加',
  738. data: {
  739. libName: '',
  740. type: '',
  741. libType: '',
  742. remark: '',
  743. isConcept: 1,
  744. spell: '',
  745. libId: '',
  746. isHasCommon: ''
  747. },
  748. klOperationVO: {
  749. conceptId: null,
  750. remark: null,
  751. operationLevel: 0, //手术级别
  752. operationCode: '' //手术操作码
  753. },
  754. klVitalResultVO: {
  755. conceptId: null,
  756. remark: null,
  757. deptList: [], //科室
  758. partList: [], //部位
  759. suitablePopNo: '', //不适宜人群
  760. checkMethod: '' //操作方法
  761. },
  762. klPacsVO: {
  763. checkMethod: '', //检查方法
  764. definition: '', //项目定义
  765. checkObjective: '', //检查目的
  766. checkSkillful: '', //检查技术
  767. condLimit: '', //禁忌症和局限性
  768. interventional: '', //适应症
  769. emergencySign: 0, //危急标识(0:不危急,1:危急)
  770. checkPrepare: '', //检查前准备
  771. remark: '' //备注
  772. },
  773. klLisVO: {
  774. minValue: null, //最小值
  775. maxValue: null, //最大值
  776. unit: '',
  777. checkSpecimen: '', //检查标本
  778. checkMethod: '', //检查方法
  779. influenceFac: '', //影响因素
  780. clinicalSig: '', //临床意义
  781. qualitative: '', //定性(阴、阳性)
  782. category: '', //所属类别
  783. enName: '', //英文名称
  784. remark: '', //备注
  785. type: 1
  786. },
  787. klSymptomVO: {
  788. isPositive: 1,
  789. enName: '', //英文名称
  790. definition: '', //定义
  791. chWestern: '', //中西医症状(0:通用,1:西,2:中)
  792. mitigatingFac: '', //缓解因素
  793. aggravateFac: '', //加重因素
  794. cause: '', //症状起因
  795. commonDis: '', //常见疾病
  796. preMeasures: '', //预防措施
  797. foodProhibition: '', //饮食禁忌
  798. commonExplain: '', //通俗解释
  799. remark: '', //备注
  800. deptList: [], //科室列表
  801. partList: [], //发病部位
  802. conSymptomList: [], //常见伴随症状
  803. natureList: [] //性质
  804. },
  805. klDiseaseVO: {
  806. icd10Code: '', //ICD10编号
  807. course: '', //病程
  808. inducement: '', //诱因
  809. foodProhibition: '', //饮食禁忌
  810. hazard: '', //危险因素
  811. healing: '', //治愈性
  812. pernicious: '', //危害性
  813. clinicType: '', //临床分类
  814. vulArea: '', //好发地区
  815. vulCrowd: '', //好发人群
  816. incidence: '', //发病率
  817. isInfect: 0, //是否传染(0:否,1:是)
  818. complication: '', //并发症
  819. pathogeny: '', //病因
  820. disType: '', //疾病分型
  821. chWestern: '', //中西医疾病(0:通用,1:西,2:中)
  822. isCommonDis: 1, //是否常见病(0:否,1:是)
  823. isHeredity: 0, //是否遗传(0:否,1:是)
  824. nameSimple: '', //简称
  825. enNameSimple: '', //英文简称
  826. enName: '', //英文名称
  827. remark: '', //备注
  828. tumorCellType: '', //肿瘤细胞类型
  829. morphology: '', //形态学分类代码
  830. deptList: [], //科室列表
  831. partList: [], //部位列表
  832. systemTypeList: [] //疾病系统分类列表
  833. },
  834. klTcmDiseaseVO: {
  835. code: ''
  836. },
  837. klTcmSyndromeVO: {
  838. code: ''
  839. },
  840. operationLevelList: [
  841. {
  842. id: '0',
  843. label: '0'
  844. },
  845. {
  846. id: '1',
  847. label: '1'
  848. },
  849. {
  850. id: '2',
  851. label: '2'
  852. },
  853. {
  854. id: '3',
  855. label: '3'
  856. },
  857. {
  858. id: '4',
  859. label: '4'
  860. }
  861. ],
  862. typeList: [],
  863. id: '',
  864. synonymous: [], //同义词
  865. singleword: [],
  866. allwords: [], //标准词和同义词
  867. colspan: 5,
  868. colspans: 6,
  869. currentPage: 1,
  870. pageSize: 10,
  871. tmpSynonymous: [],
  872. sexType: '通用',
  873. maxAge: 200,
  874. minAge: 0,
  875. maxValue: null,
  876. minValue: null,
  877. showMore: '',
  878. sex: [
  879. {
  880. name: '通用',
  881. value: 3
  882. },
  883. {
  884. name: '男',
  885. value: 1
  886. },
  887. {
  888. name: '女',
  889. value: 2
  890. }
  891. ],
  892. range: [
  893. {
  894. name: '内',
  895. value: 1
  896. },
  897. {
  898. name: '外',
  899. value: 2
  900. }
  901. ],
  902. unfit: false, //点确认时是否弹提示,
  903. saveDisable: false, //保存按钮禁止点击
  904. options: [],
  905. copy: null,
  906. drugTypeList: [
  907. { val: 0, name: '西药' },
  908. { val: 1, name: '中成药' }
  909. ], //药品类型
  910. drug: '',
  911. dioTypeList: [], //更多信息-类型
  912. dioType: '', //默认展示一类
  913. deptList: [], //更多信息-科室
  914. deptListArr: [], //科室信息分组
  915. dept: '', //默认展示全科
  916. similarList: [], //相似词列表
  917. searchIndex: -1, //展示哪个的同义词
  918. searchType: '',
  919. description: '',
  920. explains: '',
  921. composing: false,
  922. critical: '', //危急标识
  923. conceptList: []
  924. };
  925. },
  926. created() {
  927. this.getTypeList();
  928. const id = this.$route.params.id;
  929. const libType = this.$route.params.libType;
  930. const copy = this.$route.params.copy || '';
  931. this.copy = copy;
  932. if (id) {
  933. this.minTitle = copy ? '基础术语维护-复制' : '基础术语维护-修改';
  934. this.id = id;
  935. this.colspan = 5;
  936. this.getDetail(id, libType);
  937. }
  938. },
  939. methods: {
  940. changeRadio() {
  941. this.klLisVO.maxValue = null;
  942. this.klLisVO.minValue = null;
  943. this.klLisVO.qualitative = '';
  944. this.klLisVO.unit = '';
  945. },
  946. //获取科室
  947. searchConcept(val) {
  948. const param = {
  949. excludedConceptIds: [],
  950. libType: '115',
  951. name: val
  952. };
  953. api
  954. .searchConcept(param)
  955. .then(res => {
  956. if (res.data.code == '0') {
  957. const data = res.data.data;
  958. this.conceptList = data;
  959. }
  960. })
  961. .catch(error => {
  962. console.log(error);
  963. });
  964. },
  965. clearDataCi() {
  966. this.data.libType = '';
  967. },
  968. dragAdd(ev) {
  969. utils.dragBox('dragModalWrap', 'dragModalTitle', 'add');
  970. },
  971. dragDel() {
  972. utils.dragBox('dragModalWrap', 'dragModalTitle', 'del');
  973. },
  974. closeTable() {
  975. this.searchType = '';
  976. this.similarList = [];
  977. },
  978. // 诊断类型下--更多信息-类型
  979. getDioType(flag) {
  980. api.getknowledgeList().then(res => {
  981. const data = res.data;
  982. if (data.code == 0) {
  983. this.dioTypeList = data.data[2];
  984. // 修改时无需赋值
  985. if (!flag) {
  986. this.dioType = this.dioTypeList[0].val;
  987. }
  988. }
  989. });
  990. },
  991. // 诊断类型下--更多信息-科室
  992. getDdeptList(conptId) {
  993. api.getDeptList({ type: 1 }).then(res => {
  994. const data = res.data;
  995. if (data.code == 0) {
  996. this.deptList = data.data;
  997. if (!conptId) {
  998. this.dept = '全科'; //默认展示全科
  999. } else {
  1000. // 科室id转成name显示
  1001. this.deptList.map((v, i) => {
  1002. if (v.conceptId == conptId) {
  1003. this.dept = v.name;
  1004. }
  1005. });
  1006. }
  1007. const total = this.deptList.length;
  1008. const average = parseInt(total / 3);
  1009. const mod = total % 3; //余数
  1010. const firstGroup = this.deptList.slice(0, average);
  1011. let secGroup = [];
  1012. let thirdGroup = [];
  1013. let tempArr = [];
  1014. if (mod == 2) {
  1015. secGroup = this.deptList.slice(average, average * 2 + 1);
  1016. thirdGroup = this.deptList.slice(average * 2 + 1, total);
  1017. } else {
  1018. secGroup = this.deptList.slice(average, average * 2);
  1019. thirdGroup = this.deptList.slice(average * 2, total);
  1020. }
  1021. tempArr.push(
  1022. { label: 1, deptList: firstGroup },
  1023. { label: 2, deptList: secGroup },
  1024. { label: 3, deptList: thirdGroup }
  1025. );
  1026. this.deptListArr = tempArr;
  1027. }
  1028. });
  1029. },
  1030. reViewData(data) {
  1031. let tmpObj = [
  1032. {
  1033. isConcept: data.isConcept,
  1034. libName: data.libName,
  1035. remark: data.remark,
  1036. spell: data.spell,
  1037. type: data.typeName,
  1038. conceptId: this.copy ? '' : data.conceptId,
  1039. libId: this.copy ? '' : data.libId,
  1040. isHasCommon: data.isHasCommon,
  1041. synonymName: data.synonymName,
  1042. status: data.status,
  1043. libType: data.libType
  1044. }
  1045. ];
  1046. for (let i = 0; i < data.klConceptSub.length; i++) {
  1047. let tmp = data.klConceptSub[i];
  1048. tmp.name = tmp.synonymName;
  1049. tmp.type = tmp.typeName;
  1050. tmp.libType = tmp.libType;
  1051. }
  1052. data.libName = tmpObj;
  1053. data.otherNames = data.klConceptSub;
  1054. return data;
  1055. },
  1056. getDetail(ids, libType) {
  1057. if (ids) {
  1058. api
  1059. .getBaseConceptAll({ conceptId: ids, libType: libType })
  1060. .then(res => {
  1061. const result = res.data;
  1062. let redata = this.reViewData(result.data);
  1063. if (result.code == 0) {
  1064. this.data = redata.libName[0];
  1065. this.klOperationVO = redata.klOperationDTO
  1066. ? redata.klOperationDTO
  1067. : this.klOperationVO;
  1068. this.klVitalResultVO = redata.klVitalResultDTO
  1069. ? redata.klVitalResultDTO
  1070. : this.klVitalResultVO;
  1071. this.klPacsVO = redata.klPacsDTO
  1072. ? redata.klPacsDTO
  1073. : this.klPacsVO;
  1074. this.klLisVO = redata.klLisDTO ? redata.klLisDTO : this.klLisVO;
  1075. this.klSymptomVO = redata.klSymptomDTO
  1076. ? redata.klSymptomDTO
  1077. : this.klSymptomVO;
  1078. this.klDiseaseVO = redata.klDiseaseDTO
  1079. ? redata.klDiseaseDTO
  1080. : this.klDiseaseVO;
  1081. this.radio =
  1082. this.klLisVO.minValue || this.klLisVO.maxValue ? 1 : 2;
  1083. this.klTcmDiseaseVO = redata.klTcmDiseaseDTO
  1084. ? redata.klTcmDiseaseDTO
  1085. : this.klTcmDiseaseVO;
  1086. this.klTcmSyndromeVO = redata.klTcmSyndromeDTO
  1087. ? redata.klTcmSyndromeDTO
  1088. : this.klTcmSyndromeVO;
  1089. this.singleword = redata.libName;
  1090. this.synonymous = redata.otherNames;
  1091. this.allwords = redata.libName.concat(redata.otherNames);
  1092. this.showMore = redata.isHasCommon; //是否支持通用扩展
  1093. this.maxAge = redata.maxAge;
  1094. this.minAge = redata.minAge;
  1095. this.maxValue = redata.maxVal;
  1096. this.minValue = redata.minVal;
  1097. this.description = redata.description;
  1098. this.explains = redata.explains;
  1099. this.drug = redata.drug;
  1100. const type = redata.type;
  1101. if (type == '诊断') {
  1102. this.dioType = redata.classify || 'Ⅰ'; //类型,默认展示Ⅰ类
  1103. const deptConptId = redata.deptId;
  1104. this.getDioType(true);
  1105. this.getDdeptList(deptConptId);
  1106. }
  1107. // this.sexType = result.data.sexType;
  1108. let sexType = redata.sexType;
  1109. this.sex.map((v, i) => {
  1110. if (v.value == sexType) {
  1111. this.sexType = v.name;
  1112. }
  1113. });
  1114. } else {
  1115. this.$message({
  1116. message: result.msg,
  1117. type: 'warning'
  1118. });
  1119. }
  1120. });
  1121. }
  1122. },
  1123. getTypeList() {
  1124. api
  1125. .baseTypeGetPage({ name: '', size: 1000 })
  1126. .then(res => {
  1127. const data = res.data;
  1128. if (data.code == 0) {
  1129. let types = data.data.records;
  1130. this.typeList = types;
  1131. // this.typeList = data.data;
  1132. // 类型改成平铺
  1133. if (types.length > 0) {
  1134. const total = types.length;
  1135. const average = parseInt(total / 3);
  1136. const mod = total % 3; //余数
  1137. const firstGroup = types.slice(0, average);
  1138. let secGroup = [];
  1139. let thirdGroup = [];
  1140. if (mod == 2) {
  1141. secGroup = types.slice(average, average * 2 + 1);
  1142. thirdGroup = types.slice(average * 2 + 1, total);
  1143. } else {
  1144. secGroup = types.slice(average, average * 2);
  1145. thirdGroup = types.slice(average * 2, total);
  1146. }
  1147. this.options.push(
  1148. { label: 1, options: firstGroup },
  1149. { label: 2, options: secGroup },
  1150. { label: 3, options: thirdGroup }
  1151. );
  1152. }
  1153. } else {
  1154. this.$message({
  1155. message: data.msg,
  1156. type: 'warning'
  1157. });
  1158. }
  1159. })
  1160. .catch(error => {
  1161. console.log(error);
  1162. });
  1163. },
  1164. handleBlur(type, index, flg) {
  1165. // 不能为纯数字、纯字符、纯数字加字符 4-18
  1166. // const pattern = /[^~@#$%^&*_\-+=,,.。::"“??”;;、!!0-9]/g;
  1167. // 需求更改:不能为纯数字,其余均可输入 5-20
  1168. const pattern = /[^0-9]/g;
  1169. if (type == 1) {
  1170. //标准词输入
  1171. if (this.data.libName && !pattern.test(this.data.libName)) {
  1172. this.$message({
  1173. // message:'无法输入纯数字或者纯字符,请输入正确数据!',
  1174. message: '无法输入纯数字,请输入正确数据!',
  1175. type: 'warning'
  1176. });
  1177. // this.data.libName = '';
  1178. this.unfit = true;
  1179. } else {
  1180. let data = this.data;
  1181. data.spell = pinyin.getCamelChars(data.libName);
  1182. this.unfit = false;
  1183. this.searchType = 'standard';
  1184. this.getSimilarList(this.data.libName);
  1185. }
  1186. } else if (type == 2) {
  1187. // 修改时术语名称、拼音和类型均不能修改
  1188. if (flg == 99) {
  1189. // if(this.synonymous[index-1].name && !pattern.test(this.synonymous[index-1].name)){
  1190. if (
  1191. this.allwords[index].libName &&
  1192. !pattern.test(this.allwords[index].libName)
  1193. ) {
  1194. this.$message({
  1195. message: '无法输入纯数字,请输入正确数据!',
  1196. type: 'warning'
  1197. });
  1198. // this.synonymous[index-1].name = '';
  1199. this.unfit = true;
  1200. } else {
  1201. // let current = this.synonymous[index-1];
  1202. let current = this.allwords[index];
  1203. current.spell = pinyin.getCamelChars(current.libName);
  1204. this.unfit = false;
  1205. this.searchType = 'standard';
  1206. this.searchIndex = index;
  1207. this.getSimilarList(this.allwords[index].libName);
  1208. }
  1209. } else {
  1210. if (
  1211. this.synonymous[index].libName &&
  1212. !pattern.test(this.synonymous[index].libName)
  1213. ) {
  1214. this.$message({
  1215. message: '无法输入纯数字,请输入正确数据!',
  1216. type: 'warning'
  1217. });
  1218. // this.synonymous[index].name = '';
  1219. this.unfit = true;
  1220. } else {
  1221. let current = this.synonymous[index];
  1222. current.spell = pinyin.getCamelChars(current.libName);
  1223. this.unfit = false;
  1224. this.searchType = 'similar';
  1225. this.searchIndex = index;
  1226. this.getSimilarList(current.libName);
  1227. }
  1228. }
  1229. }
  1230. },
  1231. handlePinyin(e, flag, index) {
  1232. //只能输入英文
  1233. e.target.value = e.target.value.replace(/[^a-zA-Z]/g, '');
  1234. // 解决输入数字不触发更新
  1235. if (flag == 1) {
  1236. //标准词
  1237. this.data.spell = e.target.value;
  1238. } else if (flag == 2) {
  1239. //同义词-修改
  1240. this.allwords[index].spell = e.target.value;
  1241. } else if (flag == 3) {
  1242. //同义词-新增
  1243. this.synonymous[index].spell = e.target.value;
  1244. }
  1245. // e.target.value = e.target.value.replace(/[^a-zA-Z]/g,'');
  1246. },
  1247. getSimilarList(name) {
  1248. //不知道还有没有用
  1249. return;
  1250. if (!name) {
  1251. this.closeTable();
  1252. return;
  1253. }
  1254. const param = {
  1255. inputStr: name
  1256. };
  1257. api.getSimilarList(param).then(res => {
  1258. this.similarList = res.data.data;
  1259. });
  1260. },
  1261. addSpan(type) {
  1262. let singleSpan = {
  1263. name: '',
  1264. remark: '',
  1265. isConcept: 0,
  1266. isEdit: true,
  1267. spell: null
  1268. };
  1269. if (type == 55) {
  1270. this.allwords.push(singleSpan);
  1271. this.synonymous.push(singleSpan);
  1272. } else {
  1273. this.synonymous.push(singleSpan);
  1274. }
  1275. },
  1276. warning(msg, type) {
  1277. this.$message({
  1278. showClose: true,
  1279. message: msg,
  1280. type: type || 'warning'
  1281. });
  1282. },
  1283. showConfirmDialog(msg, resolve) {
  1284. this.$alert(msg, '提示', {
  1285. confirmButtonText: '确定',
  1286. type: 'warning'
  1287. })
  1288. .then(() => {
  1289. resolve();
  1290. })
  1291. .catch(() => {});
  1292. },
  1293. deleLine(index, type, item) {
  1294. // 只在界面删除数据,待点确认 后参才真正删除
  1295. if (type == 55) {
  1296. const { libId } = item;
  1297. if (libId) {
  1298. api.clearConceptInfo({ libId }).then(res => {
  1299. const result = res.data;
  1300. if (result.code == 0) {
  1301. this.synonymous.splice(index - 1, 1);
  1302. this.allwords.splice(index, 1);
  1303. }
  1304. });
  1305. } else {
  1306. this.synonymous.splice(index - 1, 1);
  1307. this.allwords.splice(index, 1);
  1308. }
  1309. } else {
  1310. this.synonymous.splice(index, 1);
  1311. }
  1312. },
  1313. // 保存基础术语
  1314. comfirn(flg) {
  1315. console.log(this.synonymous);
  1316. if (!this.data.libName) {
  1317. this.warning('请输入医学标准术语名称');
  1318. return;
  1319. }
  1320. if (!this.data.libType && !this.unfit && !this.data.type) {
  1321. this.warning('请选择术语类型');
  1322. return;
  1323. }
  1324. // 年龄为必填项--2019-6-5需求
  1325. if (this.showMore == 1) {
  1326. if ((!this.minAge && this.minAge !== 0) || !this.maxAge) {
  1327. this.warning('年龄不能为空,区间为0-200');
  1328. return;
  1329. }
  1330. if (
  1331. this.minAge < 0 ||
  1332. this.minAge > 200 ||
  1333. this.maxAge < 0 ||
  1334. this.maxAge > 200
  1335. ) {
  1336. this.warning('年龄必须是0-200');
  1337. return;
  1338. }
  1339. if (this.minAge >= this.maxAge) {
  1340. this.warning('年龄最小值应该小于最大值');
  1341. return;
  1342. }
  1343. if (this.data.type == '实验室检查子项目') {
  1344. if (
  1345. this.minValue < 0 ||
  1346. this.minValue > 99999 ||
  1347. this.maxValue < 0 ||
  1348. this.maxValue > 99999
  1349. ) {
  1350. this.warning('取值范围必须是0-99999切单位不能为空');
  1351. return;
  1352. }
  1353. if (
  1354. this.minValue &&
  1355. this.maxValue &&
  1356. this.minValue >= this.maxValue
  1357. ) {
  1358. this.warning('最小值应该小于最大值');
  1359. return;
  1360. }
  1361. }
  1362. }
  1363. if (
  1364. this.data.type == '药品通用名' &&
  1365. (this.drug === '' || this.drug === null)
  1366. ) {
  1367. this.warning('请选择药品类型');
  1368. return;
  1369. }
  1370. if (this.data.type == '中医疾病' || this.data.type == '中医证候') {
  1371. this.warning('请输入编码');
  1372. return;
  1373. }
  1374. // 过滤同义词空数据
  1375. let realData = [];
  1376. if (this.id) {
  1377. //修改用暂存的列表
  1378. realData = this.synonymous.filter(item => {
  1379. return item.libName;
  1380. });
  1381. let tmpArr = [];
  1382. for (let k = 0; k < realData.length; k++) {
  1383. if (realData[k].isConcept == 1) {
  1384. let tmpdata = JSON.parse(JSON.stringify(this.data));
  1385. tmpArr.push(realData[k]);
  1386. realData.splice(k, 1);
  1387. tmpdata.isConcept = 0;
  1388. realData.push(tmpdata);
  1389. this.data = tmpArr[0];
  1390. }
  1391. }
  1392. } else {
  1393. realData = this.synonymous.filter(item => {
  1394. return item.libName;
  1395. });
  1396. }
  1397. let detailList = [];
  1398. for (let i = 0; i < realData.length; i++) {
  1399. let obj = {};
  1400. realData[i].synonymName = realData[i].libName;
  1401. realData[i].conceptId = undefined;
  1402. realData[i].status = undefined;
  1403. realData[i].libType = this.data.libType;
  1404. if (this.copy) {
  1405. realData[i].libId = undefined;
  1406. }
  1407. // obj.isConcept=realData[i].isConcept
  1408. // obj.remark=realData[i].remark
  1409. // obj.spell=realData[i].spell
  1410. detailList.push(realData[i]);
  1411. // detailList.push(obj);
  1412. }
  1413. // 校验是否有名称全为数字
  1414. const pattern = /[^0-9]/g;
  1415. const tmpData = this.data.libName;
  1416. if (tmpData && !tmpData.match(pattern)) {
  1417. this.$message({
  1418. message: '无法输入纯数字,请输入正确数据!',
  1419. type: 'warning'
  1420. });
  1421. return false;
  1422. }
  1423. for (let d = 0; d < detailList.length; d++) {
  1424. let dname = detailList[d].name;
  1425. // if(detailList[d].name && !pattern.test(detailList[d].name)){
  1426. if (dname && !dname.match(pattern)) {
  1427. if (!this.unfit) {
  1428. //避免和失焦事件同事弹出
  1429. this.$message({
  1430. message: '无法输入纯数字,请输入正确数据!',
  1431. type: 'warning'
  1432. });
  1433. }
  1434. this.unfit = false;
  1435. return false;
  1436. break;
  1437. }
  1438. }
  1439. // if (this.data.type == '症状' && !this.description) {
  1440. // this.warning('请输入填写单患者界面展示通俗内容');
  1441. // return;
  1442. // }
  1443. let params,
  1444. sexCode = null;
  1445. this.sex.map((v, i) => {
  1446. if (v.name == this.sexType) {
  1447. sexCode = v.value;
  1448. }
  1449. });
  1450. params =
  1451. this.data.libType == 106
  1452. ? {
  1453. ...this.data,
  1454. klOperationVO: this.klOperationVO,
  1455. klConceptSub: detailList || [],
  1456. sexType: sexCode,
  1457. maxAge: this.maxAge,
  1458. minAge: this.minAge,
  1459. status: this.data.status || 1
  1460. }
  1461. : this.data.libType == 105
  1462. ? {
  1463. ...this.data,
  1464. klVitalResultVO: this.klVitalResultVO,
  1465. klConceptSub: detailList || [],
  1466. sexType: sexCode,
  1467. maxAge: this.maxAge,
  1468. minAge: this.minAge,
  1469. status: this.data.status || 1
  1470. }
  1471. : this.data.libType == 110 || this.data.libType == 109
  1472. ? {
  1473. ...this.data,
  1474. klPacsVO: this.klPacsVO,
  1475. klConceptSub: detailList || [],
  1476. sexType: sexCode,
  1477. maxAge: this.maxAge,
  1478. minAge: this.minAge,
  1479. status: this.data.status || 1
  1480. }
  1481. : this.data.libType == 107
  1482. ? {
  1483. ...this.data,
  1484. klLisVO: this.klLisVO,
  1485. klConceptSub: detailList || [],
  1486. sexType: sexCode,
  1487. maxAge: this.maxAge,
  1488. minAge: this.minAge,
  1489. status: this.data.status || 1
  1490. }
  1491. : this.data.libType == 108
  1492. ? {
  1493. ...this.data,
  1494. klLisVO: this.klLisVO,
  1495. klConceptSub: detailList || [],
  1496. sexType: sexCode,
  1497. maxAge: this.maxAge,
  1498. minAge: this.minAge,
  1499. status: this.data.status || 1
  1500. }
  1501. : this.data.libType == 103
  1502. ? {
  1503. ...this.data,
  1504. klSymptomVO: this.klSymptomVO,
  1505. klConceptSub: detailList || [],
  1506. sexType: sexCode,
  1507. maxAge: this.maxAge,
  1508. minAge: this.minAge,
  1509. status: this.data.status || 1
  1510. }
  1511. : this.data.libType == 100
  1512. ? {
  1513. ...this.data,
  1514. klDiseaseVO: this.klDiseaseVO,
  1515. klConceptSub: detailList || [],
  1516. sexType: sexCode,
  1517. maxAge: this.maxAge,
  1518. minAge: this.minAge,
  1519. status: this.data.status || 1
  1520. }
  1521. : this.data.libType == 127
  1522. ? {
  1523. ...this.data,
  1524. klTcmDiseaseVO: this.klTcmDiseaseVO,
  1525. klConceptSub: detailList || [],
  1526. sexType: sexCode,
  1527. maxAge: this.maxAge,
  1528. minAge: this.minAge,
  1529. status: this.data.status || 1
  1530. }
  1531. : this.data.libType == 128
  1532. ? {
  1533. ...this.data,
  1534. klTcmSyndromeVO: this.klTcmSyndromeVO,
  1535. klConceptSub: detailList || [],
  1536. sexType: sexCode,
  1537. maxAge: this.maxAge,
  1538. minAge: this.minAge,
  1539. status: this.data.status || 1
  1540. }
  1541. : {
  1542. ...this.data,
  1543. klConceptSub: detailList || [],
  1544. status: this.data.status || 1,
  1545. sexType: sexCode,
  1546. maxAge: this.maxAge,
  1547. minAge: this.minAge
  1548. };
  1549. console.log(params);
  1550. // return false
  1551. this.saveDisable = true; //提交保存按钮不可点击,返回结果时才可点击,防止频繁发送请求
  1552. api.saveBaseConceptInfo(params).then(res => {
  1553. const result = res.data;
  1554. if (result.code == 0) {
  1555. this.warning(res.data.msg || '操作成功', 'success');
  1556. //返回带搜索条件的首页
  1557. this.$router.push({
  1558. name: 'BasicTermsMaintenance',
  1559. params: Object.assign({}, this.$route.params, { currentPage: 1 })
  1560. });
  1561. } else {
  1562. this.warning(res.data.msg);
  1563. }
  1564. this.saveDisable = false;
  1565. });
  1566. },
  1567. inputAge() {
  1568. // console.log("输入年龄")
  1569. },
  1570. selectType(e) {
  1571. this.typeList.map((v, i) => {
  1572. if (v.name == e) {
  1573. console.log(v.code);
  1574. this.showMore = v.isHasCommon;
  1575. this.data.libType = v.code;
  1576. this.data.isHasCommon = v.isHasCommon;
  1577. this.conceptList = [];
  1578. }
  1579. });
  1580. if (e == '诊断') {
  1581. this.getDioType();
  1582. this.getDdeptList();
  1583. } else {
  1584. this.dioType = '';
  1585. this.dept = '';
  1586. }
  1587. }
  1588. },
  1589. components: {
  1590. SimilarListDrag,
  1591. DivEditable,
  1592. searchTerm
  1593. }
  1594. };
  1595. </script>
  1596. <style lang="less" scoped>
  1597. @import '../../less/admin.less';
  1598. table,
  1599. tr,
  1600. td {
  1601. list-style: none;
  1602. }
  1603. /deep/ .radioWrap .el-radio {
  1604. display: block;
  1605. height: 41px;
  1606. line-height: 41px;
  1607. text-align: right;
  1608. margin-left: 0;
  1609. }
  1610. /deep/ .moreInfo .el-form-item .el-form-item__label {
  1611. width: 85px;
  1612. text-align: left;
  1613. }
  1614. // 饿了么分组下拉
  1615. .el-scrollbar {
  1616. .el-scrollbar__view {
  1617. display: flex !important;
  1618. max-width: 100% !important;
  1619. .el-select-group__wrap {
  1620. min-width: 160px !important;
  1621. display: inline-block !important;
  1622. vertical-align: top !important;
  1623. }
  1624. }
  1625. }
  1626. .range {
  1627. margin-top: 20px;
  1628. }
  1629. .el-select-group__wrap::after {
  1630. background: #fff !important;
  1631. }
  1632. .displayColor {
  1633. color: #ccc;
  1634. cursor: not-allowed;
  1635. }
  1636. .delete {
  1637. cursor: pointer;
  1638. }
  1639. .content {
  1640. background: #fff;
  1641. padding: 20px 20px 30px;
  1642. color: #545455;
  1643. }
  1644. .titl {
  1645. margin: 25px 0 10px;
  1646. }
  1647. .deptbox {
  1648. // width: 100%;
  1649. background: #fff;
  1650. padding: 20px 10px 30px;
  1651. font-size: 14px;
  1652. text-align: left;
  1653. border-collapse: collapse;
  1654. > tr {
  1655. height: 30px;
  1656. text-align: center;
  1657. td {
  1658. width: 135px;
  1659. border: 1px solid #666;
  1660. padding: 5px;
  1661. position: relative;
  1662. }
  1663. input {
  1664. border: none;
  1665. border: 1px solid #ccc;
  1666. width: 100%;
  1667. height: 30px;
  1668. padding: 0 7px;
  1669. box-sizing: border-box;
  1670. border-radius: 4px;
  1671. }
  1672. .ind {
  1673. width: 55px;
  1674. }
  1675. .desc {
  1676. width: 280px;
  1677. }
  1678. .descs {
  1679. width: 50px;
  1680. }
  1681. }
  1682. .addSpan {
  1683. text-align: center;
  1684. cursor: pointer;
  1685. }
  1686. }
  1687. .deptboxTable {
  1688. width: 100%;
  1689. }
  1690. .deptboxChange {
  1691. padding-right: 210px;
  1692. position: relative;
  1693. }
  1694. .actionDo {
  1695. width: 200px;
  1696. position: absolute;
  1697. top: 1px;
  1698. right: 0;
  1699. .btnWrap {
  1700. height: 30px;
  1701. }
  1702. }
  1703. .btn {
  1704. text-align: right;
  1705. margin-top: 20px;
  1706. margin-bottom: 20px;
  1707. }
  1708. .necess {
  1709. display: inline-block;
  1710. vertical-align: middle;
  1711. color: red;
  1712. margin-left: 2px;
  1713. }
  1714. .moreInfo {
  1715. border-top: 1px solid #c0c4cc;
  1716. margin-top: 45px;
  1717. p {
  1718. margin: 15px 0;
  1719. }
  1720. }
  1721. .spell {
  1722. text-align: center;
  1723. }
  1724. /deep/.ages {
  1725. margin-top: 20px;
  1726. position: relative;
  1727. .el-input {
  1728. display: inline-block;
  1729. width: auto;
  1730. .el-input__inner {
  1731. width: 80px;
  1732. padding: 0 5px;
  1733. text-align: center;
  1734. }
  1735. .el-input__inner::-webkit-outer-spin-button,
  1736. .el-input__inner::-webkit-inner-spin-button {
  1737. -webkit-appearance: none;
  1738. }
  1739. .el-input__inner[type='number'] {
  1740. -moz-appearance: textfield;
  1741. }
  1742. }
  1743. .ageLine {
  1744. display: inline-block;
  1745. margin: 0 35px;
  1746. }
  1747. .inp {
  1748. margin-left: 20px;
  1749. }
  1750. }
  1751. /deep/ .marT {
  1752. margin-top: 20px;
  1753. }
  1754. /deep/.description {
  1755. position: relative;
  1756. .necess {
  1757. position: absolute;
  1758. left: -158px;
  1759. z-index: 2;
  1760. }
  1761. .el-input__inner {
  1762. width: 200px;
  1763. height: 40px;
  1764. line-height: 40px;
  1765. // text-align: center;
  1766. }
  1767. }
  1768. </style>