SuitableTech.vue 51 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680
  1. <template>
  2. <div class="suitable-tech">
  3. <!-- 搜索项 -->
  4. <div class="screening">
  5. <div class="screening-title flex-vertical-center-l">
  6. <img src="~@/assets/filters.png" alt />
  7. </div>
  8. <div style="flex:1">
  9. <div class="screening-form flex-vertical-center-l flex-wrap">
  10. <div class="screening-item flex-vertical-center-l">
  11. <span>方名:</span>
  12. <div class="input">
  13. <el-input
  14. size="mini"
  15. v-model="searchData.name"
  16. placeholder="请输入"
  17. clearable
  18. ></el-input>
  19. </div>
  20. </div>
  21. <div class="screening-item flex-vertical-center-l">
  22. <span>共享至:</span>
  23. <div class="input">
  24. <el-radio-group v-model="searchData.shareType" size="mini">
  25. <el-radio label="0">个人</el-radio>
  26. <el-radio label="1">科室</el-radio>
  27. <el-radio label="2">机构</el-radio>
  28. </el-radio-group>
  29. </div>
  30. </div>
  31. <div class="screening-item flex-vertical-center-l">
  32. <span>{{ userNameLabel }}:</span>
  33. <div class="input">
  34. <el-input
  35. size="mini"
  36. v-model="searchData.userName"
  37. placeholder="请输入"
  38. clearable
  39. ></el-input>
  40. </div>
  41. </div>
  42. <div class="screening-item flex-vertical-center-l">
  43. <span>是否统建处方:</span>
  44. <div class="input">
  45. <el-select
  46. size="mini"
  47. v-model="searchData.isUnified"
  48. placeholder="请选择"
  49. >
  50. <el-option label="是" value="1"></el-option>
  51. <el-option label="否" value="0"></el-option>
  52. </el-select>
  53. </div>
  54. </div>
  55. </div>
  56. <div class="screening-form flex-vertical-center-l flex-wrap">
  57. <div class="screening-item flex-vertical-center-l" v-if="searchData.isUnified === '1'">
  58. <span>医派:</span>
  59. <div class="input">
  60. <el-input
  61. size="mini"
  62. v-model="searchData.medicalSchool"
  63. placeholder="请输入"
  64. clearable
  65. ></el-input>
  66. </div>
  67. </div>
  68. <div class="screening-item flex-vertical-center-l" v-if="searchData.isUnified === '1'">
  69. <span>科室:</span>
  70. <div class="input">
  71. <el-input
  72. size="mini"
  73. v-model="searchData.department"
  74. placeholder="请输入"
  75. clearable
  76. ></el-input>
  77. </div>
  78. </div>
  79. <div class="screening-item flex-vertical-center-l">
  80. <span>涵盖项目:</span>
  81. <div class="input">
  82. <el-select
  83. size="mini"
  84. v-model="searchData.includeItem"
  85. placeholder="请搜索选择"
  86. clearable
  87. filterable
  88. :loading="projectLoading"
  89. loading-text="搜索中..."
  90. :filter-method="searchProject"
  91. @focus="searchProject('')"
  92. >
  93. <el-option
  94. v-for="(item, idx) in projectOptions"
  95. :key="idx"
  96. :label="item.itemName"
  97. :value="item.pid"
  98. ></el-option>
  99. </el-select>
  100. </div>
  101. </div>
  102. <div class="screening-item flex-vertical-center-l">
  103. <span>功效与适应症:</span>
  104. <div class="input">
  105. <el-input
  106. size="mini"
  107. v-model="searchData.efficacy"
  108. placeholder="请输入"
  109. clearable
  110. ></el-input>
  111. </div>
  112. </div>
  113. <el-button type="primary" size="mini" @click="search()">搜索</el-button>
  114. <el-button type="warning" size="mini" @click="clearFilter()">清空</el-button>
  115. <el-button type="primary" size="mini" @click="openEditDialog()">新增</el-button>
  116. </div>
  117. </div>
  118. </div>
  119. <!-- 列表表格数据 -->
  120. <div class="table">
  121. <div class="today-table">
  122. <div class="table-container">
  123. <el-table
  124. :data="tableData"
  125. stripe
  126. style="width: 100%"
  127. border
  128. height="100%"
  129. row-key="pid"
  130. :expand-row-keys="expandRows"
  131. @expand-change="handleExpandChange"
  132. v-loading="tableLoading"
  133. >
  134. <el-table-column type="expand">
  135. <template slot-scope="props">
  136. <div class="expand-table">
  137. <el-table
  138. :data="props.row.subList"
  139. border
  140. size="mini"
  141. style="width: 100%"
  142. >
  143. <el-table-column
  144. prop="index"
  145. label="序号"
  146. width="60"
  147. align="center"
  148. ></el-table-column>
  149. <el-table-column
  150. prop="treatItemName"
  151. label="项目名称"
  152. align="center"
  153. ></el-table-column>
  154. <el-table-column
  155. label="分类"
  156. width="120"
  157. align="center"
  158. >
  159. <template slot-scope="scope">
  160. {{ formatTreatClass(scope.row.treatClass) }}
  161. </template>
  162. </el-table-column>
  163. <el-table-column label="穴位/部位/耳穴/经络" align="center">
  164. <template slot-scope="scope">
  165. {{ formatDetailList(scope.row) }}
  166. </template>
  167. </el-table-column>
  168. <el-table-column
  169. prop="isUpdate"
  170. label="是否可修改"
  171. width="100"
  172. align="center"
  173. >
  174. <template slot-scope="scope">
  175. {{ scope.row.isUpdate === "1" ? "是" : "否" }}
  176. </template>
  177. </el-table-column>
  178. </el-table>
  179. </div>
  180. </template>
  181. </el-table-column>
  182. <el-table-column
  183. prop="index"
  184. label="序号"
  185. width="60"
  186. align="center"
  187. ></el-table-column>
  188. <el-table-column
  189. prop="name"
  190. label="方名"
  191. min-width="120"
  192. align="center"
  193. ></el-table-column>
  194. <el-table-column
  195. prop="effect"
  196. label="功效与适应症"
  197. min-width="180"
  198. align="center"
  199. show-overflow-tooltip
  200. ></el-table-column>
  201. <el-table-column
  202. prop="provenance"
  203. label="处方出处"
  204. width="100"
  205. align="center"
  206. ></el-table-column>
  207. <el-table-column
  208. prop="showType"
  209. label="共享状态"
  210. width="100"
  211. align="center"
  212. >
  213. <template slot-scope="scope">
  214. <span>{{
  215. scope.row.showType === "0"
  216. ? "个人"
  217. : scope.row.showType === "1"
  218. ? "科室"
  219. : scope.row.showType === "2"
  220. ? "机构"
  221. : "-"
  222. }}</span>
  223. </template>
  224. </el-table-column>
  225. <el-table-column
  226. prop="purposeType"
  227. label="是否统建处方"
  228. width="110"
  229. align="center"
  230. >
  231. <template slot-scope="scope">
  232. {{ scope.row.purposeType === "1" ? "是" : "否" }}
  233. </template>
  234. </el-table-column>
  235. <el-table-column
  236. prop="createUserName"
  237. label="创建者"
  238. width="100"
  239. align="center"
  240. ></el-table-column>
  241. <el-table-column label="操作" width="180" align="center">
  242. <template slot-scope="scope">
  243. <div class="flex-center">
  244. <div class="find-detail find-fill" :class="{ 'is-disabled': scope.row.createUser != currentUserId }" @click="scope.row.createUser == currentUserId && openEditDialog(scope.row)">编辑</div>
  245. <div class="find-detail find-fill1" :class="{ 'is-disabled': scope.row.createUser != currentUserId }" @click="scope.row.createUser == currentUserId && handleDelete(scope.row)">删除</div>
  246. <div class="find-detail find-fill2" @click="handleView(scope.row)">查看</div>
  247. </div>
  248. </template>
  249. </el-table-column>
  250. </el-table>
  251. </div>
  252. <div class="flex-vertical-center-r today-page">
  253. <el-pagination
  254. background
  255. layout=" prev, pager, next, jumper, total"
  256. :total="total"
  257. :page-size="limit"
  258. @current-change="sizeC($event)"
  259. ></el-pagination>
  260. </div>
  261. </div>
  262. </div>
  263. <!-- 新增/编辑弹窗 -->
  264. <popup
  265. distanceTop="5vh"
  266. fullscreen
  267. :showBtns="false"
  268. :showDialog.sync="showEditDialog"
  269. :loading="editLoading"
  270. :title="editData.pid ? '编辑适宜技术协定方' : '新增适宜技术协定方'"
  271. >
  272. <div slot="body" class="dialog-body-wrapper">
  273. <div class="dialog-back-btn" @click="handleEditBack">返回</div>
  274. <div class="dialog-scroll-area">
  275. <div class="dialog-form flex-wrap">
  276. <div class="form-item flex flex-col-center">
  277. <div class="name"><span style="color: red">*</span> 方名:</div>
  278. <div class="input">
  279. <el-input
  280. size="mini"
  281. v-model="editData.name"
  282. placeholder="请输入"
  283. ></el-input>
  284. </div>
  285. </div>
  286. <div class="form-item flex flex-col-center">
  287. <span style="opacity:0">*</span>
  288. <div class="name">中医病名:</div>
  289. <div class="input">
  290. <el-autocomplete
  291. size="mini"
  292. v-model="editData.chineseDiseaseName"
  293. :fetch-suggestions="queryDisease"
  294. value-key="disname"
  295. placeholder="请搜索选择"
  296. clearable
  297. :trigger-on-focus="true"
  298. @select="onDiseaseSelect"
  299. @clear="onDiseaseClear"
  300. >
  301. <template slot-scope="{ item }">
  302. <div :class="{ 'autocomplete-disabled': item._disabled }">
  303. {{ item.disname }}
  304. </div>
  305. </template>
  306. </el-autocomplete>
  307. </div>
  308. </div>
  309. <div class="form-item flex flex-col-center">
  310. <span style="opacity:0">*</span>
  311. <div class="name">共享至:</div>
  312. <div class="input">
  313. <el-select
  314. size="mini"
  315. v-model="editData.showType"
  316. placeholder="请选择"
  317. >
  318. <el-option
  319. v-for="opt in shareOptions"
  320. :key="opt.value"
  321. :label="opt.label"
  322. :value="opt.value"
  323. ></el-option>
  324. </el-select>
  325. </div>
  326. </div>
  327. <div class="form-item flex flex-col-center">
  328. <span style="opacity:0">*</span>
  329. <div class="name">处方出处:</div>
  330. <div class="input">
  331. <el-input
  332. size="mini"
  333. v-model="editData.source"
  334. placeholder="请输入"
  335. ></el-input>
  336. </div>
  337. </div>
  338. <div class="form-item flex flex-col-center form-item-half">
  339. <span style="opacity:0">*</span>
  340. <div class="name">西医诊断:</div>
  341. <div class="input">
  342. <div class="western-disease-tags" v-if="editData.westernDisease.length">
  343. <el-tag
  344. v-for="code in editData.westernDisease"
  345. :key="code"
  346. size="mini"
  347. closable
  348. @close="removeWesternDisease(code)"
  349. >{{ westernDiseaseNameMap[code] || code }}</el-tag>
  350. </div>
  351. <el-autocomplete
  352. size="mini"
  353. v-model="westernDiseaseSearch"
  354. :fetch-suggestions="queryWesternDisease"
  355. value-key="westname"
  356. placeholder="请搜索选择"
  357. clearable
  358. :trigger-on-focus="true"
  359. @select="onWesternDiseaseSelect"
  360. >
  361. <template slot-scope="{ item }">
  362. <div :class="{ 'autocomplete-disabled': item._disabled }">
  363. {{ item.westname }}
  364. </div>
  365. </template>
  366. </el-autocomplete>
  367. </div>
  368. </div>
  369. <div class="form-item flex flex-col-center form-item-half">
  370. <span style="opacity:0">*</span>
  371. <div class="name">功效与适应症:</div>
  372. <div class="input">
  373. <el-input
  374. size="mini"
  375. v-model="editData.efficacy"
  376. placeholder="请输入"
  377. ></el-input>
  378. </div>
  379. </div>
  380. <div class="form-item flex flex-col-center">
  381. <span style="opacity:0">*</span>
  382. <div class="name">证型:</div>
  383. <div class="input">
  384. <el-autocomplete
  385. size="mini"
  386. v-model="editData.symptomName"
  387. :fetch-suggestions="querySymptom"
  388. value-key="symname"
  389. placeholder="请搜索选择"
  390. clearable
  391. :trigger-on-focus="true"
  392. @select="onSymptomSelect"
  393. @clear="onSymptomClear"
  394. >
  395. <template slot-scope="{ item }">
  396. <div :class="{ 'autocomplete-disabled': item._disabled }">
  397. {{ item.symname }}
  398. </div>
  399. </template>
  400. </el-autocomplete>
  401. </div>
  402. </div>
  403. <div class="form-item flex flex-col-center">
  404. <span style="opacity:0">*</span>
  405. <div class="name">治法:</div>
  406. <div class="input">
  407. <el-autocomplete
  408. size="mini"
  409. v-model="editData.therapyName"
  410. :fetch-suggestions="queryTherapy"
  411. value-key="therapy"
  412. placeholder="请搜索选择"
  413. clearable
  414. :trigger-on-focus="true"
  415. @select="onTherapySelect"
  416. @clear="onTherapyClear"
  417. >
  418. <template slot-scope="{ item }">
  419. <div :class="{ 'autocomplete-disabled': item._disabled }">
  420. {{ item.therapy }}
  421. </div>
  422. </template>
  423. </el-autocomplete>
  424. </div>
  425. </div>
  426. <div class="form-item flex flex-col-center">
  427. <span style="opacity:0">*</span>
  428. <el-checkbox v-model="editData.isUnified" class="unified-checkbox">统建处方</el-checkbox>
  429. </div>
  430. <div class="form-item flex flex-col-center" v-if="editData.isUnified">
  431. <div class="name"><span style="color: red">*</span> 医派:</div>
  432. <div class="input">
  433. <el-input
  434. size="mini"
  435. v-model="editData.medicalSchool"
  436. placeholder="请输入"
  437. ></el-input>
  438. </div>
  439. </div>
  440. <div class="form-item flex flex-col-center" v-if="editData.isUnified">
  441. <div class="name"><span style="color: red">*</span> 科室:</div>
  442. <div class="input">
  443. <el-input
  444. size="mini"
  445. v-model="editData.department"
  446. placeholder="请输入"
  447. ></el-input>
  448. </div>
  449. </div>
  450. </div>
  451. <!-- 配穴表格 -->
  452. <AcupointTable
  453. ref="acupointTable"
  454. v-model="editData.acupoints"
  455. :isEditable.sync="editData.isEditable"
  456. :detailTypes.sync="editData.detailTypes"
  457. :statistics.sync="editData.statistics"
  458. :showGuide="true"
  459. @save="onAcupointSave"
  460. />
  461. </div>
  462. </div>
  463. </popup>
  464. <!-- 查看详情弹窗 -->
  465. <popup
  466. distanceTop="5vh"
  467. fullscreen
  468. :showBtns="false"
  469. :showDialog.sync="showViewDialog"
  470. :loading="viewLoading"
  471. title="查看适宜技术协定方"
  472. >
  473. <div slot="body" class="dialog-body-wrapper">
  474. <div class="dialog-back-btn" @click="showViewDialog = false">返回</div>
  475. <div class="dialog-scroll-area">
  476. <div class="dialog-form flex-wrap">
  477. <div class="form-item flex flex-col-center">
  478. <div class="name">方名:</div>
  479. <div class="input">
  480. <el-input
  481. size="mini"
  482. v-model="viewData.name"
  483. placeholder="-"
  484. disabled
  485. ></el-input>
  486. </div>
  487. </div>
  488. <div class="form-item flex flex-col-center">
  489. <div class="name">中医病名:</div>
  490. <div class="input">
  491. <el-input
  492. size="mini"
  493. v-model="viewData.disName"
  494. placeholder="-"
  495. disabled
  496. ></el-input>
  497. </div>
  498. </div>
  499. <div class="form-item flex flex-col-center">
  500. <div class="name">证型:</div>
  501. <div class="input">
  502. <el-input
  503. size="mini"
  504. v-model="viewData.synName"
  505. placeholder="-"
  506. disabled
  507. ></el-input>
  508. </div>
  509. </div>
  510. <div class="form-item flex flex-col-center">
  511. <div class="name">治法:</div>
  512. <div class="input">
  513. <el-input
  514. size="mini"
  515. v-model="viewData.theName"
  516. placeholder="-"
  517. disabled
  518. ></el-input>
  519. </div>
  520. </div>
  521. <div class="form-item flex flex-col-center">
  522. <div class="name">西医诊断:</div>
  523. <div class="input">
  524. <el-input
  525. size="mini"
  526. v-model="viewData.westernDiag"
  527. placeholder="-"
  528. disabled
  529. ></el-input>
  530. </div>
  531. </div>
  532. <div class="form-item flex flex-col-center">
  533. <div class="name">功效与适应症:</div>
  534. <div class="input">
  535. <el-input
  536. size="mini"
  537. v-model="viewData.effect"
  538. placeholder="-"
  539. disabled
  540. ></el-input>
  541. </div>
  542. </div>
  543. <div class="form-item flex flex-col-center">
  544. <div class="name">共享至:</div>
  545. <div class="input">
  546. <el-select size="mini" v-model="viewData.showType" disabled>
  547. <el-option label="个人" value="0"></el-option>
  548. <el-option label="科室" value="1"></el-option>
  549. <el-option label="机构" value="2"></el-option>
  550. </el-select>
  551. </div>
  552. </div>
  553. <div class="form-item flex flex-col-center">
  554. <div class="name">处方出处:</div>
  555. <div class="input">
  556. <el-input
  557. size="mini"
  558. v-model="viewData.provenance"
  559. placeholder="-"
  560. disabled
  561. ></el-input>
  562. </div>
  563. </div>
  564. <div class="form-item flex flex-col-center">
  565. <div class="name">统建处方:</div>
  566. <div class="input">
  567. <el-checkbox
  568. v-model="viewData.isUnifiedChecked"
  569. true-label="1"
  570. false-label="0"
  571. disabled
  572. ></el-checkbox>
  573. </div>
  574. </div>
  575. <template v-if="viewData.purposeType === '1'">
  576. <div class="form-item flex flex-col-center">
  577. <div class="name">医派:</div>
  578. <div class="input">
  579. <el-input
  580. size="mini"
  581. v-model="viewData.sectCategory"
  582. placeholder="-"
  583. disabled
  584. ></el-input>
  585. </div>
  586. </div>
  587. <div class="form-item flex flex-col-center">
  588. <div class="name">科室:</div>
  589. <div class="input">
  590. <el-input
  591. size="mini"
  592. v-model="viewData.sectDept"
  593. placeholder="-"
  594. disabled
  595. ></el-input>
  596. </div>
  597. </div>
  598. </template>
  599. </div>
  600. <SuitableTechDetail ref="techDetail" :detailData="viewData" />
  601. </div>
  602. </div>
  603. </popup>
  604. </div>
  605. </template>
  606. <script>
  607. import popup from "@/components/Propup.vue";
  608. import AcupointTable from "./components/AcupointTable.vue";
  609. import SuitableTechDetail from "./components/SuitableTechDetail.vue";
  610. import {
  611. getDiseaseListMethod,
  612. getSymptomListMethod,
  613. getTherapyListMethod,
  614. } from "@/request/api.illness.js";
  615. import {
  616. getSuitableTechList,
  617. getSuitableTechInfo,
  618. saveSuitableTech,
  619. deleteSuitableTech,
  620. getMappedNondrugItemList,
  621. } from "@/api/technology.js";
  622. import { getXDiseaseName } from "@/api/knowledge.js";
  623. export default {
  624. name: "SuitableTech",
  625. components: { popup, AcupointTable, SuitableTechDetail },
  626. data() {
  627. return {
  628. searchData: {
  629. name: "",
  630. shareType: "0",
  631. userName: "",
  632. isUnified: "",
  633. medicalSchool: "",
  634. department: "",
  635. includeItem: "",
  636. efficacy: "",
  637. },
  638. // 下拉选项
  639. diseaseOptions: [],
  640. symptomOptions: [],
  641. therapyOptions: [],
  642. westernDiseaseOptions: [],
  643. westernDiseaseNameMap: {},
  644. westernDiseaseSearch: "",
  645. westernDiseasePage: 1,
  646. westernDiseaseHasMore: true,
  647. projectOptions: [],
  648. // 下拉加载状态
  649. diseaseLoading: false,
  650. symptomLoading: false,
  651. therapyLoading: false,
  652. westernDiseaseLoading: false,
  653. projectLoading: false,
  654. // 表格数据
  655. tableData: [],
  656. tableLoading: false,
  657. expandRows: [],
  658. page: 1,
  659. limit: 10,
  660. total: 0,
  661. // 弹窗相关
  662. showEditDialog: false,
  663. editLoading: false,
  664. editData: {
  665. statistics: {},
  666. westernDisease: [],
  667. chineseDiseaseName: "",
  668. symptomName: "",
  669. therapyName: "",
  670. },
  671. // 查看详情弹窗
  672. showViewDialog: false,
  673. viewLoading: false,
  674. viewData: {},
  675. };
  676. },
  677. computed: {
  678. userNameLabel() {
  679. const map = {
  680. "0": "姓名",
  681. "1": "科室名称",
  682. "2": "机构名称",
  683. };
  684. return map[this.searchData.shareType] || "姓名";
  685. },
  686. currentUserId() {
  687. const userInfo = this.$store.state.user.userInfo || {};
  688. return userInfo.pid;
  689. },
  690. shareOptions() {
  691. const userInfo = this.$store.state.user.userInfo || {};
  692. const perm = String(userInfo.prescriptionSharePerm || "");
  693. const permList = perm.split(/[,,]/).map(v => v.trim());
  694. const has = (v) => permList.includes(String(v));
  695. const options = [];
  696. if (has(0)) options.push({ label: "个人", value: "0" });
  697. if (has(1) || has(2)) options.push({ label: "科室", value: "1" });
  698. if (has(3)) options.push({ label: "医疗机构", value: "2" });
  699. return options;
  700. },
  701. defaultShareType() {
  702. const options = this.shareOptions;
  703. return options.length ? options[0].value : "0";
  704. },
  705. },
  706. created() {
  707. this.getList();
  708. },
  709. methods: {
  710. // 中医病名搜索
  711. async queryDisease(queryString, cb) {
  712. this._prevDiseaseInput = queryString;
  713. try {
  714. const { list } = await getDiseaseListMethod(1, 9999, {
  715. keyword: queryString || "",
  716. });
  717. if (list && list.length > 0) {
  718. cb(list);
  719. } else {
  720. cb([{ disname: "暂无数据", _disabled: true }]);
  721. }
  722. } catch (e) {
  723. console.error("搜索中医病名失败", e);
  724. cb([{ disname: "搜索失败,请重试", _disabled: true }]);
  725. }
  726. },
  727. onDiseaseSelect(item) {
  728. if (item._disabled) {
  729. // 恢复为点击前的输入文字
  730. this.$nextTick(() => {
  731. this.editData.chineseDiseaseName = this._prevDiseaseInput || "";
  732. });
  733. return;
  734. }
  735. this.editData.chineseDisease = String(item.disid);
  736. this.editData.chineseDiseaseName = item.disname;
  737. this.editData.disCode = item.disCode || "";
  738. // 联动加载证型
  739. this.editData.symptomid = "";
  740. this.editData.symptomName = "";
  741. this.symptomOptions = [];
  742. // 联动清空治法
  743. this.editData.therapyCode = "";
  744. this.editData.therapyName = "";
  745. this.therapyOptions = [];
  746. this.querySymptom("", () => {});
  747. },
  748. onDiseaseClear() {
  749. this.editData.chineseDisease = "";
  750. this.editData.chineseDiseaseName = "";
  751. this.editData.disCode = "";
  752. this.editData.symptomid = "";
  753. this.editData.symptomName = "";
  754. this.symptomOptions = [];
  755. this.editData.therapyCode = "";
  756. this.editData.therapyName = "";
  757. this.therapyOptions = [];
  758. },
  759. // ========== 证型搜索 ==========
  760. async querySymptom(queryString, cb) {
  761. this._prevSymptomInput = queryString;
  762. try {
  763. const params = { keyword: queryString || "" };
  764. if (this.editData.chineseDisease)
  765. params.disid = this.editData.chineseDisease;
  766. if (this.editData.disCode) params.disCode = this.editData.disCode;
  767. const { list } = await getSymptomListMethod(1, 9999, params);
  768. if (list && list.length > 0) {
  769. cb(list);
  770. } else {
  771. cb([{ symname: "暂无数据", _disabled: true }]);
  772. }
  773. } catch (e) {
  774. console.error("搜索证型失败", e);
  775. cb([{ symname: "搜索失败,请重试", _disabled: true }]);
  776. }
  777. },
  778. onSymptomSelect(item) {
  779. if (item._disabled) {
  780. this.$nextTick(() => {
  781. this.editData.symptomName = this._prevSymptomInput || "";
  782. });
  783. return;
  784. }
  785. this.editData.symptomid = String(item.symid);
  786. this.editData.symptomName = item.symname;
  787. this.editData.symptomCode = item.synCode || "";
  788. // 联动清空治法并重新加载
  789. this.editData.therapyCode = "";
  790. this.editData.therapyName = "";
  791. this.therapyOptions = [];
  792. if (item.symid) {
  793. this.queryTherapy("", () => {});
  794. }
  795. },
  796. onSymptomClear() {
  797. this.editData.symptomid = "";
  798. this.editData.symptomName = "";
  799. this.editData.symptomCode = "";
  800. // 联动清空治法
  801. this.editData.therapyCode = "";
  802. this.editData.therapyName = "";
  803. this.therapyOptions = [];
  804. },
  805. // ========== 治法搜索 ==========
  806. async queryTherapy(queryString, cb) {
  807. this._prevTherapyInput = queryString;
  808. try {
  809. const params = { keyword: queryString || "" };
  810. if (this.editData.disCode) params.disCode = this.editData.disCode;
  811. if (this.editData.symptomid) {
  812. params.symptomCode = this.editData.symptomid;
  813. params.symid = this.editData.symptomid;
  814. }
  815. const { list } = await getTherapyListMethod(1, 9999, params);
  816. if (list && list.length > 0) {
  817. cb(list);
  818. } else {
  819. cb([{ therapy: "暂无数据", _disabled: true }]);
  820. }
  821. } catch (e) {
  822. console.error("搜索治法失败", e);
  823. cb([{ therapy: "搜索失败,请重试", _disabled: true }]);
  824. }
  825. },
  826. onTherapySelect(item) {
  827. if (item._disabled) {
  828. this.$nextTick(() => {
  829. this.editData.therapyName = this._prevTherapyInput || "";
  830. });
  831. return;
  832. }
  833. this.editData.therapyCode = String(item.therapyCode);
  834. this.editData.therapyName = item.therapy;
  835. },
  836. onTherapyClear() {
  837. this.editData.therapyCode = "";
  838. this.editData.therapyName = "";
  839. },
  840. // ========== 西医诊断搜索(分页) ==========
  841. async searchWesternDisease(query) {
  842. this.westernDiseasePage = 1;
  843. this.westernDiseaseHasMore = true;
  844. this._wdQuery = query || "";
  845. this.westernDiseaseLoading = true;
  846. try {
  847. const pinyin = /^[A-Za-z]+$/g;
  848. const serchtype = query && pinyin.test(query) ? "1" : "";
  849. const res = await getXDiseaseName({
  850. pageid: 1,
  851. pagesize: 200,
  852. keyword: query || "",
  853. serchtype,
  854. });
  855. if (res.code == 0) {
  856. const list = res.data?.wests || [];
  857. // 保留已选中但不在搜索结果中的选项
  858. const selectedCodes = Array.isArray(this.editData.westernDisease)
  859. ? this.editData.westernDisease
  860. : [];
  861. const resultCodes = new Set(list.map((i) => i.westcode));
  862. const preserved = selectedCodes
  863. .filter((code) => !resultCodes.has(code))
  864. .map((code) => ({
  865. westcode: code,
  866. westname: this.westernDiseaseNameMap[code] || code,
  867. }));
  868. this.westernDiseaseOptions = [...preserved, ...list];
  869. this.westernDiseaseHasMore = list.length >= 200;
  870. list.forEach((item) => {
  871. if (item.westcode && item.westname) {
  872. this.westernDiseaseNameMap[item.westcode] = item.westname;
  873. }
  874. });
  875. }
  876. } catch (e) {
  877. console.error("搜索西医诊断失败", e);
  878. } finally {
  879. this.westernDiseaseLoading = false;
  880. }
  881. },
  882. async loadMoreWesternDisease() {
  883. if (this.westernDiseaseLoading || !this.westernDiseaseHasMore) return;
  884. this.westernDiseasePage++;
  885. this.westernDiseaseLoading = true;
  886. try {
  887. const query = this._wdQuery || "";
  888. const pinyin = /^[A-Za-z]+$/g;
  889. const serchtype = query && pinyin.test(query) ? "1" : "";
  890. const res = await getXDiseaseName({
  891. pageid: this.westernDiseasePage,
  892. pagesize: 200,
  893. keyword: query,
  894. serchtype,
  895. });
  896. if (res.code == 0) {
  897. const list = res.data?.wests || [];
  898. this.westernDiseaseOptions = this.westernDiseaseOptions.concat(list);
  899. this.westernDiseaseHasMore = list.length >= 200;
  900. list.forEach((item) => {
  901. if (item.westcode && item.westname) {
  902. this.westernDiseaseNameMap[item.westcode] = item.westname;
  903. }
  904. });
  905. }
  906. } catch (e) {
  907. console.error("加载更多西医诊断失败", e);
  908. } finally {
  909. this.westernDiseaseLoading = false;
  910. }
  911. },
  912. onWesternDiseaseVisible(show) {
  913. if (!show) {
  914. const wrap = document.querySelector(
  915. ".western-disease-select .el-scrollbar__wrap",
  916. );
  917. if (wrap && this._wdScroll) {
  918. wrap.removeEventListener("scroll", this._wdScroll);
  919. }
  920. return;
  921. }
  922. // 首次打开且无数据时加载初始列表
  923. if (this.westernDiseaseOptions.length === 0) {
  924. this.searchWesternDisease("");
  925. }
  926. this.$nextTick(() => {
  927. const wrap = document.querySelector(
  928. ".western-disease-select .el-scrollbar__wrap",
  929. );
  930. if (wrap) {
  931. wrap.addEventListener(
  932. "scroll",
  933. (this._wdScroll = () => {
  934. if (wrap.scrollHeight - wrap.scrollTop <= wrap.clientHeight + 5) {
  935. this.loadMoreWesternDisease();
  936. }
  937. }),
  938. );
  939. }
  940. });
  941. },
  942. async queryWesternDisease(queryString, cb) {
  943. await this.searchWesternDisease(queryString);
  944. if (this.westernDiseaseOptions.length > 0) {
  945. cb(this.westernDiseaseOptions);
  946. } else {
  947. cb([{ westname: "暂无数据", _disabled: true }]);
  948. }
  949. },
  950. onWesternDiseaseSelect(item) {
  951. if (item._disabled) {
  952. this.$nextTick(() => {
  953. this.westernDiseaseSearch = "";
  954. });
  955. return;
  956. }
  957. const code = String(item.westcode);
  958. if (!this.editData.westernDisease.includes(code)) {
  959. this.editData.westernDisease.push(code);
  960. this.westernDiseaseNameMap[code] = item.westname;
  961. this.updateWesternDiseaseName();
  962. }
  963. this.westernDiseaseSearch = "";
  964. this.$nextTick(() => {
  965. this.searchWesternDisease("");
  966. });
  967. },
  968. removeWesternDisease(code) {
  969. this.editData.westernDisease = this.editData.westernDisease.filter((c) => c !== code);
  970. this.updateWesternDiseaseName();
  971. },
  972. updateWesternDiseaseName() {
  973. const names = this.editData.westernDisease
  974. .map((code) => this.westernDiseaseNameMap[code] || "")
  975. .filter(Boolean);
  976. this.editData.westernDiseaseName = names.join(",");
  977. },
  978. // ========== 涵盖项目模糊搜索 ==========
  979. async searchProject(query) {
  980. this.projectLoading = true;
  981. try {
  982. const res = await getMappedNondrugItemList({
  983. pageNum: 1,
  984. pageSize: 100,
  985. itemName: query || undefined,
  986. });
  987. if (res.ResultCode === 0) {
  988. this.projectOptions = res.Data?.Items || res.Data || [];
  989. }
  990. } catch (e) {
  991. console.error("搜索涵盖项目失败", e);
  992. } finally {
  993. this.projectLoading = false;
  994. }
  995. },
  996. search() {
  997. this.page = 1;
  998. this.getList();
  999. },
  1000. clearFilter() {
  1001. this.searchData = {
  1002. name: "",
  1003. shareType: "0",
  1004. userName: "",
  1005. isUnified: "",
  1006. medicalSchool: "",
  1007. department: "",
  1008. includeItem: "",
  1009. efficacy: "",
  1010. };
  1011. this.getList();
  1012. },
  1013. sizeC(e) {
  1014. this.page = e;
  1015. this.getList();
  1016. },
  1017. handleExpandChange(row, expandedRows) {
  1018. this.expandRows = expandedRows.map((item) => item.pid);
  1019. },
  1020. formatTreatClass(val) {
  1021. const map = {
  1022. 1: "艾灸疗法",
  1023. 2: "非艾·灸法",
  1024. 3: "拔罐疗法",
  1025. 4: "针刺疗法",
  1026. 5: "敷熨熏浴",
  1027. 6: "推拿疗法",
  1028. 7: "耳穴疗法",
  1029. 8: "刮痧疗法",
  1030. 9: "物理疗法",
  1031. 10: "中医肛肠",
  1032. 11: "中医微创",
  1033. 12: "其他疗法",
  1034. 194: "中医骨伤",
  1035. };
  1036. return map[val] || val || "-";
  1037. },
  1038. formatDetailList(row) {
  1039. const parts = [];
  1040. const extractNames = (arr) => {
  1041. if (!Array.isArray(arr) || !arr.length) return "";
  1042. return arr
  1043. .map((item) => item.name || "")
  1044. .filter(Boolean)
  1045. .join("、");
  1046. };
  1047. const pointNames = extractNames(row.detailPoint);
  1048. if (pointNames) parts.push("穴位: " + pointNames);
  1049. const meridianNames = extractNames(row.detailMeridian);
  1050. if (meridianNames) parts.push("经络: " + meridianNames);
  1051. const earNames = extractNames(row.detailEarPoint);
  1052. if (earNames) parts.push("耳穴: " + earNames);
  1053. const bodyNames = extractNames(row.detailBodyPart);
  1054. if (bodyNames) parts.push("部位: " + bodyNames);
  1055. const otherNames = extractNames(row.detailOther);
  1056. if (otherNames) parts.push("其他: " + otherNames);
  1057. return parts.join(";") || "-";
  1058. },
  1059. handleEditBack() {
  1060. if (!this.editData.pid) {
  1061. this.$confirm("协定方未保存,返回则会清空当前编辑内容", "提示", {
  1062. confirmButtonText: "确定",
  1063. cancelButtonText: "取消",
  1064. type: "warning",
  1065. })
  1066. .then(() => {
  1067. this.showEditDialog = false;
  1068. })
  1069. .catch(() => {});
  1070. } else {
  1071. this.showEditDialog = false;
  1072. }
  1073. },
  1074. async openEditDialog(row) {
  1075. if (row) {
  1076. // 调用详情接口获取完整数据
  1077. this.editLoading = true;
  1078. let detail = row;
  1079. try {
  1080. const res = await getSuitableTechInfo(row.pid);
  1081. if (res.ResultCode === 0) {
  1082. detail = res.Data || row;
  1083. }
  1084. } catch (e) {
  1085. console.error("获取详情失败", e);
  1086. } finally {
  1087. this.editLoading = false;
  1088. }
  1089. // 用详情数据构造下拉选项,确保回显时下拉框能显示名称
  1090. this.diseaseOptions =
  1091. detail.disId != null
  1092. ? [
  1093. {
  1094. disid: detail.disId,
  1095. disname: detail.disName,
  1096. disCode: detail.disCode,
  1097. },
  1098. ]
  1099. : [];
  1100. this.symptomOptions =
  1101. detail.synCode != null
  1102. ? [
  1103. {
  1104. symid: detail.synCode,
  1105. symname: detail.synName,
  1106. synCode: detail.synCode,
  1107. },
  1108. ]
  1109. : [];
  1110. this.therapyOptions =
  1111. detail.theCode != null
  1112. ? [
  1113. {
  1114. therapyCode: detail.theCode,
  1115. therapy: detail.theName,
  1116. therapyName: detail.theName,
  1117. },
  1118. ]
  1119. : [];
  1120. if (detail.westernCode) {
  1121. const codes = String(detail.westernCode).split(",");
  1122. const names = detail.westernDiag
  1123. ? String(detail.westernDiag).split(",")
  1124. : [];
  1125. this.westernDiseaseOptions = codes.map((code, idx) => ({
  1126. westcode: code.trim(),
  1127. westname: (names[idx] || "").trim() || code.trim(),
  1128. }));
  1129. } else {
  1130. this.westernDiseaseOptions = [];
  1131. }
  1132. // 同步到名称映射
  1133. this.westernDiseaseNameMap = {};
  1134. this.westernDiseaseOptions.forEach((item) => {
  1135. if (item.westcode && item.westname) {
  1136. this.westernDiseaseNameMap[item.westcode] = item.westname;
  1137. }
  1138. });
  1139. this.editData = {
  1140. ...detail,
  1141. showType: String(detail.showType ?? "0"),
  1142. efficacy: detail.effect || "",
  1143. source: detail.provenance || "",
  1144. isUnified: String(detail.purposeType) === "1",
  1145. medicalSchool: detail.sectCategory || "",
  1146. department: detail.sectDept || "",
  1147. chineseDisease: detail.disId != null ? String(detail.disId) : "",
  1148. chineseDiseaseName: detail.disName || "",
  1149. disCode: detail.disCode || "",
  1150. symptomid: detail.synCode != null ? String(detail.synCode) : "",
  1151. symptomName: detail.synName || "",
  1152. symptomCode: detail.synCode || "",
  1153. westernDisease: detail.westernCode
  1154. ? String(detail.westernCode)
  1155. .split(",")
  1156. .map((s) => s.trim())
  1157. : [],
  1158. westernDiseaseName: detail.westernDiag || "",
  1159. therapyCode: detail.theCode != null ? String(detail.theCode) : "",
  1160. therapyName: detail.theName || "",
  1161. acupoints: detail.acupoints || [],
  1162. detailTypes: detail.detailTypes || ["穴位"],
  1163. statistics: detail.statistics || {},
  1164. };
  1165. this.showEditDialog = true;
  1166. // 弹窗显示后回填 treatmentList 到 AcupointTable
  1167. this.$nextTick(() => {
  1168. if (this.$refs.acupointTable && detail.treatmentList) {
  1169. this.$refs.acupointTable.loadFromServerData(detail.treatmentList);
  1170. }
  1171. });
  1172. } else {
  1173. this.editData = {
  1174. name: "",
  1175. chineseDisease: "",
  1176. chineseDiseaseName: "",
  1177. disCode: "",
  1178. symptomid: "",
  1179. symptomName: "",
  1180. therapyCode: "",
  1181. therapyName: "",
  1182. westernDisease: [],
  1183. westernDiseaseName: "",
  1184. efficacy: "",
  1185. showType: this.defaultShareType,
  1186. source: "",
  1187. isUnified: false,
  1188. medicalSchool: "",
  1189. department: "",
  1190. isEditable: "1",
  1191. detailTypes: [""],
  1192. acupoints: [],
  1193. statistics: {},
  1194. };
  1195. this.showEditDialog = true;
  1196. }
  1197. },
  1198. async submitEditData() {
  1199. // 通过 AcupointTable 的 handleSave 触发保存流程
  1200. this.$refs.acupointTable.handleSave();
  1201. },
  1202. async onAcupointSave(treatmentList, institutionInfo) {
  1203. // 从下拉选项中查找选中项的名称
  1204. const selectedDisease = this.diseaseOptions.find(
  1205. (o) => o.disid === this.editData.chineseDisease,
  1206. );
  1207. const selectedSymptom = this.symptomOptions.find(
  1208. (o) => o.symid === this.editData.symptomid,
  1209. );
  1210. const selectedTherapy = this.therapyOptions.find(
  1211. (o) => o.therapyCode === this.editData.therapyCode,
  1212. );
  1213. const params = {
  1214. // 必填字段
  1215. name: this.editData.name,
  1216. showType: this.editData.showType || "0",
  1217. // 基本信息
  1218. effect: this.editData.efficacy || "",
  1219. provenance: this.editData.source || "",
  1220. purposeType: this.editData.isUnified ? "1" : "0",
  1221. sectCategory: this.editData.medicalSchool || "",
  1222. sectDept: this.editData.department || "",
  1223. // 疾病信息
  1224. disId: this.editData.chineseDisease || undefined,
  1225. disName: selectedDisease
  1226. ? selectedDisease.disname
  1227. : this.editData.chineseDiseaseName || "",
  1228. disCode: this.editData.disCode || "",
  1229. // 证型信息
  1230. synId: undefined,
  1231. synName: selectedSymptom
  1232. ? selectedSymptom.symname
  1233. : this.editData.symptomName || "",
  1234. synCode: this.editData.symptomid || "",
  1235. // 治法信息
  1236. theCode: this.editData.therapyCode || "",
  1237. theName: selectedTherapy
  1238. ? selectedTherapy.therapy
  1239. : this.editData.therapyName || "",
  1240. // 西医诊断
  1241. westernCode: Array.isArray(this.editData.westernDisease)
  1242. ? this.editData.westernDisease.join(",")
  1243. : this.editData.westernDisease || "",
  1244. westernDiag: this.editData.westernDiseaseName || "",
  1245. // 总金额
  1246. totalAmount: parseFloat(this.editData.statistics?.totalPrice) || 0,
  1247. // 机构信息:来自 getNondrugItemDetail 接口(新增时),或 editData 回显(编辑时)
  1248. ygtid: institutionInfo?.ygtid || this.editData.ygtid || "",
  1249. departmentId:
  1250. institutionInfo?.departmentId || this.editData.departmentId || "",
  1251. stitutionsId:
  1252. institutionInfo?.stitutionsId || this.editData.stitutionsId || "",
  1253. stitutionsName:
  1254. institutionInfo?.stitutionsName || this.editData.stitutionsName || "",
  1255. // 治疗明细项列表
  1256. treatmentList,
  1257. };
  1258. // 编辑时传递 pid
  1259. if (this.editData.pid) {
  1260. params.pid = this.editData.pid;
  1261. }
  1262. try {
  1263. const res = await saveSuitableTech(params);
  1264. if (res.ResultCode === 0) {
  1265. this.$message.success(this.editData.pid ? "编辑成功" : "新增成功");
  1266. this.showEditDialog = false;
  1267. this.getList();
  1268. }
  1269. // 后端返回错误时,request.js 响应拦截器已弹出错误消息并 reject,
  1270. // 这里不需要再重复弹窗;网络错误同样由拦截器处理
  1271. } catch (e) {
  1272. console.error("保存失败", e);
  1273. } finally {
  1274. if (this.$refs.acupointTable) {
  1275. this.$refs.acupointTable.saveDone();
  1276. }
  1277. }
  1278. },
  1279. handleDelete(row) {
  1280. this.$confirm("确认删除该条记录?", "提示", {
  1281. confirmButtonText: "确定",
  1282. cancelButtonText: "取消",
  1283. type: "warning",
  1284. })
  1285. .then(async () => {
  1286. try {
  1287. const res = await deleteSuitableTech({ pid: row.pid });
  1288. if (res.ResultCode === 0) {
  1289. this.$message.success("删除成功");
  1290. this.getList();
  1291. } else {
  1292. this.$message.error(res.ResultInfo || "删除失败");
  1293. }
  1294. } catch (e) {
  1295. console.error("删除失败", e);
  1296. this.$message.error("删除失败");
  1297. }
  1298. })
  1299. .catch(() => {});
  1300. },
  1301. // 查看详情
  1302. async handleView(row) {
  1303. this.viewLoading = true;
  1304. this.showViewDialog = true;
  1305. this.viewData = {};
  1306. try {
  1307. const res = await getSuitableTechInfo(row.pid);
  1308. if (res.ResultCode === 0) {
  1309. const data = res.Data || {};
  1310. this.viewData = {
  1311. ...data,
  1312. showType: String(data.showType ?? "0"),
  1313. isUnifiedChecked: data.purposeType || "0",
  1314. };
  1315. }
  1316. } catch (e) {
  1317. console.error("获取详情失败", e);
  1318. } finally {
  1319. this.viewLoading = false;
  1320. }
  1321. },
  1322. async getList() {
  1323. this.tableLoading = true;
  1324. try {
  1325. const params = {
  1326. pageNum: this.page,
  1327. pageSize: this.limit,
  1328. name: this.searchData.name || undefined,
  1329. effect: this.searchData.efficacy || undefined,
  1330. showType: this.searchData.shareType || undefined,
  1331. sectCategory: this.searchData.medicalSchool || undefined,
  1332. sectDept: this.searchData.department || undefined,
  1333. purposeType: this.searchData.isUnified || undefined,
  1334. coverageContent: this.searchData.includeItem || undefined,
  1335. rangtypeName: this.searchData.userName || undefined,
  1336. };
  1337. const res = await getSuitableTechList(params);
  1338. if (res.ResultCode === 0) {
  1339. const list = res.Data?.Items || [];
  1340. this.total = res.Data?.totalRecordCount || 0;
  1341. this.tableData = list.map((item, index) => ({
  1342. ...item,
  1343. index: (this.page - 1) * this.limit + index + 1,
  1344. subList: (item.treatmentList || []).map((sub, sIdx) => ({
  1345. ...sub,
  1346. index: sIdx + 1,
  1347. })),
  1348. }));
  1349. }
  1350. } catch (e) {
  1351. console.error("获取列表失败", e);
  1352. } finally {
  1353. this.tableLoading = false;
  1354. }
  1355. },
  1356. },
  1357. };
  1358. </script>
  1359. <style lang="scss" scoped>
  1360. @import "../../style/common.scss";
  1361. @import "../../style/base.scss";
  1362. .suitable-tech {
  1363. width: 100%;
  1364. height: 100%;
  1365. }
  1366. .suitable-tech ::v-deep .screening-form {
  1367. .screening-item {
  1368. width: 20%;
  1369. flex: none;
  1370. .el-input,
  1371. .el-select {
  1372. width: 100%;
  1373. }
  1374. }
  1375. }
  1376. .suitable-tech ::v-deep .popup-container {
  1377. display: flex;
  1378. flex-direction: column;
  1379. overflow: hidden !important;
  1380. height: calc(100vh - 60px) !important;
  1381. }
  1382. .dialog-body-wrapper {
  1383. display: flex;
  1384. flex-direction: column;
  1385. height: 100%;
  1386. }
  1387. .dialog-back-btn {
  1388. display: flex;
  1389. align-items: center;
  1390. justify-content: center;
  1391. font-size: 14px;
  1392. color: #333;
  1393. background: #fff;
  1394. border: 1px solid #ccc;
  1395. border-radius: 4px;
  1396. padding: 4px 16px;
  1397. cursor: pointer;
  1398. margin-bottom: 10px;
  1399. width: fit-content;
  1400. &:hover {
  1401. opacity: 0.8;
  1402. }
  1403. }
  1404. .dialog-content-box {
  1405. flex: 1;
  1406. min-height: 0;
  1407. display: flex;
  1408. flex-direction: column;
  1409. border: 1px solid #ddd;
  1410. border-radius: 4px;
  1411. padding: 10px;
  1412. overflow: hidden;
  1413. }
  1414. .screening-btn-group {
  1415. display: flex;
  1416. align-items: center;
  1417. margin: 5px 0;
  1418. }
  1419. .share-badge {
  1420. display: inline-block;
  1421. min-width: 20px;
  1422. height: 20px;
  1423. line-height: 20px;
  1424. padding: 0 6px;
  1425. background: #ffae45;
  1426. color: #fff;
  1427. border-radius: 10px;
  1428. font-size: 12px;
  1429. text-align: center;
  1430. }
  1431. .expand-table {
  1432. padding: 10px 20px;
  1433. }
  1434. .table {
  1435. padding: 10px 10px;
  1436. background: #ffffff;
  1437. border-radius: 5px;
  1438. margin-top: 10px;
  1439. height: 70vh;
  1440. .table-container {
  1441. height: 90%;
  1442. }
  1443. .today-table {
  1444. height: 100%;
  1445. .find-detail {
  1446. width: 60px;
  1447. height: 24px;
  1448. border: 1px solid #ffae45;
  1449. border-radius: 2px;
  1450. text-align: center;
  1451. color: #fff;
  1452. font-size: 14px;
  1453. cursor: pointer;
  1454. margin: 0 2px;
  1455. background: #ffae45;
  1456. }
  1457. .find-fill {
  1458. background: #5386f6 !important;
  1459. color: #fff !important;
  1460. border: 1px solid #5386f6;
  1461. }
  1462. .find-fill1 {
  1463. background: #ff6245;
  1464. color: #fff !important;
  1465. border: 1px solid #ff6245;
  1466. }
  1467. .find-fill2 {
  1468. background: #68a8ff !important;
  1469. color: #fff !important;
  1470. border: 1px solid #68a8ff;
  1471. }
  1472. .find-detail.is-disabled {
  1473. opacity: 0.5;
  1474. cursor: not-allowed;
  1475. pointer-events: none;
  1476. }
  1477. }
  1478. }
  1479. .form {
  1480. width: 50%;
  1481. .form-item {
  1482. margin-bottom: 10px;
  1483. span {
  1484. color: red;
  1485. }
  1486. .name {
  1487. width: 120px;
  1488. }
  1489. .input {
  1490. flex: 1;
  1491. }
  1492. }
  1493. }
  1494. .dialog-form {
  1495. display: flex;
  1496. flex-wrap: wrap;
  1497. flex-shrink: 0;
  1498. .form-item {
  1499. width: 25%;
  1500. box-sizing: border-box;
  1501. padding: 0 10px;
  1502. margin-bottom: 10px;
  1503. &.form-item-half {
  1504. width: 50%;
  1505. }
  1506. .name {
  1507. width: 110px;
  1508. min-width: 110px;
  1509. font-size: 14px;
  1510. white-space: nowrap;
  1511. text-align: right;
  1512. margin-right: 5px;
  1513. }
  1514. .input {
  1515. flex: 1;
  1516. min-width: 0;
  1517. .el-input,
  1518. .el-select {
  1519. width: 100%;
  1520. }
  1521. }
  1522. .unified-checkbox {
  1523. margin-left: 115px;
  1524. }
  1525. }
  1526. }
  1527. .dialog-scroll-area {
  1528. flex: 1;
  1529. min-height: 0;
  1530. overflow: hidden;
  1531. display: flex;
  1532. flex-direction: column;
  1533. }
  1534. .dialog-scroll-area ::v-deep .recipe-acupoint-wrapper {
  1535. flex: 1;
  1536. display: flex;
  1537. flex-direction: column;
  1538. min-height: 0;
  1539. }
  1540. .autocomplete-disabled {
  1541. color: #999 !important;
  1542. cursor: not-allowed !important;
  1543. pointer-events: none;
  1544. }
  1545. .western-disease-tags {
  1546. margin-bottom: 4px;
  1547. .el-tag {
  1548. margin-right: 4px;
  1549. margin-bottom: 2px;
  1550. }
  1551. }
  1552. .dialog-scroll-area ::v-deep .recipe-acupoint {
  1553. flex: 1;
  1554. min-height: 0;
  1555. }
  1556. </style>
  1557. <style lang="scss" scoped>
  1558. @media screen and (min-width: 1681px) and (max-width: 1920px) {
  1559. .table {
  1560. height: 81vh;
  1561. .table-container {
  1562. height: 94%;
  1563. }
  1564. }
  1565. .today-table::v-deep .el-table td {
  1566. padding: 18px 0;
  1567. }
  1568. .today-table::v-deep .el-table th {
  1569. padding: 18px 0;
  1570. }
  1571. }
  1572. @media screen and (min-width: 1601px) and (max-width: 1680px) {
  1573. .table {
  1574. height: 80vh;
  1575. .table-container {
  1576. height: 94%;
  1577. }
  1578. }
  1579. .today-table::v-deep .el-table td {
  1580. padding: 18px 0;
  1581. }
  1582. .today-table::v-deep .el-table th {
  1583. padding: 18px 0;
  1584. }
  1585. }
  1586. @media screen and (min-width: 1361px) and (max-width: 1600px) {
  1587. .table {
  1588. height: 72vh;
  1589. .table-container {
  1590. height: 90%;
  1591. }
  1592. }
  1593. .today-table::v-deep .el-table td {
  1594. padding: 5px 0;
  1595. }
  1596. .today-table::v-deep .el-table th {
  1597. padding: 5px 0;
  1598. }
  1599. }
  1600. @media screen and (min-width: 1281px) and (max-width: 1360px) {
  1601. .table {
  1602. height: 72vh;
  1603. .table-container {
  1604. height: 90%;
  1605. }
  1606. }
  1607. .today-table::v-deep .el-table td {
  1608. padding: 5px 0;
  1609. }
  1610. .today-table::v-deep .el-table th {
  1611. padding: 5px 0;
  1612. }
  1613. }
  1614. </style>