AddTerm.vue 60 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738
  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.name&&item.name.length>9?item.name:''">
  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.name&&item.name.length>9?item.name:''">
  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.name"
  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
  683. v-if="data.type=='中医疾病' || data.type=='中医证候'"
  684. label="编码:"
  685. class="marT is-required"
  686. >
  687. <div-editable v-model="klOperationVO.operationCode" :Maincontent="'Maincontent'"></div-editable>
  688. </el-form-item>
  689. <!-- <el-form-item
  690. v-if="data.type=='症状'"
  691. label="填写单患者界面展示通俗内容:"
  692. prop="description"
  693. class="marT description"
  694. >
  695. <span class="necess">*</span>
  696. <el-input v-model.trim="description" maxlength="7" placeholder="请输入填写单患者界面展示通俗内容"></el-input>
  697. </el-form-item>-->
  698. <!-- <el-form-item v-if="data.type=='症状'" label="医学教育说明:" prop="explains" class="marT">
  699. <el-input
  700. type="textarea"
  701. v-model.trim="explains"
  702. maxlength="100"
  703. style="width: 500px;"
  704. :rows="4"
  705. ></el-input>
  706. </el-form-item>-->
  707. </el-form>
  708. </div>
  709. <div class="btn">
  710. <el-button type="primary" :disabled="saveDisable" @click="comfirn">确 定</el-button>
  711. </div>
  712. </div>
  713. </div>
  714. </div>
  715. </template>
  716. <script type="text/javascript">
  717. import DivEditable from './DivEditable';
  718. import searchTerm from './searchTerm';
  719. import api from '@api/knowledgeTree.js';
  720. import pinyin from '../../js/Convert_Pinyin.js';
  721. import utils from '@api/utils.js';
  722. import SimilarListDrag from './SimilarListDrag';
  723. export default {
  724. name: 'AddMedicalName',
  725. data() {
  726. return {
  727. radio: 1,
  728. minTitle: '基础术语维护-添加',
  729. data: {
  730. libName: '',
  731. type: '',
  732. libType: '',
  733. remark: '',
  734. isConcept: 1,
  735. spell: '',
  736. libId: '',
  737. isHasCommon: ''
  738. },
  739. klOperationVO: {
  740. conceptId: null,
  741. remark: null,
  742. operationLevel: 0, //手术级别
  743. operationCode: '' //手术操作码
  744. },
  745. klVitalResultVO: {
  746. conceptId: null,
  747. remark: null,
  748. deptList: [], //科室
  749. partList: [], //部位
  750. suitablePopNo: '', //不适宜人群
  751. checkMethod: '' //操作方法
  752. },
  753. klPacsVO: {
  754. checkMethod: '', //检查方法
  755. definition: '', //项目定义
  756. checkObjective: '', //检查目的
  757. checkSkillful: '', //检查技术
  758. condLimit: '', //禁忌症和局限性
  759. interventional: '', //适应症
  760. emergencySign: 0, //危急标识(0:不危急,1:危急)
  761. checkPrepare: '', //检查前准备
  762. remark: '' //备注
  763. },
  764. klLisVO: {
  765. minValue: null, //最小值
  766. maxValue: null, //最大值
  767. unit: '',
  768. checkSpecimen: '', //检查标本
  769. checkMethod: '', //检查方法
  770. influenceFac: '', //影响因素
  771. clinicalSig: '', //临床意义
  772. qualitative: '', //定性(阴、阳性)
  773. category: '', //所属类别
  774. enName: '', //英文名称
  775. remark: '', //备注
  776. type: 1
  777. },
  778. klSymptomVO: {
  779. isPositive: 1,
  780. enName: '', //英文名称
  781. definition: '', //定义
  782. chWestern: '', //中西医症状(0:通用,1:西,2:中)
  783. mitigatingFac: '', //缓解因素
  784. aggravateFac: '', //加重因素
  785. cause: '', //症状起因
  786. commonDis: '', //常见疾病
  787. preMeasures: '', //预防措施
  788. foodProhibition: '', //饮食禁忌
  789. commonExplain: '', //通俗解释
  790. remark: '', //备注
  791. deptList: [], //科室列表
  792. partList: [], //发病部位
  793. conSymptomList: [], //常见伴随症状
  794. natureList: [] //性质
  795. },
  796. klDiseaseVO: {
  797. icd10Code: '', //ICD10编号
  798. course: '', //病程
  799. inducement: '', //诱因
  800. foodProhibition: '', //饮食禁忌
  801. hazard: '', //危险因素
  802. healing: '', //治愈性
  803. pernicious: '', //危害性
  804. clinicType: '', //临床分类
  805. vulArea: '', //好发地区
  806. vulCrowd: '', //好发人群
  807. incidence: '', //发病率
  808. isInfect: 0, //是否传染(0:否,1:是)
  809. complication: '', //并发症
  810. pathogeny: '', //病因
  811. disType: '', //疾病分型
  812. chWestern: '', //中西医疾病(0:通用,1:西,2:中)
  813. isCommonDis: 1, //是否常见病(0:否,1:是)
  814. isHeredity: 0, //是否遗传(0:否,1:是)
  815. nameSimple: '', //简称
  816. enNameSimple: '', //英文简称
  817. enName: '', //英文名称
  818. remark: '', //备注
  819. tumorCellType: '', //肿瘤细胞类型
  820. morphology: '', //形态学分类代码
  821. deptList: [], //科室列表
  822. partList: [], //部位列表
  823. systemTypeList: [] //疾病系统分类列表
  824. },
  825. operationLevelList: [
  826. {
  827. id: '0',
  828. label: '0'
  829. },
  830. {
  831. id: '1',
  832. label: '1'
  833. },
  834. {
  835. id: '2',
  836. label: '2'
  837. },
  838. {
  839. id: '3',
  840. label: '3'
  841. },
  842. {
  843. id: '4',
  844. label: '4'
  845. }
  846. ],
  847. typeList: [],
  848. id: '',
  849. synonymous: [], //同义词
  850. singleword: [],
  851. allwords: [], //标准词和同义词
  852. colspan: 5,
  853. colspans: 6,
  854. currentPage: 1,
  855. pageSize: 10,
  856. tmpSynonymous: [],
  857. sexType: '通用',
  858. maxAge: 200,
  859. minAge: 0,
  860. maxValue: null,
  861. minValue: null,
  862. showMore: '',
  863. sex: [
  864. {
  865. name: '通用',
  866. value: 3
  867. },
  868. {
  869. name: '男',
  870. value: 1
  871. },
  872. {
  873. name: '女',
  874. value: 2
  875. }
  876. ],
  877. range: [
  878. {
  879. name: '内',
  880. value: 1
  881. },
  882. {
  883. name: '外',
  884. value: 2
  885. }
  886. ],
  887. unfit: false, //点确认时是否弹提示,
  888. saveDisable: false, //保存按钮禁止点击
  889. options: [],
  890. copy: null,
  891. drugTypeList: [
  892. { val: 0, name: '西药' },
  893. { val: 1, name: '中成药' }
  894. ], //药品类型
  895. drug: '',
  896. dioTypeList: [], //更多信息-类型
  897. dioType: '', //默认展示一类
  898. deptList: [], //更多信息-科室
  899. deptListArr: [], //科室信息分组
  900. dept: '', //默认展示全科
  901. similarList: [], //相似词列表
  902. searchIndex: -1, //展示哪个的同义词
  903. searchType: '',
  904. description: '',
  905. explains: '',
  906. composing: false,
  907. critical: '', //危急标识
  908. conceptList: []
  909. };
  910. },
  911. created() {
  912. this.getTypeList();
  913. const id = this.$route.params.id;
  914. const libType = this.$route.params.libType;
  915. const copy = this.$route.params.copy || '';
  916. this.copy = copy;
  917. if (id) {
  918. this.minTitle = copy ? '基础术语维护-复制' : '基础术语维护-修改';
  919. this.id = id;
  920. this.colspan = 5;
  921. this.getDetail(id, libType);
  922. }
  923. },
  924. methods: {
  925. changeRadio() {
  926. this.klLisVO.maxValue = null;
  927. this.klLisVO.minValue = null;
  928. this.klLisVO.qualitative = '';
  929. this.klLisVO.unit = '';
  930. },
  931. //获取科室
  932. searchConcept(val) {
  933. const param = {
  934. excludedConceptIds: [],
  935. libType: '115',
  936. name: val
  937. };
  938. api
  939. .searchConcept(param)
  940. .then(res => {
  941. if (res.data.code == '0') {
  942. const data = res.data.data;
  943. this.conceptList = data;
  944. }
  945. })
  946. .catch(error => {
  947. console.log(error);
  948. });
  949. },
  950. clearDataCi() {
  951. this.data.libType = '';
  952. },
  953. dragAdd(ev) {
  954. utils.dragBox('dragModalWrap', 'dragModalTitle', 'add');
  955. },
  956. dragDel() {
  957. utils.dragBox('dragModalWrap', 'dragModalTitle', 'del');
  958. },
  959. closeTable() {
  960. this.searchType = '';
  961. this.similarList = [];
  962. },
  963. // 诊断类型下--更多信息-类型
  964. getDioType(flag) {
  965. api.getknowledgeList().then(res => {
  966. const data = res.data;
  967. if (data.code == 0) {
  968. this.dioTypeList = data.data[2];
  969. // 修改时无需赋值
  970. if (!flag) {
  971. this.dioType = this.dioTypeList[0].val;
  972. }
  973. }
  974. });
  975. },
  976. // 诊断类型下--更多信息-科室
  977. getDdeptList(conptId) {
  978. api.getDeptList({ type: 1 }).then(res => {
  979. const data = res.data;
  980. if (data.code == 0) {
  981. this.deptList = data.data;
  982. if (!conptId) {
  983. this.dept = '全科'; //默认展示全科
  984. } else {
  985. // 科室id转成name显示
  986. this.deptList.map((v, i) => {
  987. if (v.conceptId == conptId) {
  988. this.dept = v.name;
  989. }
  990. });
  991. }
  992. const total = this.deptList.length;
  993. const average = parseInt(total / 3);
  994. const mod = total % 3; //余数
  995. const firstGroup = this.deptList.slice(0, average);
  996. let secGroup = [];
  997. let thirdGroup = [];
  998. let tempArr = [];
  999. if (mod == 2) {
  1000. secGroup = this.deptList.slice(average, average * 2 + 1);
  1001. thirdGroup = this.deptList.slice(average * 2 + 1, total);
  1002. } else {
  1003. secGroup = this.deptList.slice(average, average * 2);
  1004. thirdGroup = this.deptList.slice(average * 2, total);
  1005. }
  1006. tempArr.push(
  1007. { label: 1, deptList: firstGroup },
  1008. { label: 2, deptList: secGroup },
  1009. { label: 3, deptList: thirdGroup }
  1010. );
  1011. this.deptListArr = tempArr;
  1012. }
  1013. });
  1014. },
  1015. reViewData(data) {
  1016. let tmpObj = [
  1017. {
  1018. isConcept: data.isConcept,
  1019. libName: data.libName,
  1020. remark: data.remark,
  1021. spell: data.spell,
  1022. type: data.typeName,
  1023. conceptId:this.copy? '' : data.conceptId,
  1024. libId: this.copy ? '' : data.libId,
  1025. isHasCommon: data.isHasCommon,
  1026. synonymName: data.synonymName,
  1027. status: data.status,
  1028. libType: data.libType
  1029. }
  1030. ];
  1031. for (let i = 0; i < data.klConceptSub.length; i++) {
  1032. let tmp = data.klConceptSub[i];
  1033. tmp.name = tmp.synonymName;
  1034. tmp.type = tmp.typeName;
  1035. tmp.libType = tmp.libType;
  1036. }
  1037. data.libName = tmpObj;
  1038. data.otherNames = data.klConceptSub;
  1039. return data;
  1040. },
  1041. getDetail(ids, libType) {
  1042. if (ids) {
  1043. api
  1044. .getBaseConceptAll({ conceptId: ids, libType: libType })
  1045. .then(res => {
  1046. const result = res.data;
  1047. let redata = this.reViewData(result.data);
  1048. if (result.code == 0) {
  1049. this.data = redata.libName[0];
  1050. this.klOperationVO = redata.klOperationDTO
  1051. ? redata.klOperationDTO
  1052. : this.klOperationVO;
  1053. this.klVitalResultVO = redata.klVitalResultDTO
  1054. ? redata.klVitalResultDTO
  1055. : this.klVitalResultVO;
  1056. this.klPacsVO = redata.klPacsDTO
  1057. ? redata.klPacsDTO
  1058. : this.klPacsVO;
  1059. this.klLisVO = redata.klLisDTO ? redata.klLisDTO : this.klLisVO;
  1060. this.klSymptomVO = redata.klSymptomDTO
  1061. ? redata.klSymptomDTO
  1062. : this.klSymptomVO;
  1063. this.klDiseaseVO = redata.klDiseaseDTO
  1064. ? redata.klDiseaseDTO
  1065. : this.klDiseaseVO;
  1066. this.radio =
  1067. this.klLisVO.minValue || this.klLisVO.maxValue ? 1 : 2;
  1068. this.singleword = redata.libName;
  1069. this.synonymous = redata.otherNames;
  1070. this.allwords = redata.libName.concat(redata.otherNames);
  1071. this.showMore = redata.isHasCommon; //是否支持通用扩展
  1072. this.maxAge = redata.maxAge;
  1073. this.minAge = redata.minAge;
  1074. this.maxValue = redata.maxVal;
  1075. this.minValue = redata.minVal;
  1076. this.description = redata.description;
  1077. this.explains = redata.explains;
  1078. this.drug = redata.drug;
  1079. const type = redata.type;
  1080. if (type == '诊断') {
  1081. this.dioType = redata.classify || 'Ⅰ'; //类型,默认展示Ⅰ类
  1082. const deptConptId = redata.deptId;
  1083. this.getDioType(true);
  1084. this.getDdeptList(deptConptId);
  1085. }
  1086. // this.sexType = result.data.sexType;
  1087. let sexType = redata.sexType;
  1088. this.sex.map((v, i) => {
  1089. if (v.value == sexType) {
  1090. this.sexType = v.name;
  1091. }
  1092. });
  1093. } else {
  1094. this.$message({
  1095. message: result.msg,
  1096. type: 'warning'
  1097. });
  1098. }
  1099. });
  1100. }
  1101. },
  1102. getTypeList() {
  1103. api
  1104. .baseTypeGetPage({ name: '', size: 1000 })
  1105. .then(res => {
  1106. const data = res.data;
  1107. if (data.code == 0) {
  1108. let types = data.data.records;
  1109. this.typeList = types;
  1110. // this.typeList = data.data;
  1111. // 类型改成平铺
  1112. if (types.length > 0) {
  1113. const total = types.length;
  1114. const average = parseInt(total / 3);
  1115. const mod = total % 3; //余数
  1116. const firstGroup = types.slice(0, average);
  1117. let secGroup = [];
  1118. let thirdGroup = [];
  1119. if (mod == 2) {
  1120. secGroup = types.slice(average, average * 2 + 1);
  1121. thirdGroup = types.slice(average * 2 + 1, total);
  1122. } else {
  1123. secGroup = types.slice(average, average * 2);
  1124. thirdGroup = types.slice(average * 2, total);
  1125. }
  1126. this.options.push(
  1127. { label: 1, options: firstGroup },
  1128. { label: 2, options: secGroup },
  1129. { label: 3, options: thirdGroup }
  1130. );
  1131. }
  1132. } else {
  1133. this.$message({
  1134. message: data.msg,
  1135. type: 'warning'
  1136. });
  1137. }
  1138. })
  1139. .catch(error => {
  1140. console.log(error);
  1141. });
  1142. },
  1143. handleBlur(type, index, flg) {
  1144. // 不能为纯数字、纯字符、纯数字加字符 4-18
  1145. // const pattern = /[^~@#$%^&*_\-+=,,.。::"“??”;;、!!0-9]/g;
  1146. // 需求更改:不能为纯数字,其余均可输入 5-20
  1147. const pattern = /[^0-9]/g;
  1148. if (type == 1) {
  1149. //标准词输入
  1150. if (this.data.libName && !pattern.test(this.data.libName)) {
  1151. this.$message({
  1152. // message:'无法输入纯数字或者纯字符,请输入正确数据!',
  1153. message: '无法输入纯数字,请输入正确数据!',
  1154. type: 'warning'
  1155. });
  1156. // this.data.libName = '';
  1157. this.unfit = true;
  1158. } else {
  1159. let data = this.data;
  1160. data.spell = pinyin.getCamelChars(data.libName);
  1161. this.unfit = false;
  1162. this.searchType = 'standard';
  1163. this.getSimilarList(this.data.libName);
  1164. }
  1165. } else if (type == 2) {
  1166. // 修改时术语名称、拼音和类型均不能修改
  1167. if (flg == 99) {
  1168. // if(this.synonymous[index-1].name && !pattern.test(this.synonymous[index-1].name)){
  1169. if (
  1170. this.allwords[index].name &&
  1171. !pattern.test(this.allwords[index].name)
  1172. ) {
  1173. this.$message({
  1174. message: '无法输入纯数字,请输入正确数据!',
  1175. type: 'warning'
  1176. });
  1177. // this.synonymous[index-1].name = '';
  1178. this.unfit = true;
  1179. } else {
  1180. // let current = this.synonymous[index-1];
  1181. let current = this.allwords[index];
  1182. current.spell = pinyin.getCamelChars(current.name);
  1183. this.unfit = false;
  1184. this.searchType = 'standard';
  1185. this.searchIndex = index;
  1186. this.getSimilarList(this.allwords[index].name);
  1187. }
  1188. } else {
  1189. if (
  1190. this.synonymous[index].name &&
  1191. !pattern.test(this.synonymous[index].name)
  1192. ) {
  1193. this.$message({
  1194. message: '无法输入纯数字,请输入正确数据!',
  1195. type: 'warning'
  1196. });
  1197. // this.synonymous[index].name = '';
  1198. this.unfit = true;
  1199. } else {
  1200. let current = this.synonymous[index];
  1201. current.spell = pinyin.getCamelChars(current.name);
  1202. this.unfit = false;
  1203. this.searchType = 'similar';
  1204. this.searchIndex = index;
  1205. this.getSimilarList(current.name);
  1206. }
  1207. }
  1208. }
  1209. },
  1210. handlePinyin(e, flag, index) {
  1211. //只能输入英文
  1212. e.target.value = e.target.value.replace(/[^a-zA-Z]/g, '');
  1213. // 解决输入数字不触发更新
  1214. if (flag == 1) {
  1215. //标准词
  1216. this.data.spell = e.target.value;
  1217. } else if (flag == 2) {
  1218. //同义词-修改
  1219. this.allwords[index].spell = e.target.value;
  1220. } else if (flag == 3) {
  1221. //同义词-新增
  1222. this.synonymous[index].spell = e.target.value;
  1223. }
  1224. // e.target.value = e.target.value.replace(/[^a-zA-Z]/g,'');
  1225. },
  1226. getSimilarList(name) {
  1227. //不知道还有没有用
  1228. return;
  1229. if (!name) {
  1230. this.closeTable();
  1231. return;
  1232. }
  1233. const param = {
  1234. inputStr: name
  1235. };
  1236. api.getSimilarList(param).then(res => {
  1237. this.similarList = res.data.data;
  1238. });
  1239. },
  1240. addSpan(type) {
  1241. let singleSpan = {
  1242. name: '',
  1243. remark: '',
  1244. isConcept: 0,
  1245. isEdit: true,
  1246. spell: null
  1247. };
  1248. if (type == 55) {
  1249. this.allwords.push(singleSpan);
  1250. this.synonymous.push(singleSpan);
  1251. } else {
  1252. this.synonymous.push(singleSpan);
  1253. }
  1254. },
  1255. warning(msg, type) {
  1256. this.$message({
  1257. showClose: true,
  1258. message: msg,
  1259. type: type || 'warning'
  1260. });
  1261. },
  1262. showConfirmDialog(msg, resolve) {
  1263. this.$alert(msg, '提示', {
  1264. confirmButtonText: '确定',
  1265. type: 'warning'
  1266. })
  1267. .then(() => {
  1268. resolve();
  1269. })
  1270. .catch(() => {});
  1271. },
  1272. deleLine(index, type, item) {
  1273. // 只在界面删除数据,待点确认 后参才真正删除
  1274. if (type == 55) {
  1275. const { libId } = item;
  1276. if (libId) {
  1277. api.clearConceptInfo({ libId }).then(res => {
  1278. const result = res.data;
  1279. if (result.code == 0) {
  1280. this.synonymous.splice(index - 1, 1);
  1281. this.allwords.splice(index, 1);
  1282. }
  1283. });
  1284. } else {
  1285. this.synonymous.splice(index - 1, 1);
  1286. this.allwords.splice(index, 1);
  1287. }
  1288. } else {
  1289. this.synonymous.splice(index, 1);
  1290. }
  1291. },
  1292. // 保存基础术语
  1293. comfirn(flg) {
  1294. if (!this.data.libName) {
  1295. this.warning('请输入医学标准术语名称');
  1296. return;
  1297. }
  1298. if (!this.data.libType && !this.unfit && !this.data.type) {
  1299. this.warning('请选择术语类型');
  1300. return;
  1301. }
  1302. // 年龄为必填项--2019-6-5需求
  1303. if (this.showMore == 1) {
  1304. if ((!this.minAge && this.minAge !== 0) || !this.maxAge) {
  1305. this.warning('年龄不能为空,区间为0-200');
  1306. return;
  1307. }
  1308. if (
  1309. this.minAge < 0 ||
  1310. this.minAge > 200 ||
  1311. this.maxAge < 0 ||
  1312. this.maxAge > 200
  1313. ) {
  1314. this.warning('年龄必须是0-200');
  1315. return;
  1316. }
  1317. if (this.minAge >= this.maxAge) {
  1318. this.warning('年龄最小值应该小于最大值');
  1319. return;
  1320. }
  1321. if (this.data.type == '实验室检查子项目') {
  1322. if (
  1323. this.minValue < 0 ||
  1324. this.minValue > 99999 ||
  1325. this.maxValue < 0 ||
  1326. this.maxValue > 99999
  1327. ) {
  1328. this.warning('取值范围必须是0-99999切单位不能为空');
  1329. return;
  1330. }
  1331. if (
  1332. this.minValue &&
  1333. this.maxValue &&
  1334. this.minValue >= this.maxValue
  1335. ) {
  1336. this.warning('最小值应该小于最大值');
  1337. return;
  1338. }
  1339. }
  1340. }
  1341. if (
  1342. this.data.type == '药品通用名' &&
  1343. (this.drug === '' || this.drug === null)
  1344. ) {
  1345. this.warning('请选择药品类型');
  1346. return;
  1347. }
  1348. // 过滤同义词空数据
  1349. let realData = [];
  1350. if (this.id) {
  1351. //修改用暂存的列表
  1352. realData = this.synonymous.filter(item => {
  1353. return item.name;
  1354. });
  1355. let tmpArr = [];
  1356. for (let k = 0; k < realData.length; k++) {
  1357. if (realData[k].isConcept == 1) {
  1358. let tmpdata = JSON.parse(JSON.stringify(this.data));
  1359. tmpArr.push(realData[k]);
  1360. realData.splice(k, 1);
  1361. tmpdata.isConcept = 0;
  1362. realData.push(tmpdata);
  1363. this.data = tmpArr[0];
  1364. }
  1365. }
  1366. } else {
  1367. realData = this.synonymous.filter(item => {
  1368. return item.name;
  1369. });
  1370. }
  1371. let detailList = [];
  1372. for (let i = 0; i < realData.length; i++) {
  1373. let obj = {};
  1374. realData[i].synonymName = realData[i].name;
  1375. realData[i].conceptId = undefined;
  1376. realData[i].status = undefined;
  1377. realData[i].libType = this.data.libType;
  1378. if (this.copy) {
  1379. realData[i].libId = undefined;
  1380. }
  1381. // obj.isConcept=realData[i].isConcept
  1382. // obj.remark=realData[i].remark
  1383. // obj.spell=realData[i].spell
  1384. detailList.push(realData[i]);
  1385. // detailList.push(obj);
  1386. }
  1387. // 校验是否有名称全为数字
  1388. const pattern = /[^0-9]/g;
  1389. const tmpData = this.data.libName;
  1390. if (tmpData && !tmpData.match(pattern)) {
  1391. this.$message({
  1392. message: '无法输入纯数字,请输入正确数据!',
  1393. type: 'warning'
  1394. });
  1395. return false;
  1396. }
  1397. for (let d = 0; d < detailList.length; d++) {
  1398. let dname = detailList[d].name;
  1399. // if(detailList[d].name && !pattern.test(detailList[d].name)){
  1400. if (dname && !dname.match(pattern)) {
  1401. if (!this.unfit) {
  1402. //避免和失焦事件同事弹出
  1403. this.$message({
  1404. message: '无法输入纯数字,请输入正确数据!',
  1405. type: 'warning'
  1406. });
  1407. }
  1408. this.unfit = false;
  1409. return false;
  1410. break;
  1411. }
  1412. }
  1413. // if (this.data.type == '症状' && !this.description) {
  1414. // this.warning('请输入填写单患者界面展示通俗内容');
  1415. // return;
  1416. // }
  1417. let params,
  1418. sexCode = null;
  1419. this.sex.map((v, i) => {
  1420. if (v.name == this.sexType) {
  1421. sexCode = v.value;
  1422. }
  1423. });
  1424. params =
  1425. this.data.libType == 106
  1426. ? {
  1427. ...this.data,
  1428. klOperationVO: this.klOperationVO,
  1429. klConceptSub: detailList || [],
  1430. sexType: sexCode,
  1431. maxAge: this.maxAge,
  1432. minAge: this.minAge,
  1433. status: this.data.status || 1
  1434. }
  1435. : this.data.libType == 105
  1436. ? {
  1437. ...this.data,
  1438. klVitalResultVO: this.klVitalResultVO,
  1439. klConceptSub: detailList || [],
  1440. sexType: sexCode,
  1441. maxAge: this.maxAge,
  1442. minAge: this.minAge,
  1443. status: this.data.status || 1
  1444. }
  1445. : this.data.libType == 110 || this.data.libType == 109
  1446. ? {
  1447. ...this.data,
  1448. klPacsVO: this.klPacsVO,
  1449. klConceptSub: detailList || [],
  1450. sexType: sexCode,
  1451. maxAge: this.maxAge,
  1452. minAge: this.minAge,
  1453. status: this.data.status || 1
  1454. }
  1455. : this.data.libType == 107
  1456. ? {
  1457. ...this.data,
  1458. klLisVO: this.klLisVO,
  1459. klConceptSub: detailList || [],
  1460. sexType: sexCode,
  1461. maxAge: this.maxAge,
  1462. minAge: this.minAge,
  1463. status: this.data.status || 1
  1464. }
  1465. : this.data.libType == 108
  1466. ? {
  1467. ...this.data,
  1468. klLisVO: this.klLisVO,
  1469. klConceptSub: detailList || [],
  1470. sexType: sexCode,
  1471. maxAge: this.maxAge,
  1472. minAge: this.minAge,
  1473. status: this.data.status || 1
  1474. }
  1475. : this.data.libType == 103
  1476. ? {
  1477. ...this.data,
  1478. klSymptomVO: this.klSymptomVO,
  1479. klConceptSub: detailList || [],
  1480. sexType: sexCode,
  1481. maxAge: this.maxAge,
  1482. minAge: this.minAge,
  1483. status: this.data.status || 1
  1484. }
  1485. : this.data.libType == 100
  1486. ? {
  1487. ...this.data,
  1488. klDiseaseVO: this.klDiseaseVO,
  1489. klConceptSub: detailList || [],
  1490. sexType: sexCode,
  1491. maxAge: this.maxAge,
  1492. minAge: this.minAge,
  1493. status: this.data.status || 1
  1494. }
  1495. : this.data.libType == 127 || this.data.libType == 128
  1496. ? {
  1497. ...this.data,
  1498. klConceptSub: detailList || [],
  1499. sexType: sexCode,
  1500. maxAge: this.maxAge,
  1501. minAge: this.minAge,
  1502. status: this.data.status || 1
  1503. }
  1504. : {
  1505. ...this.data,
  1506. klConceptSub: detailList || [],
  1507. status: this.data.status || 1,
  1508. sexType: sexCode,
  1509. maxAge: this.maxAge,
  1510. minAge: this.minAge
  1511. };
  1512. console.log(params);
  1513. // return false
  1514. this.saveDisable = true; //提交保存按钮不可点击,返回结果时才可点击,防止频繁发送请求
  1515. api.saveBaseConceptInfo(params).then(res => {
  1516. const result = res.data;
  1517. if (result.code == 0) {
  1518. this.warning(res.data.msg || '操作成功', 'success');
  1519. //返回带搜索条件的首页
  1520. this.$router.push({
  1521. name: 'BasicTermsMaintenance',
  1522. params: Object.assign({}, this.$route.params, { currentPage: 1 })
  1523. });
  1524. } else {
  1525. this.warning(res.data.msg);
  1526. }
  1527. this.saveDisable = false;
  1528. });
  1529. },
  1530. inputAge() {
  1531. // console.log("输入年龄")
  1532. },
  1533. selectType(e) {
  1534. this.typeList.map((v, i) => {
  1535. if (v.name == e) {
  1536. console.log(v.code);
  1537. this.showMore = v.isHasCommon;
  1538. this.data.libType = v.code;
  1539. this.data.isHasCommon = v.isHasCommon;
  1540. this.conceptList = [];
  1541. }
  1542. });
  1543. if (e == '诊断') {
  1544. this.getDioType();
  1545. this.getDdeptList();
  1546. } else {
  1547. this.dioType = '';
  1548. this.dept = '';
  1549. }
  1550. }
  1551. },
  1552. components: {
  1553. SimilarListDrag,
  1554. DivEditable,
  1555. searchTerm
  1556. }
  1557. };
  1558. </script>
  1559. <style lang="less" scoped>
  1560. @import '../../less/admin.less';
  1561. table,
  1562. tr,
  1563. td {
  1564. list-style: none;
  1565. }
  1566. /deep/ .radioWrap .el-radio {
  1567. display: block;
  1568. height: 41px;
  1569. line-height: 41px;
  1570. text-align: right;
  1571. margin-left: 0;
  1572. }
  1573. /deep/ .moreInfo .el-form-item .el-form-item__label {
  1574. width: 85px;
  1575. text-align: left;
  1576. }
  1577. // 饿了么分组下拉
  1578. .el-scrollbar {
  1579. .el-select-dropdown__list {
  1580. .el-select-group__wrap {
  1581. min-width: 160px !important;
  1582. display: inline-block !important;
  1583. vertical-align: top !important;
  1584. }
  1585. }
  1586. }
  1587. .range {
  1588. margin-top: 20px;
  1589. }
  1590. .el-select-group__wrap::after {
  1591. background: #fff !important;
  1592. }
  1593. .displayColor {
  1594. color: #ccc;
  1595. cursor: not-allowed;
  1596. }
  1597. .delete {
  1598. cursor: pointer;
  1599. }
  1600. .content {
  1601. background: #fff;
  1602. padding: 20px 20px 30px;
  1603. color: #545455;
  1604. }
  1605. .titl {
  1606. margin: 25px 0 10px;
  1607. }
  1608. .deptbox {
  1609. // width: 100%;
  1610. background: #fff;
  1611. padding: 20px 10px 30px;
  1612. font-size: 14px;
  1613. text-align: left;
  1614. border-collapse: collapse;
  1615. > tr {
  1616. height: 30px;
  1617. text-align: center;
  1618. td {
  1619. width: 135px;
  1620. border: 1px solid #666;
  1621. padding: 5px;
  1622. position: relative;
  1623. }
  1624. input {
  1625. border: none;
  1626. border: 1px solid #ccc;
  1627. width: 100%;
  1628. height: 30px;
  1629. padding: 0 7px;
  1630. box-sizing: border-box;
  1631. border-radius: 4px;
  1632. }
  1633. .ind {
  1634. width: 55px;
  1635. }
  1636. .desc {
  1637. width: 280px;
  1638. }
  1639. .descs {
  1640. width: 50px;
  1641. }
  1642. }
  1643. .addSpan {
  1644. text-align: center;
  1645. cursor: pointer;
  1646. }
  1647. }
  1648. .deptboxTable {
  1649. width: 100%;
  1650. }
  1651. .deptboxChange {
  1652. padding-right: 210px;
  1653. position: relative;
  1654. }
  1655. .actionDo {
  1656. width: 200px;
  1657. position: absolute;
  1658. top: 1px;
  1659. right: 0;
  1660. .btnWrap {
  1661. height: 30px;
  1662. }
  1663. }
  1664. .btn {
  1665. text-align: right;
  1666. margin-top: 20px;
  1667. margin-bottom: 20px;
  1668. }
  1669. .necess {
  1670. display: inline-block;
  1671. vertical-align: middle;
  1672. color: red;
  1673. margin-left: 2px;
  1674. }
  1675. .moreInfo {
  1676. border-top: 1px solid #c0c4cc;
  1677. margin-top: 45px;
  1678. p {
  1679. margin: 15px 0;
  1680. }
  1681. }
  1682. .spell {
  1683. text-align: center;
  1684. }
  1685. /deep/.ages {
  1686. margin-top: 20px;
  1687. position: relative;
  1688. .el-input {
  1689. display: inline-block;
  1690. width: auto;
  1691. .el-input__inner {
  1692. width: 80px;
  1693. padding: 0 5px;
  1694. text-align: center;
  1695. }
  1696. .el-input__inner::-webkit-outer-spin-button,
  1697. .el-input__inner::-webkit-inner-spin-button {
  1698. -webkit-appearance: none;
  1699. }
  1700. .el-input__inner[type='number'] {
  1701. -moz-appearance: textfield;
  1702. }
  1703. }
  1704. .ageLine {
  1705. display: inline-block;
  1706. margin: 0 35px;
  1707. }
  1708. .inp {
  1709. margin-left: 20px;
  1710. }
  1711. }
  1712. /deep/ .marT {
  1713. margin-top: 20px;
  1714. }
  1715. /deep/.description {
  1716. position: relative;
  1717. .necess {
  1718. position: absolute;
  1719. left: -158px;
  1720. z-index: 2;
  1721. }
  1722. .el-input__inner {
  1723. width: 200px;
  1724. height: 40px;
  1725. line-height: 40px;
  1726. // text-align: center;
  1727. }
  1728. }
  1729. </style>