You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1770 lines
57 KiB

2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
  1. <template>
  2. <div class="box">
  3. <div style="width: 95%">
  4. <el-card>
  5. <div class="publiccss">组合项目</div>
  6. <div style="display: flex;margin-top:15px;">
  7. <div style="width: 15%;">
  8. <div>
  9. <el-select v-model="department" placeholder="请选择" filterable :filter-method="remoteMethodes" default-first-option @change="quckDepartments" clearable>
  10. <el-option
  11. v-for="item in quckDepartment"
  12. :key="item.id"
  13. :label="item.displayName"
  14. :value="item.id"
  15. >
  16. </el-option>
  17. </el-select>
  18. </div>
  19. <div style=" margin-top: 20px">
  20. <el-tree
  21. :data="itemTypeId"
  22. :props="treeprops"
  23. @node-click="treeclick"
  24. node-key="id"
  25. ref="itemType"
  26. highlight-current
  27. auto-expand-parent
  28. ></el-tree>
  29. </div>
  30. </div>
  31. <div style="width:85%;">
  32. <el-table
  33. :data="tableData"
  34. style="width: 100%;"
  35. row-key="id"
  36. :height="window.pageHeight < 600 ? 695 : window.pageHeight - 415"
  37. class="el-table__body-wrapper tbody"
  38. @row-click="rowick"
  39. highlight-current-row
  40. :row-style="{ height: '40px' }"
  41. ref="tableData"
  42. >
  43. <el-table-column prop="id" label="编号" width="320">
  44. </el-table-column>
  45. <el-table-column prop="displayName" label="名称" width="">
  46. </el-table-column>
  47. <el-table-column prop="creatorName" label="创建者" width="">
  48. </el-table-column>
  49. <el-table-column prop="lastModifierName" label="修改者" width="">
  50. </el-table-column>
  51. <el-table-column prop="creationTime" label="创建时间" width="200">
  52. <template slot-scope="scope">
  53. {{ scope.row.creationTime | dateFormat }}
  54. </template>
  55. </el-table-column>
  56. <el-table-column
  57. prop="lastModificationTime"
  58. label="修改时间"
  59. width="200"
  60. >
  61. <template slot-scope="scope">
  62. {{ scope.row.lastModificationTime | dateFormat }}
  63. </template>
  64. </el-table-column>
  65. <el-table-column label="操作">
  66. <template>
  67. <el-tag
  68. class="move"
  69. style="
  70. cursor: move;
  71. margin-left: 15px;
  72. background-color: rgb(245, 245, 245);
  73. border: none;
  74. "
  75. draggable="true"
  76. >
  77. <i
  78. class="el-icon-d-caret"
  79. style="width: 1rem; height: 1rem; color: rgb(113, 113, 113)"
  80. ></i>
  81. </el-tag>
  82. </template>
  83. </el-table-column>
  84. </el-table>
  85. <!-- table页 -->
  86. <el-tabs v-model="activeName">
  87. <el-tab-pane label="项目明细" name="first">
  88. <div>
  89. <span style="margin-top: 10px; padding: 5px; margin-left: 19.8%"
  90. >项目类别</span
  91. >
  92. <el-select
  93. v-model="values"
  94. placeholder="请选择"
  95. @change="ischangs"
  96. style="margin-top: 5px"
  97. filterable :filter-method="remoteMethod" default-first-option clearable
  98. >
  99. <el-option
  100. v-for="item in projectid"
  101. :key="item.id"
  102. :label="item.displayName"
  103. :value="item.id"
  104. >
  105. </el-option>
  106. </el-select>
  107. <span style="margin-left: 10%; padding: 5px">搜索选择</span>
  108. <el-select
  109. value-key="id"
  110. @change="selectitem"
  111. filterable
  112. v-model="flitvalues"
  113. placeholder="请选择"
  114. style="margin-top: 5px"
  115. :filter-method="remoteMethods" default-first-option clearable
  116. >
  117. <el-option
  118. v-for="item in filetelists"
  119. :key="item.id"
  120. :label="item.displayName"
  121. :value="item"
  122. >
  123. </el-option>
  124. </el-select>
  125. </div>
  126. <div class="mainbox">
  127. <div class="mainleftbox">
  128. <!-- <div class="weixuan">未选项目</div>
  129. <div
  130. v-for="(item, index) in leftdata"
  131. :key="index"
  132. @click="clickPaixu(item, index)"
  133. @dblclick="shuanji(item, index)"
  134. :class="num === index ? 'activetext' : ''"
  135. style=""
  136. >
  137. <div>{{ item.displayName }}</div>
  138. </div> -->
  139. <el-table :data="leftdata" :height="400" @row-dblclick="dbClickChoosedAsb"
  140. @selection-change="handleSelectionChange" size="small">
  141. <el-table-column type="selection" align="center" />
  142. <el-table-column prop="displayName" label="未选项目" />
  143. </el-table>
  144. </div>
  145. <div class="Selectbutton">
  146. <!-- <div style="margin-top: 18px">
  147. <el-button @click="addall" style="width:100%;"
  148. >全添加<i class="el-icon-caret-right"></i
  149. ><i class="el-icon-caret-right"></i
  150. ></el-button>
  151. </div> -->
  152. <!-- <div style="margin-top: 18px">
  153. <el-button @click="addobj" style="width: 111px"
  154. >添加<i class="el-icon-caret-right"></i>
  155. </el-button>
  156. </div>
  157. <div style="margin-top: 18px">
  158. <el-button @click="removeright" style="width: 111px"
  159. >移去<i class="el-icon-caret-left"></i>
  160. </el-button>
  161. </div> -->
  162. <div style="">
  163. <el-button @click="addAbs" style="width: 111px"
  164. >添加<i class="el-icon-caret-right"></i>
  165. </el-button>
  166. </div>
  167. <div style="margin-top: 35px">
  168. <el-button @click="delAbs" style="width: 111px"
  169. >移除<i class="el-icon-caret-left"></i>
  170. </el-button>
  171. </div>
  172. <!-- <div style="margin-top: 18px">
  173. <el-button @click="allclear" style="width:100%;"
  174. >全移去<i class="el-icon-caret-left"></i
  175. ><i class="el-icon-caret-left"></i>
  176. </el-button>
  177. </div> -->
  178. </div>
  179. <div class="mainleftbox">
  180. <!-- <div class="weixuan">已选项目</div>
  181. <div
  182. v-for="(item, index) in rightdata"
  183. :key="index"
  184. @click="rightindex(item, index)"
  185. @dblclick="rightdelite(item, index)"
  186. :class="nums === index ? 'activetext' : ''"
  187. >
  188. <div>{{ item.displayName }}</div>
  189. </div> -->
  190. <el-table :data="rightdata" height="400" width="100%" @row-dblclick="removeAbs"
  191. @selection-change="selecteditems" size="small">
  192. <el-table-column type="selection" align="center" />
  193. <el-table-column label="已选项目" prop="displayName" />
  194. </el-table>
  195. </div>
  196. </div>
  197. <div class="confirmcancellation">
  198. <el-button type="" :disabled="isdislob" @click="Onsubmit">确定</el-button>
  199. <el-button type="" :disabled="isdislob">取消</el-button>
  200. </div>
  201. </el-tab-pane>
  202. <!-- 指引单信息 -->
  203. <el-tab-pane label="指引信息" name="second">
  204. <div style="display: flex; width: 100%">
  205. <div style="width: 90%">
  206. <el-table
  207. :data="guidanceinformationdata"
  208. style="width: 100%"
  209. highlight-current-row
  210. @row-click="guiderow"
  211. >
  212. <el-table-column prop="guide" label="指引信息" width="180">
  213. </el-table-column>
  214. <el-table-column prop="forSexId" label="性别" width="180">
  215. </el-table-column>
  216. <el-table-column prop="address" label="地址">
  217. </el-table-column>
  218. </el-table>
  219. </div>
  220. <div>
  221. <el-button
  222. type=""
  223. @click="createabulletbox"
  224. style="margin-top: 50px; margin-left: 30px"
  225. class="commonbutton"
  226. >创建</el-button
  227. >
  228. <div style="margin-top: 10px; margin-left: 30px">
  229. <el-button
  230. type=""
  231. @click="deleteguidelines"
  232. class="commonbutton"
  233. >删除</el-button
  234. >
  235. </div>
  236. </div>
  237. </div>
  238. <!-- 科室改为体检中心 -->
  239. </el-tab-pane>
  240. </el-tabs>
  241. </div>
  242. </div>
  243. </el-card>
  244. </div>
  245. <!-- 新增或者编辑弹框 -->
  246. <el-dialog
  247. :title="title == 1 ? '新增' : '编辑'"
  248. :visible.sync="dialogVisible"
  249. width="70%"
  250. @close="bindidclose"
  251. :close-on-click-modal="false"
  252. >
  253. <el-form
  254. :model="form"
  255. :rules="rules"
  256. ref="ruleForm"
  257. label-width="100px"
  258. >
  259. <el-row>
  260. <el-col :span="10">
  261. <el-form-item label="项目编号" prop="">
  262. <el-input v-model="form.id" :disabled="true"></el-input>
  263. </el-form-item>
  264. </el-col>
  265. <el-col :span="6">
  266. <el-form-item label="项目类别" prop="itemTypeId">
  267. <el-select v-model="form.itemTypeId" placeholder="请选择">
  268. <el-option
  269. v-for="item in itemTypeId"
  270. :key="item.id"
  271. :label="item.displayName"
  272. :value="item.id"
  273. >
  274. </el-option>
  275. </el-select>
  276. </el-form-item>
  277. </el-col>
  278. <el-col :span="8">
  279. <el-form-item label="名称" prop="displayName">
  280. <el-input
  281. v-model="form.displayName"
  282. ref="refinput"
  283. ></el-input>
  284. </el-form-item>
  285. </el-col>
  286. <el-col :span="8">
  287. <el-form-item label="简称" prop="shortName">
  288. <el-input v-model="form.shortName"></el-input>
  289. </el-form-item>
  290. </el-col>
  291. <el-col :span="8">
  292. <el-form-item label="适用性别" prop="forSexId">
  293. <el-select v-model="form.forSexId" placeholder="请选择">
  294. <el-option
  295. v-for="item in forSexId"
  296. :key="item.id"
  297. :label="item.displayName"
  298. :value="item.id"
  299. >
  300. </el-option>
  301. </el-select>
  302. </el-form-item>
  303. </el-col>
  304. <el-col :span="8">
  305. <el-form-item label="价格" prop="price">
  306. <el-input v-model="form.price" type="number"></el-input>
  307. </el-form-item>
  308. </el-col>
  309. <el-col :span="8">
  310. <el-form-item label="仪器类别" prop="deviceTypeId">
  311. <el-select v-model="form.deviceTypeId" placeholder="请选择">
  312. <el-option
  313. v-for="item in deviceTypeId"
  314. :key="item.id"
  315. :label="item.displayName"
  316. :value="item.id"
  317. >
  318. </el-option>
  319. </el-select>
  320. </el-form-item>
  321. </el-col>
  322. <el-col :span="8">
  323. <el-form-item label="发票类别" prop="invoiceItemTypeId">
  324. <el-select
  325. v-model="form.invoiceItemTypeId"
  326. placeholder="请选择"
  327. >
  328. <el-option
  329. v-for="item in invoiceItemTypeId"
  330. :key="item.id"
  331. :label="item.displayName"
  332. :value="item.id"
  333. >
  334. </el-option>
  335. </el-select>
  336. </el-form-item>
  337. </el-col>
  338. <el-col :span="4">
  339. <el-form-item
  340. label="项目结果合并"
  341. prop="isItemResultMerger"
  342. label-width="110px"
  343. >
  344. <!-- <el-select
  345. v-model="form.isItemResultMerger"
  346. placeholder="请选择"
  347. >
  348. <el-option
  349. v-for="item in isItemResultMerger"
  350. :key="item.value"
  351. :label="item.label"
  352. :value="item.value"
  353. >
  354. </el-option>
  355. </el-select> -->
  356. <el-checkbox v-model="form.isItemResultMergerBox" @change="changeBox('isItemResultMerger')"/>
  357. </el-form-item>
  358. </el-col>
  359. <el-col :span="4">
  360. <el-form-item label="餐前项目" prop="isBeforeEat">
  361. <!-- <el-select v-model="form.isBeforeEat" placeholder="请选择">
  362. <el-option
  363. v-for="item in isBeforeEat"
  364. :key="item.value"
  365. :label="item.label"
  366. :value="item.value"
  367. >
  368. </el-option>
  369. </el-select> -->
  370. <el-checkbox v-model="form.isBeforeEatBox" @change="changeBox('isBeforeEat')"/>
  371. </el-form-item>
  372. </el-col>
  373. <el-col :span="24">
  374. <el-form-item label="临床意义" prop="">
  375. <el-input v-model="form.clinicalMeaning" type="textarea" :autosize="{ minRows: 2, maxRows: 2}"/>
  376. </el-form-item>
  377. </el-col>
  378. <el-col :span="24">
  379. <el-form-item label="默认结果" prop="" class="my-el-form-item">
  380. <!-- <el-input v-model="form.defaultResult"></el-input> -->
  381. <div style="display: flex;justify-content: center;">
  382. <el-input v-model="form.defaultResult" type="textarea" :autosize="{ minRows: 1, maxRows: 1}"/>
  383. <el-select
  384. v-model="form.defaultResult"
  385. style="width: 40px;"
  386. class="downText"
  387. >
  388. <el-option
  389. v-for="item in defaultResult"
  390. :key="item.value"
  391. :label="item.label"
  392. :value="item.label"
  393. >
  394. </el-option>
  395. </el-select>
  396. </div>
  397. </el-form-item>
  398. </el-col>
  399. <el-col :span="4">
  400. <el-form-item label="启用诊断" prop="isDiagnosisFunction">
  401. <!-- <el-select
  402. v-model="form.isDiagnosisFunction"
  403. placeholder="请选择"
  404. >
  405. <el-option
  406. v-for="item in isDiagnosisFunction"
  407. :key="item.value"
  408. :label="item.label"
  409. :value="item.value"
  410. >
  411. </el-option>
  412. </el-select> -->
  413. <el-checkbox v-model="form.isDiagnosisFunctionBox" @change="changeBox('isDiagnosisFunction')"/>
  414. </el-form-item>
  415. </el-col>
  416. <el-col :span="8">
  417. <el-form-item label="诊断函数" prop="diagnosisFunction">
  418. <el-input
  419. v-model="form.diagnosisFunction"
  420. :disabled="disableddiagnosisFunction"
  421. >
  422. <el-button slot="append" icon="el-icon-more" v-if="form.isDiagnosisFunctionBox" @click="diagnosisFunctionBox=true"></el-button>
  423. </el-input>
  424. </el-form-item>
  425. </el-col>
  426. <el-col :span="4">
  427. <el-form-item
  428. label="函数处理完毕"
  429. prop="isContinueProcess"
  430. label-width="110px"
  431. >
  432. <!-- <el-select
  433. v-model="form.isContinueProcess"
  434. placeholder="请选择"
  435. >
  436. <el-option
  437. v-for="item in isContinueProcess"
  438. :key="item.value"
  439. :label="item.label"
  440. :value="item.value"
  441. >
  442. </el-option>
  443. </el-select> -->
  444. <el-checkbox v-model="form.isContinueProcessBox" @change="changeBox('isContinueProcess')"/>
  445. </el-form-item>
  446. </el-col>
  447. <el-col :span="8">
  448. <el-form-item label="候诊时间" prop="queueTime">
  449. <el-input v-model="form.queueTime" type="nember"></el-input>
  450. </el-form-item>
  451. </el-col>
  452. <el-col :span="4">
  453. <el-form-item label="体检报告" prop="isPictureRotate">
  454. <!-- <el-select
  455. v-model="form.isPictureRotate"
  456. placeholder="请选择"
  457. >
  458. <el-option
  459. v-for="item in isPictureRotate"
  460. :key="item.value"
  461. :label="item.label"
  462. :value="item.value"
  463. >
  464. </el-option>
  465. </el-select> -->
  466. <el-checkbox v-model="form.isPictureRotateBox" @change="changeBox('isPictureRotate')"/>
  467. </el-form-item>
  468. </el-col>
  469. <el-col :span="4">
  470. <el-form-item label="检查项目" prop="isCheck">
  471. <!-- <el-select v-model="form.isCheck" placeholder="请选择">
  472. <el-option
  473. v-for="item in isCheck"
  474. :key="item.value"
  475. :label="item.label"
  476. :value="item.value"
  477. >
  478. </el-option>
  479. </el-select> -->
  480. <el-checkbox v-model="form.isCheckBox" @change="changeBox('isCheck')"/>
  481. </el-form-item>
  482. </el-col>
  483. <el-col :span="4">
  484. <el-form-item label="启用" prop="isActive">
  485. <!-- <el-select v-model="form.isActive" placeholder="请选择">
  486. <el-option
  487. v-for="item in isActive"
  488. :key="item.value"
  489. :label="item.label"
  490. :value="item.value"
  491. >
  492. </el-option>
  493. </el-select> -->
  494. <el-checkbox v-model="form.isActiveBox" @change="changeBox('isActive')"/>
  495. </el-form-item>
  496. </el-col>
  497. </el-row>
  498. <el-divider></el-divider>
  499. <el-row>
  500. <el-col :span="5">
  501. <el-form-item label="创建者">
  502. <el-input v-model="form.creatorName" disabled></el-input>
  503. </el-form-item>
  504. </el-col>
  505. <el-col :span="7">
  506. <el-form-item label="创建时间" style="margin-left: -5%">
  507. <el-input
  508. :value="form.creationTime | dateFormat"
  509. disabled
  510. style="width: 90%"
  511. ></el-input>
  512. </el-form-item>
  513. </el-col>
  514. <el-col :span="5">
  515. <el-form-item label="修改者" style="margin-left: -25%">
  516. <el-input v-model="form.creatorName" disabled></el-input>
  517. </el-form-item>
  518. </el-col>
  519. <el-col :span="7">
  520. <el-form-item label="修改时间" style="margin-left: -5%">
  521. <el-input
  522. :value="form.lastModificationTime | dateFormat"
  523. disabled
  524. style="width: 90%"
  525. ></el-input>
  526. </el-form-item>
  527. </el-col>
  528. </el-row>
  529. </el-form>
  530. <span slot="footer" class="dialog-footer">
  531. <el-button @click="dialogVisible = false"> </el-button>
  532. <el-button type="primary" @click="addoredit"> </el-button>
  533. </span>
  534. </el-dialog>
  535. <!-- 指引信息新增修改弹框 -->
  536. <el-dialog
  537. :title="guidetitle == 1 ? '指引信息新增' : '指引信息修改'"
  538. :visible.sync="guidetitledialogVisible"
  539. width="50%"
  540. >
  541. <el-row>
  542. <el-form
  543. :model="guideform"
  544. :rules="guiderules"
  545. ref="ruleForms"
  546. label-width="100px"
  547. class="demo-ruleForm"
  548. >
  549. <el-col :span="12">
  550. <el-form-item label="体检中心" prop="organizationUnitId">
  551. <el-select
  552. v-model="guideform.organizationUnitId"
  553. placeholder="请选择"
  554. >
  555. <el-option
  556. v-for="item in organizationUnitdata"
  557. :key="item.id"
  558. :label="item.displayName"
  559. :value="item.id"
  560. >
  561. </el-option>
  562. </el-select>
  563. </el-form-item>
  564. </el-col>
  565. <el-col :span="12">
  566. <el-form-item label="组合项目" prop="asbitemId">
  567. <el-select v-model="guideform.asbitemId" placeholder="请选择">
  568. <el-option
  569. v-for="item in asbitemdata"
  570. :key="item.id"
  571. :label="item.displayName"
  572. :value="item.id"
  573. >
  574. </el-option>
  575. </el-select>
  576. </el-form-item>
  577. </el-col>
  578. <el-col :span="12">
  579. <el-form-item label="适用性别" prop="forSexId">
  580. <el-select v-model="guideform.forSexId" placeholder="请选择">
  581. <el-option
  582. v-for="item in forsexdata"
  583. :key="item.id"
  584. :label="item.displayName"
  585. :value="item.id"
  586. >
  587. </el-option>
  588. </el-select>
  589. </el-form-item>
  590. </el-col>
  591. <el-col :span="12">
  592. <el-form-item label="指引内容" prop="guide">
  593. <el-input
  594. v-model="guideform.guide"
  595. placeholder="请输入内容"
  596. style="width: 60%"
  597. ></el-input>
  598. </el-form-item>
  599. </el-col>
  600. </el-form>
  601. </el-row>
  602. <span slot="footer" class="dialog-footer">
  603. <el-button @click="guidetitledialogVisible = false"> </el-button>
  604. <el-button type="primary" @click="determineguidelines"> </el-button>
  605. </span>
  606. </el-dialog>
  607. <!-- 诊断函数弹框 -->
  608. <el-dialog
  609. title="诊断函数设置"
  610. :visible.sync="diagnosisFunctionBox"
  611. width="50%"
  612. :close-on-click-modal="false"
  613. >
  614. <el-form label-width="110px">
  615. <el-row>
  616. <el-col :span="24">
  617. <el-form-item label="诊断函数">
  618. <el-input type="textarea" v-model="diagnosisFunctionText"></el-input>
  619. </el-form-item>
  620. </el-col>
  621. </el-row>
  622. </el-form>
  623. <span slot="footer" class="dialog-footer">
  624. <el-button @click="diagnosisFunctionBox = false,diagnosisFunctionText=''"> </el-button>
  625. <el-button type="primary" @click="OnsubmitDiagnosis"> </el-button>
  626. </span>
  627. </el-dialog>
  628. <!-- 按钮区域 -->
  629. <div style="margin-left: 10px; margin-top: 5%">
  630. <el-button type="" @click="addll" class="commonbutton">新增</el-button>
  631. <div style="margin-top: 10px">
  632. <el-button type="" @click="editpopup" class="commonbutton"
  633. >编辑</el-button
  634. >
  635. </div>
  636. <div style="margin-top: 10px">
  637. <el-button type="" @click="deleteid" class="commonbutton"
  638. >删除</el-button
  639. >
  640. </div>
  641. <div style="margin-top: 10px">
  642. <el-button type="" @click="topping" class="commonbutton"
  643. >置顶</el-button
  644. >
  645. </div>
  646. <div style="margin-top: 10px">
  647. <el-button type="" @click="setlow" class="commonbutton">置底</el-button>
  648. </div>
  649. <div style="margin-top: 10px">
  650. <el-button
  651. type=""
  652. :disabled="isshow"
  653. @click="assertion"
  654. class="commonbutton"
  655. >排序</el-button
  656. >
  657. </div>
  658. <div style="margin-top: 10px">
  659. <el-button
  660. type=""
  661. :disabled="isshow"
  662. @click="cancellation"
  663. class="commonbutton"
  664. >取消</el-button
  665. >
  666. </div>
  667. </div>
  668. </div>
  669. </template>
  670. <script>
  671. import { mapState } from "vuex";
  672. import Sortable from "sortablejs";
  673. import { getapi, postapi, deletapi } from "@/api/api";
  674. import { examinationgender, instrumentlist } from "@/request/systemapi";
  675. import {
  676. getporjectlists
  677. } from "@/request/commonapi";
  678. import { deepCopy,objCopy} from "../../utlis/proFunc";
  679. import {
  680. groupsandlist,
  681. projectlist,
  682. invoicetypelist,
  683. newcombination,
  684. asbitemgetid,
  685. updateombination,
  686. samplesetlow,
  687. deletescombinationprojectid,
  688. combination,
  689. } from "@/request/commonapi";
  690. export default {
  691. data() {
  692. return {
  693. guiderules: {
  694. organizationUnitId: [
  695. {
  696. required: true,
  697. message: "请选择体检单位",
  698. trigger: "change",
  699. },
  700. ],
  701. asbitemId: [
  702. {
  703. required: true,
  704. message: "请选择组合项目",
  705. trigger: "change",
  706. },
  707. ],
  708. forSexId: [
  709. {
  710. required: true,
  711. message: "请选择组适用性别",
  712. trigger: "change",
  713. },
  714. ],
  715. guide: [{ required: true, message: "请输入指引内容", trigger: "blur" }],
  716. },
  717. guidetitle: 1,
  718. guideform: {
  719. organizationUnitId: "",
  720. asbitemId: "",
  721. forSexId: "",
  722. guide: "",
  723. }, //指引信息的数据对象
  724. organizationUnitdata: [], //体检中心
  725. guidetitledialogVisible: false,
  726. guidanceinformationdata: [],
  727. activeName: "first",
  728. isdislob: true,
  729. filetelists: [],
  730. flitvalues: [],
  731. num: 0,
  732. isshow: true,
  733. values: [],
  734. projectid: [],
  735. initprojectid:[],
  736. rules: {
  737. displayName: [
  738. { required: true, message: "请输入名称", trigger: "blur" },
  739. ],
  740. shortName: [{ required: true, message: "请输入简称", trigger: "blur" }],
  741. forSexId: [
  742. { required: true, message: "请选择适用性别", trigger: "blur" },
  743. ],
  744. itemTypeId: [
  745. { required: true, message: "请选择项目类别", trigger: "blur" },
  746. ],
  747. price: [{ required: true, message: "请输入价格", trigger: "blur" }],
  748. deviceTypeId: [
  749. { required: true, message: "请选择仪器类别", trigger: "blur" },
  750. ],
  751. invoiceItemTypeId: [
  752. { required: true, message: "请选择发票类别", trigger: "blur" },
  753. ],
  754. isItemResultMerger: [
  755. { required: true, message: "请选择项目结果", trigger: "blur" },
  756. ],
  757. isBeforeEat: [
  758. { required: true, message: "请选择餐前项目", trigger: "change" },
  759. ],
  760. clinicalMeaning: [
  761. { required: true, message: "请输入临床意义", trigger: "blur" },
  762. ],
  763. defaultResult: [
  764. { required: true, message: "请输入默认结果", trigger: "blur" },
  765. ],
  766. queueTime: [
  767. { required: true, message: "请输入候诊时间", trigger: "blur" },
  768. ],
  769. isDiagnosisFunction: [
  770. { required: true, message: "请选择启用诊断函数", trigger: "blur" },
  771. ],
  772. diagnosisFunction: [
  773. { required: true, message: "请输入诊断函数", trigger: "blur" },
  774. ],
  775. isContinueProcess: [
  776. {
  777. required: true,
  778. message: "请选择诊断函数处理完毕后继续处理",
  779. trigger: "blur",
  780. },
  781. ],
  782. isPictureRotate: [
  783. { required: true, message: "请选择体检报告图片旋", trigger: "blur" },
  784. ],
  785. isCheck: [
  786. { required: true, message: "请选择是检查项目", trigger: "blur" },
  787. ],
  788. isActive: [
  789. { required: true, message: "请选择是否启用", trigger: "blur" },
  790. ],
  791. }, //表单校验对象
  792. form: {
  793. displayName: "",
  794. shortName: "",
  795. forSexId: "",
  796. itemTypeId: "",
  797. price: "",
  798. deviceTypeId: "",
  799. invoiceItemTypeId: "",
  800. isItemResultMerger: "",
  801. isBeforeEat: "",
  802. clinicalMeaning: "",
  803. defaultResult: "",
  804. queueTime: "",
  805. isDiagnosisFunction: "",
  806. diagnosisFunction: "",
  807. isContinueProcess: "",
  808. isPictureRotate: "",
  809. isCheck: "",
  810. isActive: "",
  811. isActiveBox:true,
  812. isBeforeEatBox:false,
  813. isCheckBox:false,
  814. isContinueProcessBox:false,
  815. isDiagnosisFunctionBox:false,
  816. isItemResultMergerBox:false,
  817. isPictureRotateBox:false
  818. },
  819. forSexId: [], //性别
  820. itemTypeId: [], //项目类别
  821. deviceTypeId: [], //仪器类别
  822. invoiceItemTypeId: [], //发票类别
  823. isItemResultMerger: [
  824. {
  825. value: "Y",
  826. label: "是",
  827. },
  828. {
  829. value: "N",
  830. label: "否",
  831. },
  832. ], //项目结果合并
  833. isBeforeEat: [
  834. {
  835. value: "Y",
  836. label: "是",
  837. },
  838. {
  839. value: "N",
  840. label: "否",
  841. },
  842. ], //餐前项目
  843. isDiagnosisFunction: [
  844. {
  845. value: "Y",
  846. label: "是",
  847. },
  848. {
  849. value: "N",
  850. label: "否",
  851. },
  852. ], //启用诊断函数
  853. isContinueProcess: [
  854. {
  855. value: "Y",
  856. label: "是",
  857. },
  858. {
  859. value: "N",
  860. label: "否",
  861. },
  862. ], //诊断函数处理完毕
  863. isContinueProcess: [
  864. {
  865. value: "Y",
  866. label: "是",
  867. },
  868. {
  869. value: "N",
  870. label: "否",
  871. },
  872. ], //诊断函数处理完毕后继续处理
  873. isPictureRotate: [
  874. {
  875. value: "Y",
  876. label: "是",
  877. },
  878. {
  879. value: "N",
  880. label: "否",
  881. },
  882. ], //体检报告图片旋转
  883. isCheck: [
  884. {
  885. value: "Y",
  886. label: "是",
  887. },
  888. {
  889. value: "N",
  890. label: "否",
  891. },
  892. ], //是检查项目
  893. isActive: [
  894. {
  895. value: "Y",
  896. label: "是",
  897. },
  898. {
  899. value: "N",
  900. label: "否",
  901. },
  902. ], //是否启用
  903. title: 1,
  904. dialogVisible: false,
  905. isshow: true,
  906. tableHeight: window.innerHeight - 180, //表格动态高度
  907. screenHeight: window.innerHeight, //内容区域高度
  908. pages: {
  909. Filter: "",
  910. SkipCount: 0,
  911. MaxResultCount: 100,
  912. Sorting: "displayOrder desc",
  913. },
  914. tableData: [],
  915. initTableData: [],
  916. leftdata: [],
  917. ary2: [],
  918. ary1: [],
  919. rightobj: {},
  920. rightdata: [],
  921. rightobj: {},
  922. nums: 0,
  923. itemid: "", //项目id
  924. curRow: {},
  925. asbitemdata: [], //组合项目
  926. forsexdata: [], //适用性别
  927. department:"",
  928. quckDepartment:[],
  929. treeprops: {
  930. label: "displayName",
  931. value: "id",
  932. children: "treeChildren",
  933. },
  934. defaultResult: [
  935. {
  936. value: "1",
  937. label: "未见异常",
  938. },
  939. {
  940. value: "2",
  941. label: "正常",
  942. },
  943. {
  944. value: "3",
  945. label: "阴性",
  946. },
  947. {
  948. value: "4",
  949. label: "无",
  950. },
  951. {
  952. value: "5",
  953. label: "(—)",
  954. },
  955. {
  956. value: "6",
  957. label: "­-",
  958. },
  959. ],
  960. diagnosisFunctionBox:false,
  961. diagnosisFunctionText:"",
  962. disableddiagnosisFunction:true,
  963. initfiletelists:[]
  964. };
  965. },
  966. created() {
  967. this.getlist();
  968. this.gitprojectcategory();
  969. },
  970. mounted() {
  971. this.rowDrop();
  972. this.gitfleslist();
  973. this.getobtainguidance();
  974. this.typeid()
  975. },
  976. computed: {
  977. ...mapState(["window"]),
  978. },
  979. methods: {
  980. remoteMethods(keyWords) {
  981. if (keyWords) {
  982. this.filetelists = [];
  983. this.initfiletelists.forEach(item => {
  984. if (item.displayName.toLowerCase().indexOf(keyWords.toLowerCase()) > - 1
  985. || item.simpleCode.toLowerCase().indexOf(keyWords.toLowerCase()) > - 1
  986. // || item.shortName.toLowerCase().indexOf(keyWords.toLowerCase()) > - 1
  987. ) {
  988. this.filetelists.push(item);
  989. }
  990. });
  991. } else {
  992. this.filetelists = deepCopy(this.initfiletelists);
  993. }
  994. },
  995. remoteMethod(keyWords) {
  996. if (keyWords) {
  997. this.projectid = [];
  998. this.initprojectid.forEach(item => {
  999. if (item.displayName.toLowerCase().indexOf(keyWords.toLowerCase()) > - 1
  1000. || item.simpleCode.toLowerCase().indexOf(keyWords.toLowerCase()) > - 1
  1001. // || item.shortName.toLowerCase().indexOf(keyWords.toLowerCase()) > - 1
  1002. ) {
  1003. this.projectid.push(item);
  1004. }
  1005. });
  1006. } else {
  1007. this.projectid = deepCopy(this.initprojectid);
  1008. }
  1009. },
  1010. OnsubmitDiagnosis(){
  1011. this.form.diagnosisFunction=this.diagnosisFunctionText
  1012. this.diagnosisFunctionText=''
  1013. this.diagnosisFunctionBox=false
  1014. this.$message.success("设置诊断函数成功");
  1015. },
  1016. changeBox(type) {
  1017. //赋值
  1018. if(this.form[type+'Box']){
  1019. this.$delete(this.form,type)
  1020. this.$set(this.form,type,"Y")
  1021. }else{
  1022. this.$delete(this.form,type)
  1023. this.$set(this.form,type,"N")
  1024. }
  1025. },
  1026. typeid() {
  1027. projectlist().then((res) => {
  1028. this.itemTypeId = res.data;
  1029. });
  1030. },
  1031. treeclick(data) {
  1032. getapi(`/api/app/asbitem/in-item-type/${data.id}`).then((res) => {
  1033. this.tableData = res.data;
  1034. console.log(res.data, "ress");
  1035. // this.getlist();
  1036. });
  1037. },
  1038. remoteMethodes(keyWords) {
  1039. if (keyWords) {
  1040. this.quckDepartment = [];
  1041. this.initTableData.forEach(item => {
  1042. if (item.displayName.toLowerCase().indexOf(keyWords.toLowerCase()) > - 1
  1043. || item.simpleCode.toLowerCase().indexOf(keyWords.toLowerCase()) > - 1
  1044. // || item.shortName.toLowerCase().indexOf(keyWords.toLowerCase()) > - 1
  1045. ) {
  1046. this.quckDepartment.push(item);
  1047. }
  1048. });
  1049. } else {
  1050. this.quckDepartment = deepCopy(this.initTableData);
  1051. }
  1052. },
  1053. quckDepartments(e){
  1054. if(e){
  1055. let currentKey=""
  1056. this.quckDepartment.forEach(item=>{
  1057. if(e==item.id){
  1058. currentKey=item.itemTypeId
  1059. }
  1060. })
  1061. this.$refs['itemType'].setCurrentKey(currentKey)
  1062. let selected = this.$refs['itemType'].getCurrentNode();
  1063. if (this.$refs['itemType'].getNode(selected) && this.$refs['itemType'].getNode(selected).parent) {
  1064. this.expandParents(this.$refs['itemType'].getNode(selected).parent);
  1065. }
  1066. getapi(`/api/app/asbitem/in-item-type/${currentKey}`).then((res) => {
  1067. this.tableData = res.data;
  1068. this.tableData.forEach((item,index)=>{
  1069. if(e==item.id){
  1070. this.$refs['tableData'].setCurrentRow(item);
  1071. this.rowick(item)
  1072. this.tableScrollToRow(this.$refs.tableData, index)
  1073. }
  1074. })
  1075. });
  1076. }else{
  1077. this.remoteMethodes()
  1078. }
  1079. },
  1080. expandParents(node) {
  1081. node.expanded = true;
  1082. if (node.parent) {
  1083. this.expandParents(node.parent);
  1084. }
  1085. },
  1086. tableScrollToRow(tableElement, rowIndex){
  1087. let theTableRows = tableElement.bodyWrapper.querySelectorAll('.el-table__body tbody .el-table__row')
  1088. let scrollTop = 0
  1089. for (let i = 0; i < theTableRows.length; i++) {
  1090. if (i === rowIndex) {
  1091. break
  1092. }
  1093. scrollTop += theTableRows[i].offsetHeight
  1094. }
  1095. tableElement.bodyWrapper.scrollTop = scrollTop
  1096. },
  1097. guiderow(row) {
  1098. this.guideform = row;
  1099. },
  1100. //指引信息删除
  1101. deleteguidelines() {
  1102. console.log(this.guideform.asbitemId);
  1103. if (this.guideform.asbitemId == "") {
  1104. this.$message.warning("请选择删除的数据");
  1105. } else {
  1106. deletapi(
  1107. `/api/app/asbitem-guide?OrganizationUnitId=${this.guideform.organizationUnitId}&AsbitemId=${this.guideform.AsbitemId}&ForSexId=${this.guideform.forSexId}`
  1108. ).then((res) => {
  1109. this.$message.warning(res.message);
  1110. console.log(res);
  1111. });
  1112. console.log(this.guideform);
  1113. }
  1114. },
  1115. //确定新增或者修改指引ruleForm
  1116. determineguidelines() {
  1117. this.$refs.ruleForms.validate((v) => {
  1118. if (v) {
  1119. postapi("/api/app/asbitem-guide", this.guideform).then((res) => {
  1120. // if (res.code == 1) {
  1121. this.guidetitledialogVisible = false;
  1122. this.getobtainguidance();
  1123. this.$message.success("创建成功");
  1124. // }
  1125. });
  1126. }
  1127. });
  1128. },
  1129. //新增或者编辑需要的api中的id
  1130. publicapi() {
  1131. //获取体检中心
  1132. getapi("/api/app/organization-units/by-code-all").then((res) => {
  1133. this.organizationUnitdata = res.data;
  1134. });
  1135. //获取组合项目
  1136. getapi("/api/app/asbitem/in-filter").then((res) => {
  1137. this.asbitemdata = res.data.items;
  1138. });
  1139. //获取适用性别
  1140. getapi("/api/app/for-sex").then((res) => {
  1141. this.forsexdata = res.data;
  1142. });
  1143. },
  1144. //创建弹框
  1145. createabulletbox() {
  1146. this.guidetitledialogVisible = true;
  1147. this.guideform = {};
  1148. this.guidetitle = 1;
  1149. this.publicapi();
  1150. },
  1151. //获取指引信息guidanceinformationdata
  1152. getobtainguidance() {
  1153. getapi("/api/app/asbitem-guide").then((res) => {
  1154. this.guidanceinformationdata = res.data;
  1155. console.log(res, "指引信息");
  1156. });
  1157. },
  1158. //获取项目
  1159. gitfleslist() {
  1160. let pages={
  1161. Filter: "",
  1162. Sorting: "",
  1163. SkipCount: 0,
  1164. MaxResultCount: 100
  1165. }
  1166. getporjectlists(pages).then((res) => {
  1167. this.filetelists = res.data.items;
  1168. this.initfiletelists=[...res.data.items]
  1169. });
  1170. },
  1171. //搜索选择
  1172. selectitem(v) {
  1173. console.log(v)
  1174. this.itemid = v.id;
  1175. this.rightdata.forEach((item) => {
  1176. if (v.id = item.id) {
  1177. this.$message.warning("已有该项目");
  1178. } else {
  1179. this.rightdata.push({ displayName: v.displayName,id:v.id });
  1180. }
  1181. });
  1182. },
  1183. Onsubmit() {
  1184. let sampleGroupId = this.form.id;
  1185. let sdate = [];
  1186. // let sss = { itemId: this.itemid, asbitemId: sampleGroupId };
  1187. // sdate.push(sss);
  1188. this.rightdata.forEach((element) => {
  1189. sdate.push({ asbitemId: sampleGroupId, itemId: element.id });
  1190. });
  1191. // this.leftdata.forEach((element) => {
  1192. // sdate.push({ asbitemId: sampleGroupId, itemId: element.id });
  1193. // });
  1194. // this.leftdata.forEach((element) => {
  1195. // let sss = { sampleGroupId: sampleGroupId, asbitemId: element.id };
  1196. // sdate.push(sss);
  1197. // });
  1198. // sdate.push(sss);
  1199. postapi("/api/app/asbitem-detail/many", sdate).then((res) => {
  1200. if (res.code!=-1) {
  1201. this.$message.success("操作成功");
  1202. this.isdislob = true;
  1203. }
  1204. });
  1205. // console.log(sdate);
  1206. // if (sampleGroupId == undefined) {
  1207. // this.$message.warning("请选择列表");
  1208. // } else if (this.itemid == "") {
  1209. // this.$message.warning("请选择项目");
  1210. // } else {
  1211. // postapi("/api/app/asbitem-detail/many", sdate).then((res) => {
  1212. // this.$message.success("操作成功");
  1213. // this.isdislob = true;
  1214. // });
  1215. // }
  1216. },
  1217. dbClickChoosedAsb(row, column, event){
  1218. let index = this.leftdata.findIndex((arr) => arr.id == row.id);
  1219. this.leftdata.splice(index, 1);
  1220. this.rightdata.push(row);
  1221. this.isdislob = false;
  1222. },
  1223. handleSelectionChange(val){
  1224. this.ary1=val
  1225. },
  1226. addAbs(){
  1227. if(this.ary1.length<1){
  1228. this.$message.warning('请选择要添加的项目')
  1229. }else{
  1230. let temporaryLeft=[]
  1231. temporaryLeft = this.leftdata.filter(item => !this.ary1.some(ele=>ele.id === item.id));
  1232. this.leftdata=[...temporaryLeft]
  1233. this.ary1.forEach(item=>{
  1234. this.rightdata.push(item);
  1235. })
  1236. this.isdislob = false;
  1237. }
  1238. },
  1239. removeAbs(row){
  1240. let index = this.rightdata.findIndex((arr) => arr.id == row.id);
  1241. this.rightdata.splice(index, 1);
  1242. this.leftdata.push(row);
  1243. this.isdislob = false;
  1244. },
  1245. selecteditems(val){
  1246. this.ary2=val
  1247. },
  1248. delAbs(){
  1249. if(this.ary2.length<1){
  1250. this.$message.warning('请选择要移除的项目')
  1251. }else{
  1252. let temporaryRight=[]
  1253. temporaryRight = this.rightdata.filter(item => !this.ary2.some(ele=>ele.id === item.id));
  1254. this.rightdata=[...temporaryRight]
  1255. this.ary2.forEach(item=>{
  1256. this.leftdata.push(item);
  1257. })
  1258. this.isdislob = false;
  1259. }
  1260. },
  1261. //右侧双击移动删除
  1262. rightdelite(item, index) {
  1263. this.isdislob = false;
  1264. this.rightdata.splice(index, 1);
  1265. this.leftdata.push(item);
  1266. // this.updatedate();
  1267. },
  1268. //右侧点击选中
  1269. rightindex(item, index) {
  1270. this.nums = index;
  1271. this.leftobj = item;
  1272. // console.log(this.leftobj);
  1273. },
  1274. //左侧添加按钮
  1275. addobj() {
  1276. if (this.leftdata.length > 0) {
  1277. this.leftdata.splice(this.num, 1);
  1278. this.rightdata.push(this.rightobj);
  1279. this.isdislob = false;
  1280. }
  1281. },
  1282. //右移动
  1283. removeright() {
  1284. if (this.rightdata.length > 0) {
  1285. this.rightdata.splice(this.num, 1);
  1286. this.leftdata.push(this.leftobj);
  1287. this.isdislob = false;
  1288. // this.isdislob=false
  1289. this.updatedate();
  1290. }
  1291. },
  1292. //q全移去
  1293. allclear() {
  1294. this.isdislob = false;
  1295. if (this.rightdata.length > 0) {
  1296. this.ary1 = this.rightdata;
  1297. this.ary2 = this.leftdata;
  1298. this.updatedate();
  1299. this.rightdata = [];
  1300. }
  1301. },
  1302. //全添加
  1303. addall() {
  1304. this.isdislob = false;
  1305. if (this.leftdata.length > 0) {
  1306. this.ary1 = this.leftdata;
  1307. this.ary2 = this.rightdata;
  1308. this.updatedate();
  1309. this.leftdata = [];
  1310. }
  1311. },
  1312. //左侧双击事件
  1313. shuanji(item, index) {
  1314. console.log(item);
  1315. this.leftdata.splice(index, 1);
  1316. this.rightdata.push(item);
  1317. this.isdislob = false;
  1318. },
  1319. clickPaixu(item, index) {
  1320. this.rightobj = item;
  1321. this.num = index;
  1322. console.log(this.num);
  1323. },
  1324. //获取项目类别 3a0b0b10-719f-5824-6956-8cb70f204013 /api/app/item-type/by-code-all
  1325. gitprojectcategory() {
  1326. getapi("/api/app/item-type/by-code-all").then((res) => {
  1327. this.projectid = res.data;
  1328. this.initprojectid=[...res.data]
  1329. });
  1330. },
  1331. //ary1 需要追加的数据 ary2目标数组
  1332. updatedate() {
  1333. this.ary1.forEach((item) => {
  1334. let iscz = false;
  1335. this.ary2.forEach((item2) => {
  1336. if (item2.id == item.id) {
  1337. iscz = true;
  1338. }
  1339. });
  1340. if (!iscz) {
  1341. console.log(item.id);
  1342. this.ary2.push(item);
  1343. // this.allid.push({ id: item.id });
  1344. }
  1345. });
  1346. },
  1347. //项目类别选择
  1348. ischangs(v) {
  1349. console.log(v);
  1350. //`/api/app/diagnosis/in-item-type/${v}`3a0c50b9-9621-61b7-fc93-1cfab1ec0478
  1351. if(v){
  1352. getapi(`/api/app/item/in-item-type/${v}`).then((res) => {
  1353. console.log(res);
  1354. this.leftdata = res.data;
  1355. });
  1356. }
  1357. },
  1358. bindidclose() {
  1359. this.form = {};
  1360. },
  1361. rowDrop() {
  1362. this.$nextTick(() => {
  1363. const tbody = document.querySelector(".el-table__body-wrapper tbody");
  1364. const _this = this;
  1365. Sortable.create(tbody, {
  1366. handle: ".move",
  1367. animation: 300,
  1368. onChoose({oldIndex}){
  1369. _this.$refs['tableData'].setCurrentRow(_this.tableData[oldIndex]);
  1370. _this.rowick(_this.tableData[oldIndex])
  1371. },
  1372. onEnd({ newIndex, oldIndex }) {
  1373. _this.isshow = false;
  1374. const currRow = _this.tableData.splice(oldIndex, 1)[0];
  1375. _this.tableData.splice(newIndex, 0, currRow);
  1376. _this.tableData.map((item, index) => {
  1377. if (index == newIndex && index == oldIndex) {
  1378. } else if (index == oldIndex) {
  1379. } else if (index == newIndex) {
  1380. }
  1381. });
  1382. console.log(_this.tableData.map((item) => item.displayOrder));
  1383. },
  1384. });
  1385. });
  1386. },
  1387. //取消按钮
  1388. cancellation() {
  1389. this.$message.info("操作取消");
  1390. this.isshow = true;
  1391. this.tableData=this.initTableData
  1392. },
  1393. //确定排序
  1394. assertion() {
  1395. const result = [];
  1396. this.tableData.forEach((item, index) => {
  1397. const currentDisplayOrder = this.initTableData[index].displayOrder;
  1398. if (item.displayOrder != currentDisplayOrder) {
  1399. result.push({ id: item.id, displayOrder: currentDisplayOrder });
  1400. }
  1401. });
  1402. combination({ itemList: result }).then((res) => {
  1403. this.$message.success("操作成功");
  1404. this.isshow = true;
  1405. // this.getlist();
  1406. });
  1407. },
  1408. //置底
  1409. setlow() {
  1410. this.form = { ...this.curRow };
  1411. if (this.form.id == undefined) {
  1412. this.$message.warning("请选择操作的数据");
  1413. } else {
  1414. samplesetlow(this.form.id, 2).then((res) => {
  1415. if(res.code!=-1){
  1416. this.getlist();
  1417. this.$message.success("操作成功");
  1418. }
  1419. });
  1420. }
  1421. },
  1422. //置顶
  1423. topping() {
  1424. this.form = { ...this.curRow };
  1425. if (this.form.id == undefined) {
  1426. this.$message.warning("请选择操作的数据");
  1427. } else {
  1428. samplesetlow(this.form.id, 1).then((res) => {
  1429. if(res.code!=-1){
  1430. this.$message.success("操作成功");
  1431. this.getlist();
  1432. }
  1433. });
  1434. }
  1435. },
  1436. //删除
  1437. deleteid() {
  1438. this.form = { ...this.curRow };
  1439. if (this.form.id == undefined) {
  1440. this.$message.warning("请选择操作的数据");
  1441. } else {
  1442. this.$confirm("是否确认删除, 是否继续?", "提示", {
  1443. confirmButtonText: "确定",
  1444. cancelButtonText: "取消",
  1445. type: "warning",
  1446. }).then(() => {
  1447. deletescombinationprojectid(this.form.id).then((res) => {
  1448. console.log(res);
  1449. if (res.code == 1) {
  1450. this.$message.success("删除成功");
  1451. this.getlist();
  1452. this.form = {};
  1453. }
  1454. });
  1455. });
  1456. // deletescombinationprojectid(this.form.id).then((res) => {
  1457. // this.$message.success("删除成功");
  1458. // this.getlist();
  1459. // });
  1460. }
  1461. },
  1462. //编辑弹框
  1463. editpopup() {
  1464. this.form = { ...this.curRow };
  1465. if (this.form.id == undefined) {
  1466. this.$message.warning("请点击选择操作的数据");
  1467. } else {
  1468. this.dialogVisible = true;
  1469. this.title = 2;
  1470. if (this.$refs.ruleForm !== undefined){
  1471. this.$refs.ruleForm.resetFields()
  1472. }
  1473. asbitemgetid(this.form.id).then((res) => {
  1474. if (res.data.isItemResultMerger == 'Y') {
  1475. this.form.isItemResultMergerBox = true;
  1476. } else {
  1477. this.form.isItemResultMergerBox = false;
  1478. }
  1479. if (res.data.isBeforeEat == 'Y') {
  1480. this.form.isBeforeEatBox = true;
  1481. } else {
  1482. this.form.isBeforeEatBox = false;
  1483. }
  1484. if (res.data.isDiagnosisFunction == 'Y') {
  1485. this.form.isDiagnosisFunctionBox = true;
  1486. } else {
  1487. this.form.isDiagnosisFunctionBox = false;
  1488. }
  1489. if (res.data.isContinueProcess == 'Y') {
  1490. this.form.isContinueProcessBox = true;
  1491. } else {
  1492. this.form.isContinueProcessBox = false;
  1493. }
  1494. if (res.data.isPictureRotate == 'Y') {
  1495. this.form.isPictureRotateBox = true;
  1496. } else {
  1497. this.form.isPictureRotateBox = false;
  1498. }
  1499. if (res.data.isCheck == 'Y') {
  1500. this.form.isCheckBox = true;
  1501. } else {
  1502. this.form.isCheckBox = false;
  1503. }
  1504. if (res.data.isActive == 'Y') {
  1505. this.form.isActiveBox = true;
  1506. } else {
  1507. this.form.isActiveBox = false;
  1508. }
  1509. objCopy(res.data, this.form);
  1510. });
  1511. console.log(this.form)
  1512. //性别
  1513. // examinationgender().then((res) => {
  1514. // this.forSexId = res.data;
  1515. // });
  1516. //适用性别
  1517. getapi("/api/app/for-sex").then((res) => {
  1518. this.forSexId = res.data;
  1519. });
  1520. //项目类别
  1521. projectlist().then((res) => {
  1522. this.itemTypeId = res.data;
  1523. });
  1524. //仪器类别
  1525. instrumentlist().then((res) => {
  1526. this.deviceTypeId = res.data.items;
  1527. console.log(this.deviceTypeId);
  1528. });
  1529. //发票项目类别
  1530. invoicetypelist().then((res) => {
  1531. this.invoiceItemTypeId = res.data.items;
  1532. });
  1533. }
  1534. },
  1535. //确定新增或者编辑
  1536. addoredit() {
  1537. this.$refs.ruleForm.validate((v) => {
  1538. if (v) {
  1539. if (this.title == 1) {
  1540. let obj = {
  1541. displayName: this.form.displayName,
  1542. shortName: this.form.shortName,
  1543. forSexId: this.form.forSexId,
  1544. itemTypeId: this.form.itemTypeId,
  1545. price: Number(this.form.price),
  1546. deviceTypeId: this.form.deviceTypeId,
  1547. invoiceItemTypeId: this.form.invoiceItemTypeId,
  1548. isItemResultMerger: this.form.isItemResultMerger,
  1549. isBeforeEat: this.form.isBeforeEat,
  1550. clinicalMeaning: this.form.clinicalMeaning,
  1551. defaultResult: this.form.defaultResult,
  1552. queueTime: this.form.queueTime,
  1553. isDiagnosisFunction: this.form.isDiagnosisFunction,
  1554. diagnosisFunction: this.form.diagnosisFunction,
  1555. isContinueProcess: this.form.isContinueProcess,
  1556. isPictureRotate: this.form.isPictureRotate,
  1557. isCheck: this.form.isCheck,
  1558. isActive: this.form.isActive,
  1559. };
  1560. newcombination(obj).then((res) => {
  1561. if(res.data!=-1){
  1562. this.$message.success("新增成功");
  1563. this.getlist();
  1564. this.dialogVisible = false;
  1565. }
  1566. });
  1567. } else if (this.title == 2) {
  1568. let obj = {
  1569. displayName: this.form.displayName,
  1570. shortName: this.form.shortName,
  1571. forSexId: this.form.forSexId,
  1572. itemTypeId: this.form.itemTypeId,
  1573. price: Number(this.form.price),
  1574. deviceTypeId: this.form.deviceTypeId,
  1575. invoiceItemTypeId: this.form.invoiceItemTypeId,
  1576. isItemResultMerger: this.form.isItemResultMerger,
  1577. isBeforeEat: this.form.isBeforeEat,
  1578. clinicalMeaning: this.form.clinicalMeaning,
  1579. defaultResult: this.form.defaultResult,
  1580. queueTime: this.form.queueTime,
  1581. isDiagnosisFunction: this.form.isDiagnosisFunction,
  1582. diagnosisFunction: this.form.diagnosisFunction,
  1583. isContinueProcess: this.form.isContinueProcess,
  1584. isPictureRotate: this.form.isPictureRotate,
  1585. isCheck: this.form.isCheck,
  1586. isActive: this.form.isActive,
  1587. };
  1588. updateombination(this.form.id, obj).then((res) => {
  1589. if(res.code!=-1){
  1590. this.$message.success("修改成功");
  1591. this.tableData.forEach((item,index)=>{
  1592. if(res.data.id==item.id){
  1593. this.$set(this.tableData,index,res.data)
  1594. }
  1595. })
  1596. this.curRow={...res.data}
  1597. this.dialogVisible = false;
  1598. }
  1599. });
  1600. }
  1601. }
  1602. });
  1603. },
  1604. //新增弹框
  1605. addll() {
  1606. this.dialogVisible = true;
  1607. this.title = 1;
  1608. if (this.$refs.ruleForm !== undefined){
  1609. this.$refs.ruleForm.resetFields()
  1610. }
  1611. Object.assign(this.$data.form, this.$options.data().form)
  1612. console.log(this.form)
  1613. this.$nextTick(() => {
  1614. this.$refs.refinput.focus();
  1615. });
  1616. //性别
  1617. examinationgender().then((res) => {
  1618. console.log(res);
  1619. this.forSexId = res.data;
  1620. console.log(this.forSexId);
  1621. });
  1622. //项目类别
  1623. projectlist().then((res) => {
  1624. this.itemTypeId = res.data;
  1625. });
  1626. //仪器类别
  1627. instrumentlist().then((res) => {
  1628. this.deviceTypeId = res.data.items;
  1629. });
  1630. //发票项目类别
  1631. invoicetypelist().then((res) => {
  1632. this.invoiceItemTypeId = res.data.items;
  1633. });
  1634. },
  1635. rowick(row) {
  1636. asbitemgetid(row.id).then((res) => {
  1637. this.curRow = { ...res.data };
  1638. this.form = res.data;
  1639. });
  1640. this.values=row.itemTypeId
  1641. getapi(
  1642. `/api/app/asbitem-detail/asbitem-detail-in-item?AsbitemId=${row.id}`
  1643. ).then((res) => {
  1644. this.rightdata = [...res.data];
  1645. getapi(`/api/app/item/in-item-type/${row.itemTypeId}`).then((res) => {
  1646. // this.leftdata = [...res.data];
  1647. let dq=res.data
  1648. let bq=[]
  1649. bq = res.data.filter(item => !this.rightdata.some(ele=>ele.id === item.id));
  1650. this.leftdata = [...bq];
  1651. });
  1652. });
  1653. },
  1654. getlist() {
  1655. groupsandlist(this.pages).then((res) => {
  1656. this.initTableData = [...res.data.items];
  1657. this.tableData = res.data.items;
  1658. this.quckDepartment=res.data.items;
  1659. console.log(res);
  1660. });
  1661. },
  1662. },
  1663. };
  1664. </script>
  1665. <style scoped>
  1666. @import "../../assets/css/global_button.css";
  1667. @import "../../assets/css/global_dialog.css";
  1668. @import "../../assets/css/global_table.css";
  1669. @import "../../assets/css/global_form.css";
  1670. @import "../../assets/css/global_input.css";
  1671. @import "../../assets/css/global.css";
  1672. ::v-deep .el-table__header th {
  1673. /* font-size: px; */
  1674. background-color: rgb(245, 245, 245); /* 设置表头背景颜色 */
  1675. color: rgb(113, 113, 113); /* 设置表头文字颜色 */
  1676. }
  1677. ::v-deep .el-table td.el-table__cell,
  1678. .el-table th.el-table__cell.is-leaf {
  1679. padding: 0;
  1680. }
  1681. .mainleftbox {
  1682. width: 200px;
  1683. height: 240px;
  1684. border: 1px solid #ccc;
  1685. margin-left: 3%;
  1686. overflow-y: scroll;
  1687. }
  1688. .Selectbutton {
  1689. margin-left: 3%;
  1690. display: flex;
  1691. flex-direction: column;
  1692. justify-content: center;
  1693. align-items: center;
  1694. }
  1695. .mainbox {
  1696. display: flex;
  1697. justify-content: center;
  1698. margin-top: 20px;
  1699. }
  1700. .weixuan {
  1701. text-align: center;
  1702. line-height: 20px;
  1703. background: rgb(185, 203, 235);
  1704. }
  1705. .leftbox {
  1706. width: 200px;
  1707. height: 240px;
  1708. border: 1px solid #ccc;
  1709. }
  1710. .instrumentcategory {
  1711. width: 100%;
  1712. display: flex;
  1713. }
  1714. .box {
  1715. display: flex;
  1716. }
  1717. .confirmcancellation {
  1718. margin-left: 46%;
  1719. }
  1720. .activetext {
  1721. background: rgb(185, 203, 235);
  1722. }
  1723. .weixuan {
  1724. text-align: center;
  1725. line-height: 20px;
  1726. background: rgb(185, 203, 235);
  1727. }
  1728. :deep .el-form-item {
  1729. margin-bottom: 14px;
  1730. }
  1731. :deep(.el-textarea__inner){
  1732. resize: none;
  1733. }
  1734. :deep .el-dialog__header {
  1735. padding: 11px 20px 11px;
  1736. }
  1737. :deep .el-dialog__body {
  1738. padding: 0px 20px 0px;
  1739. }
  1740. :deep .el-form-item {
  1741. margin-bottom: 14px;
  1742. }
  1743. :deep .el-divider--horizontal {
  1744. margin: 0px 0 12px;
  1745. }
  1746. :deep .el-dialog__footer {
  1747. padding: 0px 20px 14px;
  1748. }
  1749. :deep .downText .el-input--suffix .el-input__inner {
  1750. width: 0;
  1751. height: 100%;
  1752. padding: 0 19px;
  1753. }
  1754. :deep .downText .el-input--suffix .el-input__suffix {
  1755. right: 12px;
  1756. }
  1757. :deep .downText{
  1758. display: flex!important;
  1759. }
  1760. :deep .el-input-group__append {
  1761. padding: 0 11px;
  1762. }
  1763. .my-el-form-item :deep .el-form-item__content{
  1764. line-height: 0!important;
  1765. }
  1766. .my-el-form-item :deep .el-input__icon{
  1767. line-height: 0!important;
  1768. }
  1769. </style>