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.

1313 lines
41 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
  1. <template>
  2. <div class="box">
  3. <div style="width: 95%">
  4. <el-card class="elcard" style="border-radius: 15px">
  5. <div class="publiccss">组合项目</div>
  6. <el-table
  7. :data="tableData"
  8. style="width: 100%; margin-top: 20px"
  9. row-key="id"
  10. height="300px"
  11. class="el-table__body-wrapper tbody"
  12. @row-click="rowick"
  13. highlight-current-row
  14. :row-style="{ height: '40px' }"
  15. >
  16. <el-table-column prop="id" label="编号" width="320">
  17. </el-table-column>
  18. <el-table-column prop="displayName" label="名称" width="">
  19. </el-table-column>
  20. <el-table-column prop="creatorName" label="创建者" width="">
  21. </el-table-column>
  22. <el-table-column prop="lastModifierName" label="修改者" width="">
  23. </el-table-column>
  24. <el-table-column prop="creationTime" label="创建时间" width="200">
  25. <template slot-scope="scope">
  26. {{ scope.row.creationTime | dateFormat }}
  27. </template>
  28. </el-table-column>
  29. <el-table-column
  30. prop="lastModificationTime"
  31. label="修改时间"
  32. width="200"
  33. >
  34. <template slot-scope="scope">
  35. {{ scope.row.lastModificationTime | dateFormat }}
  36. </template>
  37. </el-table-column>
  38. <el-table-column label="操作">
  39. <template>
  40. <el-tag
  41. class="move"
  42. style="
  43. cursor: move;
  44. margin-left: 15px;
  45. background-color: rgb(245, 245, 245);
  46. border: none;
  47. "
  48. draggable="true"
  49. >
  50. <i
  51. class="el-icon-d-caret"
  52. style="width: 1rem; height: 1rem; color: rgb(113, 113, 113)"
  53. ></i>
  54. </el-tag>
  55. </template>
  56. </el-table-column>
  57. </el-table>
  58. <!-- 新增或者编辑弹框 -->
  59. <el-dialog
  60. :title="title == 1 ? '新增' : '编辑'"
  61. :visible.sync="dialogVisible"
  62. width="50%"
  63. @close="bindidclose"
  64. :close-on-click-modal="false"
  65. >
  66. <el-form
  67. :model="form"
  68. :rules="rules"
  69. ref="ruleForm"
  70. label-width="100px"
  71. >
  72. <el-row>
  73. <el-col :span="8">
  74. <el-form-item label="名称" prop="displayName">
  75. <el-input
  76. v-model="form.displayName"
  77. ref="refinput"
  78. ></el-input>
  79. </el-form-item>
  80. </el-col>
  81. <el-col :span="8">
  82. <el-form-item label="简称" prop="shortName">
  83. <el-input v-model="form.shortName"></el-input>
  84. </el-form-item>
  85. </el-col>
  86. <el-col :span="8">
  87. <el-form-item label="适用性别" prop="forSexId">
  88. <el-select v-model="form.forSexId" placeholder="请选择">
  89. <el-option
  90. v-for="item in forSexId"
  91. :key="item.id"
  92. :label="item.displayName"
  93. :value="item.id"
  94. >
  95. </el-option>
  96. </el-select>
  97. </el-form-item>
  98. </el-col>
  99. <el-col :span="8">
  100. <el-form-item label="项目类别" prop="itemTypeId">
  101. <el-select v-model="form.itemTypeId" placeholder="请选择">
  102. <el-option
  103. v-for="item in itemTypeId"
  104. :key="item.id"
  105. :label="item.displayName"
  106. :value="item.id"
  107. >
  108. </el-option>
  109. </el-select>
  110. </el-form-item>
  111. </el-col>
  112. <el-col :span="8">
  113. <el-form-item label="价格" prop="price">
  114. <el-input v-model="form.price" type="number"></el-input>
  115. </el-form-item>
  116. </el-col>
  117. <el-col :span="8">
  118. <el-form-item label="仪器类别" prop="deviceTypeId">
  119. <el-select v-model="form.deviceTypeId" placeholder="请选择">
  120. <el-option
  121. v-for="item in deviceTypeId"
  122. :key="item.id"
  123. :label="item.displayName"
  124. :value="item.id"
  125. >
  126. </el-option>
  127. </el-select>
  128. </el-form-item>
  129. </el-col>
  130. <el-col :span="8">
  131. <el-form-item label="发票类别" prop="invoiceItemTypeId">
  132. <el-select
  133. v-model="form.invoiceItemTypeId"
  134. placeholder="请选择"
  135. >
  136. <el-option
  137. v-for="item in invoiceItemTypeId"
  138. :key="item.id"
  139. :label="item.displayName"
  140. :value="item.id"
  141. >
  142. </el-option>
  143. </el-select>
  144. </el-form-item>
  145. </el-col>
  146. <el-col :span="8">
  147. <el-form-item
  148. label="项目结果合并"
  149. prop="isItemResultMerger"
  150. label-width="110px"
  151. >
  152. <el-select
  153. v-model="form.isItemResultMerger"
  154. placeholder="请选择"
  155. >
  156. <el-option
  157. v-for="item in isItemResultMerger"
  158. :key="item.value"
  159. :label="item.label"
  160. :value="item.value"
  161. >
  162. </el-option>
  163. </el-select>
  164. </el-form-item>
  165. </el-col>
  166. <el-col :span="8">
  167. <el-form-item label="餐前项目" prop="isBeforeEat">
  168. <el-select v-model="form.isBeforeEat" placeholder="请选择">
  169. <el-option
  170. v-for="item in isBeforeEat"
  171. :key="item.value"
  172. :label="item.label"
  173. :value="item.value"
  174. >
  175. </el-option>
  176. </el-select>
  177. </el-form-item>
  178. </el-col>
  179. <el-col :span="8">
  180. <el-form-item label="临床意义" prop="">
  181. <el-input v-model="form.clinicalMeaning"></el-input>
  182. </el-form-item>
  183. </el-col>
  184. <el-col :span="8">
  185. <el-form-item label="默认结果" prop="">
  186. <el-input v-model="form.defaultResult"></el-input>
  187. </el-form-item>
  188. </el-col>
  189. <el-col :span="8">
  190. <el-form-item label="候诊时间" prop="queueTime">
  191. <el-input v-model="form.queueTime" type="nember"></el-input>
  192. </el-form-item>
  193. </el-col>
  194. <el-col :span="8">
  195. <el-form-item label="启用诊断" prop="isDiagnosisFunction">
  196. <el-select
  197. v-model="form.isDiagnosisFunction"
  198. placeholder="请选择"
  199. >
  200. <el-option
  201. v-for="item in isDiagnosisFunction"
  202. :key="item.value"
  203. :label="item.label"
  204. :value="item.value"
  205. >
  206. </el-option>
  207. </el-select>
  208. </el-form-item>
  209. </el-col>
  210. <el-col :span="8">
  211. <el-form-item label="诊断函数" prop="diagnosisFunction">
  212. <el-input
  213. v-model="form.diagnosisFunction"
  214. maxlength="1"
  215. show-word-limit
  216. ></el-input>
  217. </el-form-item>
  218. </el-col>
  219. <el-col :span="8">
  220. <el-form-item
  221. label="函数处理完毕"
  222. prop="isContinueProcess"
  223. label-width="110px"
  224. >
  225. <el-select
  226. v-model="form.isContinueProcess"
  227. placeholder="请选择"
  228. >
  229. <el-option
  230. v-for="item in isContinueProcess"
  231. :key="item.value"
  232. :label="item.label"
  233. :value="item.value"
  234. >
  235. </el-option>
  236. </el-select>
  237. </el-form-item>
  238. </el-col>
  239. <el-col :span="8">
  240. <el-form-item label="体检报告" prop="isPictureRotate">
  241. <el-select
  242. v-model="form.isPictureRotate"
  243. placeholder="请选择"
  244. >
  245. <el-option
  246. v-for="item in isPictureRotate"
  247. :key="item.value"
  248. :label="item.label"
  249. :value="item.value"
  250. >
  251. </el-option>
  252. </el-select>
  253. </el-form-item>
  254. </el-col>
  255. <el-col :span="8">
  256. <el-form-item label="检查项目" prop="isCheck">
  257. <el-select v-model="form.isCheck" placeholder="请选择">
  258. <el-option
  259. v-for="item in isCheck"
  260. :key="item.value"
  261. :label="item.label"
  262. :value="item.value"
  263. >
  264. </el-option>
  265. </el-select>
  266. </el-form-item>
  267. </el-col>
  268. <el-col :span="8">
  269. <el-form-item label="启用" prop="isActive">
  270. <el-select v-model="form.isActive" placeholder="请选择">
  271. <el-option
  272. v-for="item in isActive"
  273. :key="item.value"
  274. :label="item.label"
  275. :value="item.value"
  276. >
  277. </el-option>
  278. </el-select>
  279. </el-form-item>
  280. </el-col>
  281. </el-row>
  282. </el-form>
  283. <span slot="footer" class="dialog-footer">
  284. <el-button @click="dialogVisible = false"> </el-button>
  285. <el-button type="primary" @click="addoredit"> </el-button>
  286. </span>
  287. </el-dialog>
  288. <!-- table页 -->
  289. <el-tabs v-model="activeName">
  290. <el-tab-pane label="项目明细" name="first">
  291. <div style="margin-top: 30px">
  292. <span style="margin-top: 10px; padding: 5px; margin-left: 28.8%"
  293. >项目类别</span
  294. >
  295. <el-select
  296. v-model="values"
  297. placeholder="请选择"
  298. @change="ischangs"
  299. style="margin-top: 5px"
  300. >
  301. <el-option
  302. v-for="item in projectid"
  303. :key="item.id"
  304. :label="item.displayName"
  305. :value="item.id"
  306. >
  307. </el-option>
  308. </el-select>
  309. <span style="margin-left: 10%; padding: 5px">搜索选择</span>
  310. <el-select
  311. value-key="id"
  312. @change="selectitem"
  313. filterable
  314. v-model="flitvalues"
  315. placeholder="请选择"
  316. style="margin-top: 5px"
  317. >
  318. <el-option
  319. v-for="item in filetelists"
  320. :key="item.id"
  321. :label="item.displayName"
  322. :value="item"
  323. >
  324. </el-option>
  325. </el-select>
  326. </div>
  327. <div class="mainbox">
  328. <div class="mainleftbox">
  329. <div class="weixuan">未选项目</div>
  330. <div
  331. v-for="(item, index) in leftdata"
  332. :key="index"
  333. @click="clickPaixu(item, index)"
  334. @dblclick="shuanji(item, index)"
  335. :class="num === index ? 'activetext' : ''"
  336. style=""
  337. >
  338. <div>{{ item.displayName }}</div>
  339. </div>
  340. </div>
  341. <div class="Selectbutton">
  342. <div style="margin-top: 10px">
  343. <el-button @click="addall"
  344. >全添加<i class="el-icon-caret-right"></i
  345. ><i class="el-icon-caret-right"></i
  346. ></el-button>
  347. </div>
  348. <div style="margin-top: 10px">
  349. <el-button @click="addobj" style="width: 111px"
  350. >添加<i class="el-icon-caret-right"></i>
  351. </el-button>
  352. </div>
  353. <div style="margin-top: 10px">
  354. <el-button @click="removeright" style="width: 111px"
  355. >移去<i class="el-icon-caret-left"></i>
  356. </el-button>
  357. </div>
  358. <div style="margin-top: 10px">
  359. <el-button @click="allclear"
  360. >全移去<i class="el-icon-caret-left"></i
  361. ><i class="el-icon-caret-left"></i>
  362. </el-button>
  363. </div>
  364. </div>
  365. <div class="mainleftbox">
  366. <div class="weixuan">已选项目</div>
  367. <div
  368. v-for="(item, index) in rightdata"
  369. :key="index"
  370. @click="rightindex(item, index)"
  371. @dblclick="rightdelite(item, index)"
  372. :class="nums === index ? 'activetext' : ''"
  373. >
  374. <div>{{ item.displayName }}</div>
  375. </div>
  376. </div>
  377. </div>
  378. <div class="confirmcancellation">
  379. <el-button :disabled="isdislob" @click="Onsubmit">确定</el-button>
  380. <el-button :disabled="isdislob">取消</el-button>
  381. </div>
  382. </el-tab-pane>
  383. <!-- 指引单信息 -->
  384. <el-tab-pane label="指引信息" name="second">
  385. <div style="display: flex; width: 100%">
  386. <div style="width: 90%">
  387. <el-table
  388. :data="guidanceinformationdata"
  389. style="width: 100%"
  390. highlight-current-row
  391. @row-click="guiderow"
  392. >
  393. <el-table-column prop="guide" label="指引信息" width="180">
  394. </el-table-column>
  395. <el-table-column prop="forSexId" label="性别" width="180">
  396. </el-table-column>
  397. <el-table-column prop="address" label="地址">
  398. </el-table-column>
  399. </el-table>
  400. </div>
  401. <div>
  402. <el-button
  403. type=""
  404. @click="createabulletbox"
  405. style="margin-top: 50px; margin-left: 30px"
  406. class="commonbutton"
  407. >创建</el-button
  408. >
  409. <div style="margin-top: 10px; margin-left: 30px">
  410. <el-button
  411. type=""
  412. @click="deleteguidelines"
  413. class="commonbutton"
  414. >删除</el-button
  415. >
  416. </div>
  417. </div>
  418. </div>
  419. <!-- 科室改为体检中心 -->
  420. </el-tab-pane>
  421. </el-tabs>
  422. <!-- -->
  423. </el-card>
  424. </div>
  425. <!-- 指引信息新增修改弹框 -->
  426. <el-dialog
  427. :title="guidetitle == 1 ? '指引信息新增' : '指引信息修改'"
  428. :visible.sync="guidetitledialogVisible"
  429. width="50%"
  430. >
  431. <el-row>
  432. <el-form
  433. :model="guideform"
  434. :rules="guiderules"
  435. ref="ruleForms"
  436. label-width="100px"
  437. class="demo-ruleForm"
  438. >
  439. <el-col :span="12">
  440. <el-form-item label="体检中心" prop="organizationUnitId">
  441. <el-select
  442. v-model="guideform.organizationUnitId"
  443. placeholder="请选择"
  444. >
  445. <el-option
  446. v-for="item in organizationUnitdata"
  447. :key="item.id"
  448. :label="item.displayName"
  449. :value="item.id"
  450. >
  451. </el-option>
  452. </el-select>
  453. </el-form-item>
  454. </el-col>
  455. <el-col :span="12">
  456. <el-form-item label="组合项目" prop="asbitemId">
  457. <el-select v-model="guideform.asbitemId" placeholder="请选择">
  458. <el-option
  459. v-for="item in asbitemdata"
  460. :key="item.id"
  461. :label="item.displayName"
  462. :value="item.id"
  463. >
  464. </el-option>
  465. </el-select>
  466. </el-form-item>
  467. </el-col>
  468. <el-col :span="12">
  469. <el-form-item label="适用性别" prop="forSexId">
  470. <el-select v-model="guideform.forSexId" placeholder="请选择">
  471. <el-option
  472. v-for="item in forsexdata"
  473. :key="item.id"
  474. :label="item.displayName"
  475. :value="item.id"
  476. >
  477. </el-option>
  478. </el-select>
  479. </el-form-item>
  480. </el-col>
  481. <el-col :span="12">
  482. <el-form-item label="指引内容" prop="guide">
  483. <el-input
  484. v-model="guideform.guide"
  485. placeholder="请输入内容"
  486. style="width: 60%"
  487. ></el-input>
  488. </el-form-item>
  489. </el-col>
  490. </el-form>
  491. </el-row>
  492. <span slot="footer" class="dialog-footer">
  493. <el-button @click="guidetitledialogVisible = false"> </el-button>
  494. <el-button type="primary" @click="determineguidelines"> </el-button>
  495. </span>
  496. </el-dialog>
  497. <!-- -->
  498. <!-- 按钮区域 -->
  499. <div style="margin-left: 10px; margin-top: 5%">
  500. <el-button type="" @click="addll" class="commonbutton">新增</el-button>
  501. <div style="margin-top: 10px">
  502. <el-button type="" @click="editpopup" class="commonbutton"
  503. >编辑</el-button
  504. >
  505. </div>
  506. <div style="margin-top: 10px">
  507. <el-button type="" @click="deleteid" class="commonbutton"
  508. >删除</el-button
  509. >
  510. </div>
  511. <div style="margin-top: 10px">
  512. <el-button type="" @click="topping" class="commonbutton"
  513. >置顶</el-button
  514. >
  515. </div>
  516. <div style="margin-top: 10px">
  517. <el-button type="" @click="setlow" class="commonbutton">置底</el-button>
  518. </div>
  519. <div style="margin-top: 10px">
  520. <el-button
  521. type=""
  522. :disabled="isshow"
  523. @click="assertion"
  524. class="commonbutton"
  525. >排序</el-button
  526. >
  527. </div>
  528. <div style="margin-top: 10px">
  529. <el-button
  530. type=""
  531. :disabled="isshow"
  532. @click="cancellation"
  533. class="commonbutton"
  534. >取消</el-button
  535. >
  536. </div>
  537. </div>
  538. </div>
  539. </template>
  540. <script>
  541. import { mapState } from "vuex";
  542. import Sortable from "sortablejs";
  543. import { getapi, postapi, deletapi } from "@/api/api";
  544. import { examinationgender, instrumentlist } from "@/request/systemapi";
  545. import {
  546. groupsandlist,
  547. projectlist,
  548. invoicetypelist,
  549. newcombination,
  550. asbitemgetid,
  551. updateombination,
  552. samplesetlow,
  553. deletescombinationprojectid,
  554. combination,
  555. } from "@/request/commonapi";
  556. export default {
  557. data() {
  558. return {
  559. guiderules: {
  560. organizationUnitId: [
  561. {
  562. required: true,
  563. message: "请选择体检单位",
  564. trigger: "change",
  565. },
  566. ],
  567. asbitemId: [
  568. {
  569. required: true,
  570. message: "请选择组合项目",
  571. trigger: "change",
  572. },
  573. ],
  574. forSexId: [
  575. {
  576. required: true,
  577. message: "请选择组适用性别",
  578. trigger: "change",
  579. },
  580. ],
  581. guide: [{ required: true, message: "请输入指引内容", trigger: "blur" }],
  582. },
  583. guidetitle: 1,
  584. guideform: {
  585. organizationUnitId: "",
  586. asbitemId: "",
  587. forSexId: "",
  588. guide: "",
  589. }, //指引信息的数据对象
  590. organizationUnitdata: [], //体检中心
  591. guidetitledialogVisible: false,
  592. guidanceinformationdata: [],
  593. activeName: "first",
  594. isdislob: true,
  595. filetelists: [],
  596. flitvalues: [],
  597. num: 0,
  598. isshow: true,
  599. values: [],
  600. projectid: [],
  601. rules: {
  602. displayName: [
  603. { required: true, message: "请输入名称", trigger: "blur" },
  604. ],
  605. shortName: [{ required: true, message: "请输入简称", trigger: "blur" }],
  606. forSexId: [
  607. { required: true, message: "请选择适用性别", trigger: "blur" },
  608. ],
  609. itemTypeId: [
  610. { required: true, message: "请选择项目类别", trigger: "blur" },
  611. ],
  612. price: [{ required: true, message: "请输入价格", trigger: "blur" }],
  613. deviceTypeId: [
  614. { required: true, message: "请选择仪器类别", trigger: "blur" },
  615. ],
  616. invoiceItemTypeId: [
  617. { required: true, message: "请选择发票类别", trigger: "blur" },
  618. ],
  619. isItemResultMerger: [
  620. { required: true, message: "请选择项目结果", trigger: "blur" },
  621. ],
  622. isBeforeEat: [
  623. { required: true, message: "请选择餐前项目", trigger: "blur" },
  624. ],
  625. clinicalMeaning: [
  626. { required: true, message: "请输入临床意义", trigger: "blur" },
  627. ],
  628. defaultResult: [
  629. { required: true, message: "请输入默认结果", trigger: "blur" },
  630. ],
  631. queueTime: [
  632. { required: true, message: "请输入候诊时间", trigger: "blur" },
  633. ],
  634. isDiagnosisFunction: [
  635. { required: true, message: "请选择启用诊断函数", trigger: "blur" },
  636. ],
  637. diagnosisFunction: [
  638. { required: true, message: "请输入诊断函数", trigger: "blur" },
  639. ],
  640. isContinueProcess: [
  641. {
  642. required: true,
  643. message: "请选择诊断函数处理完毕后继续处理",
  644. trigger: "blur",
  645. },
  646. ],
  647. isPictureRotate: [
  648. { required: true, message: "请选择体检报告图片旋", trigger: "blur" },
  649. ],
  650. isCheck: [
  651. { required: true, message: "请选择是检查项目", trigger: "blur" },
  652. ],
  653. isActive: [
  654. { required: true, message: "请选择是否启用", trigger: "blur" },
  655. ],
  656. }, //表单校验对象
  657. form: {
  658. displayName: "",
  659. shortName: "",
  660. forSexId: "",
  661. itemTypeId: "",
  662. price: "",
  663. deviceTypeId: "",
  664. invoiceItemTypeId: "",
  665. isItemResultMerger: "",
  666. isBeforeEat: "",
  667. clinicalMeaning: "",
  668. defaultResult: "",
  669. queueTime: "",
  670. isDiagnosisFunction: "",
  671. diagnosisFunction: "",
  672. isContinueProcess: "",
  673. isPictureRotate: "",
  674. isCheck: "",
  675. isActive: "",
  676. },
  677. forSexId: [], //性别
  678. itemTypeId: [], //项目类别
  679. deviceTypeId: [], //仪器类别
  680. invoiceItemTypeId: [], //发票类别
  681. isItemResultMerger: [
  682. {
  683. value: "Y",
  684. label: "是",
  685. },
  686. {
  687. value: "N",
  688. label: "否",
  689. },
  690. ], //项目结果合并
  691. isBeforeEat: [
  692. {
  693. value: "Y",
  694. label: "是",
  695. },
  696. {
  697. value: "N",
  698. label: "否",
  699. },
  700. ], //餐前项目
  701. isDiagnosisFunction: [
  702. {
  703. value: "Y",
  704. label: "是",
  705. },
  706. {
  707. value: "N",
  708. label: "否",
  709. },
  710. ], //启用诊断函数
  711. isContinueProcess: [
  712. {
  713. value: "Y",
  714. label: "是",
  715. },
  716. {
  717. value: "N",
  718. label: "否",
  719. },
  720. ], //诊断函数处理完毕
  721. isContinueProcess: [
  722. {
  723. value: "Y",
  724. label: "是",
  725. },
  726. {
  727. value: "N",
  728. label: "否",
  729. },
  730. ], //诊断函数处理完毕后继续处理
  731. isPictureRotate: [
  732. {
  733. value: "Y",
  734. label: "是",
  735. },
  736. {
  737. value: "N",
  738. label: "否",
  739. },
  740. ], //体检报告图片旋转
  741. isCheck: [
  742. {
  743. value: "Y",
  744. label: "是",
  745. },
  746. {
  747. value: "N",
  748. label: "否",
  749. },
  750. ], //是检查项目
  751. isActive: [
  752. {
  753. value: "Y",
  754. label: "是",
  755. },
  756. {
  757. value: "N",
  758. label: "否",
  759. },
  760. ], //是否启用
  761. title: 1,
  762. dialogVisible: false,
  763. isshow: true,
  764. tableHeight: window.innerHeight - 180, //表格动态高度
  765. screenHeight: window.innerHeight, //内容区域高度
  766. pages: {
  767. Filter: "",
  768. SkipCount: 0,
  769. MaxResultCount: 100,
  770. Sorting: "displayOrder desc",
  771. },
  772. tableData: [],
  773. initTableData: [],
  774. leftdata: [],
  775. ary2: [],
  776. ary1: [],
  777. rightobj: {},
  778. rightdata: [],
  779. rightobj: {},
  780. nums: 0,
  781. itemid: "", //项目id
  782. curRow: {},
  783. asbitemdata: [], //组合项目
  784. forsexdata: [], //适用性别
  785. };
  786. },
  787. created() {
  788. this.getlist();
  789. this.gitprojectcategory();
  790. },
  791. mounted() {
  792. this.rowDrop();
  793. this.gitfleslist();
  794. this.getobtainguidance();
  795. },
  796. methods: {
  797. guiderow(row) {
  798. this.guideform = row;
  799. },
  800. //指引信息删除
  801. deleteguidelines() {
  802. console.log(this.guideform.asbitemId);
  803. if (this.guideform.asbitemId == "") {
  804. this.$message.warning("请选择删除的数据");
  805. } else {
  806. deletapi(
  807. `/api/app/asbitem-guide?OrganizationUnitId=${this.guideform.organizationUnitId}&AsbitemId=${this.guideform.AsbitemId}&ForSexId=${this.guideform.forSexId}`
  808. ).then((res) => {
  809. this.$message.warning(res.message);
  810. console.log(res);
  811. });
  812. console.log(this.guideform);
  813. }
  814. },
  815. //确定新增或者修改指引ruleForm
  816. determineguidelines() {
  817. this.$refs.ruleForms.validate((v) => {
  818. if (v) {
  819. postapi("/api/app/asbitem-guide", this.guideform).then((res) => {
  820. // if (res.code == 1) {
  821. this.guidetitledialogVisible = false;
  822. this.getobtainguidance();
  823. this.$message.success("创建成功");
  824. // }
  825. });
  826. }
  827. });
  828. },
  829. //新增或者编辑需要的api中的id
  830. publicapi() {
  831. //获取体检中心
  832. getapi("/api/app/organization-units/by-code-all").then((res) => {
  833. this.organizationUnitdata = res.data;
  834. });
  835. //获取组合项目
  836. getapi("/api/app/asbitem/in-filter").then((res) => {
  837. this.asbitemdata = res.data.items;
  838. });
  839. //获取适用性别
  840. getapi("/api/app/for-sex").then((res) => {
  841. this.forsexdata = res.data;
  842. });
  843. },
  844. //创建弹框
  845. createabulletbox() {
  846. this.guidetitledialogVisible = true;
  847. this.guideform = {};
  848. this.guidetitle = 1;
  849. this.publicapi();
  850. },
  851. //获取指引信息guidanceinformationdata
  852. getobtainguidance() {
  853. getapi("/api/app/asbitem-guide").then((res) => {
  854. this.guidanceinformationdata = res.data;
  855. console.log(res, "指引信息");
  856. });
  857. },
  858. //获取项目
  859. gitfleslist() {
  860. getapi("/api/app/item").then((res) => {
  861. this.filetelists = res.data.items;
  862. console.log(res, "我是项目");
  863. });
  864. },
  865. //搜索选择
  866. selectitem(v) {
  867. // this.itemid = v.id;
  868. // this.rightdata.forEach((item) => {
  869. // if (v.id != item.id) {
  870. // } else {
  871. // this.rightdata.push({ displayName: v.displayName });
  872. // }
  873. // });
  874. // this.rightdata.push({ displayName: v.displayName });
  875. console.log(v, "sssssssss");
  876. },
  877. Onsubmit() {
  878. let sampleGroupId = this.form.id;
  879. console.log(sampleGroupId);
  880. let sdate = [];
  881. console.log(this.rightdata, "2222");
  882. // let sss = { itemId: this.itemid, asbitemId: sampleGroupId };
  883. // sdate.push(sss);
  884. this.rightdata.forEach((element) => {
  885. console.log("项目元素id", element.id);
  886. console.log("组合项目id", sampleGroupId);
  887. sdate.push({ asbitemId: sampleGroupId, itemId: element.id });
  888. });
  889. this.leftdata.forEach((element) => {
  890. sdate.push({ asbitemId: sampleGroupId, itemId: element.id });
  891. });
  892. // this.leftdata.forEach((element) => {
  893. // let sss = { sampleGroupId: sampleGroupId, asbitemId: element.id };
  894. // sdate.push(sss);
  895. // });
  896. // sdate.push(sss);
  897. postapi("/api/app/asbitem-detail/many", sdate).then((res) => {
  898. if (res.code == 0) {
  899. this.$message.success("操作成功");
  900. }
  901. // this.isdislob = true;
  902. });
  903. // console.log(sdate);
  904. // if (sampleGroupId == undefined) {
  905. // this.$message.warning("请选择列表");
  906. // } else if (this.itemid == "") {
  907. // this.$message.warning("请选择项目");
  908. // } else {
  909. // postapi("/api/app/asbitem-detail/many", sdate).then((res) => {
  910. // this.$message.success("操作成功");
  911. // this.isdislob = true;
  912. // });
  913. // }
  914. },
  915. //右侧双击移动删除
  916. rightdelite(item, index) {
  917. this.isdislob = false;
  918. this.rightdata.splice(this.num, 1);
  919. this.leftdata.push(item);
  920. this.isdislob = false;
  921. this.updatedate();
  922. },
  923. //右侧点击选中
  924. rightindex(item, index) {
  925. this.nums = index;
  926. this.leftobj = item;
  927. console.log(this.leftobj);
  928. },
  929. //左侧添加按钮
  930. addobj() {
  931. if (this.leftdata.length > 0) {
  932. this.leftdata.splice(this.num, 1);
  933. this.rightdata.push(this.rightobj);
  934. this.isdislob = false;
  935. }
  936. },
  937. //右移动
  938. removeright() {
  939. if (this.rightdata.length > 0) {
  940. this.rightdata.splice(this.num, 1);
  941. this.leftdata.push(this.leftobj);
  942. this.isdislob = false;
  943. // this.isdislob=false
  944. this.updatedate();
  945. }
  946. },
  947. //q全移去
  948. allclear() {
  949. this.isdislob = false;
  950. if (this.rightdata.length > 0) {
  951. this.ary1 = this.rightdata;
  952. this.ary2 = this.leftdata;
  953. this.updatedate();
  954. this.rightdata = [];
  955. }
  956. },
  957. //全添加
  958. addall() {
  959. this.isdislob = false;
  960. if (this.leftdata.length > 0) {
  961. this.ary1 = this.leftdata;
  962. this.ary2 = this.rightdata;
  963. this.updatedate();
  964. this.leftdata = [];
  965. }
  966. },
  967. //左侧双击事件
  968. shuanji(item, index) {
  969. console.log(item);
  970. this.leftdata.splice(index, 1);
  971. this.rightdata.push(item);
  972. this.isdislob = false;
  973. },
  974. clickPaixu(item, index) {
  975. this.rightobj = item;
  976. this.num = index;
  977. console.log(this.num);
  978. },
  979. //获取项目类别 3a0b0b10-719f-5824-6956-8cb70f204013 /api/app/item-type/by-code-all
  980. gitprojectcategory() {
  981. getapi("/api/app/item-type/by-code-all").then((res) => {
  982. this.projectid = res.data;
  983. console.log("res项目类别", res);
  984. });
  985. },
  986. //ary1 需要追加的数据 ary2目标数组
  987. updatedate() {
  988. this.ary1.forEach((item) => {
  989. let iscz = false;
  990. this.ary2.forEach((item2) => {
  991. if (item2.id == item.id) {
  992. iscz = true;
  993. }
  994. });
  995. if (!iscz) {
  996. console.log(item.id);
  997. this.ary2.push(item);
  998. // this.allid.push({ id: item.id });
  999. }
  1000. });
  1001. },
  1002. //项目类别选择
  1003. ischangs(v) {
  1004. console.log(v);
  1005. //`/api/app/diagnosis/in-item-type/${v}`3a0c50b9-9621-61b7-fc93-1cfab1ec0478
  1006. getapi(`/api/app/item/in-item-type/${v}`).then((res) => {
  1007. console.log(res);
  1008. this.leftdata = res.data;
  1009. });
  1010. },
  1011. bindidclose() {
  1012. this.form = {};
  1013. },
  1014. rowDrop() {
  1015. this.$nextTick(() => {
  1016. const tbody = document.querySelector(".el-table__body-wrapper tbody");
  1017. const _this = this;
  1018. Sortable.create(tbody, {
  1019. handle: ".move",
  1020. animation: 300,
  1021. onEnd({ newIndex, oldIndex }) {
  1022. _this.isshow = false;
  1023. const currRow = _this.tableData.splice(oldIndex, 1)[0];
  1024. _this.tableData.splice(newIndex, 0, currRow);
  1025. _this.tableData.map((item, index) => {
  1026. if (index == newIndex && index == oldIndex) {
  1027. } else if (index == oldIndex) {
  1028. } else if (index == newIndex) {
  1029. }
  1030. });
  1031. console.log(_this.tableData.map((item) => item.displayOrder));
  1032. },
  1033. });
  1034. });
  1035. },
  1036. //取消按钮
  1037. cancellation() {
  1038. this.$message.info("操作取消");
  1039. this.isshow = true;
  1040. this.getlist();
  1041. },
  1042. //确定排序
  1043. assertion() {
  1044. const result = [];
  1045. this.tableData.forEach((item, index) => {
  1046. const currentDisplayOrder = this.initTableData[index].displayOrder;
  1047. if (item.displayOrder != currentDisplayOrder) {
  1048. result.push({ id: item.id, displayOrder: currentDisplayOrder });
  1049. }
  1050. });
  1051. combination({ itemList: result }).then((res) => {
  1052. this.$message.success("操作成功");
  1053. this.isshow = true;
  1054. this.getlist();
  1055. });
  1056. },
  1057. //置底
  1058. setlow() {
  1059. this.form = { ...this.curRow };
  1060. if (this.form.id == undefined) {
  1061. this.$message.warning("请选择操作的数据");
  1062. } else {
  1063. samplesetlow(this.form.id, 2).then((res) => {
  1064. console.log(res, "3333");
  1065. this.getlist();
  1066. this.$message.success("操作成功");
  1067. });
  1068. }
  1069. },
  1070. //置顶
  1071. topping() {
  1072. this.form = { ...this.curRow };
  1073. if (this.form.id == undefined) {
  1074. this.$message.warning("请选择操作的数据");
  1075. } else {
  1076. samplesetlow(this.form.id, 1).then((res) => {
  1077. this.$message.success("操作成功");
  1078. this.getlist();
  1079. });
  1080. }
  1081. },
  1082. //删除
  1083. deleteid() {
  1084. this.form = { ...this.curRow };
  1085. if (this.form.id == undefined) {
  1086. this.$message.warning("请选择操作的数据");
  1087. } else {
  1088. this.$confirm("是否确认删除, 是否继续?", "提示", {
  1089. confirmButtonText: "确定",
  1090. cancelButtonText: "取消",
  1091. type: "warning",
  1092. }).then(() => {
  1093. deletescombinationprojectid(this.form.id).then((res) => {
  1094. console.log(res);
  1095. if (res.code == 1) {
  1096. this.$message.success("删除成功");
  1097. this.getlist();
  1098. }
  1099. });
  1100. });
  1101. // deletescombinationprojectid(this.form.id).then((res) => {
  1102. // this.$message.success("删除成功");
  1103. // this.getlist();
  1104. // });
  1105. }
  1106. },
  1107. //编辑弹框
  1108. editpopup() {
  1109. this.form = { ...this.curRow };
  1110. if (this.form.id == undefined) {
  1111. this.$message.warning("请点击选择操作的数据");
  1112. } else {
  1113. this.dialogVisible = true;
  1114. this.title = 2;
  1115. asbitemgetid(this.form.id).then((res) => {
  1116. this.form = res.data;
  1117. });
  1118. //性别
  1119. // examinationgender().then((res) => {
  1120. // this.forSexId = res.data;
  1121. // });
  1122. //适用性别
  1123. getapi("/api/app/for-sex").then((res) => {
  1124. this.forSexId = res.data;
  1125. });
  1126. //项目类别
  1127. projectlist().then((res) => {
  1128. this.itemTypeId = res.data;
  1129. });
  1130. //仪器类别
  1131. instrumentlist().then((res) => {
  1132. this.deviceTypeId = res.data.items;
  1133. console.log(this.deviceTypeId);
  1134. });
  1135. //发票项目类别
  1136. invoicetypelist().then((res) => {
  1137. this.invoiceItemTypeId = res.data.items;
  1138. });
  1139. }
  1140. },
  1141. //确定新增或者编辑
  1142. addoredit() {
  1143. this.$refs.ruleForm.validate((v) => {
  1144. if (v) {
  1145. if (this.title == 1) {
  1146. let obj = {
  1147. displayName: this.form.displayName,
  1148. shortName: this.form.shortName,
  1149. forSexId: this.form.forSexId,
  1150. itemTypeId: this.form.itemTypeId,
  1151. price: Number(this.form.price),
  1152. deviceTypeId: this.form.deviceTypeId,
  1153. invoiceItemTypeId: this.form.invoiceItemTypeId,
  1154. isItemResultMerger: this.form.isItemResultMerger,
  1155. isBeforeEat: this.form.isBeforeEat,
  1156. clinicalMeaning: this.form.clinicalMeaning,
  1157. defaultResult: this.form.defaultResult,
  1158. queueTime: this.form.queueTime,
  1159. isDiagnosisFunction: this.form.isDiagnosisFunction,
  1160. diagnosisFunction: this.form.diagnosisFunction,
  1161. isContinueProcess: this.form.isContinueProcess,
  1162. isPictureRotate: this.form.isPictureRotate,
  1163. isCheck: this.form.isCheck,
  1164. isActive: this.form.isActive,
  1165. };
  1166. newcombination(obj).then((res) => {
  1167. this.$message.success("新增成功");
  1168. this.getlist();
  1169. this.form = {};
  1170. this.dialogVisible = false;
  1171. });
  1172. } else if (this.title == 2) {
  1173. let obj = {
  1174. displayName: this.form.displayName,
  1175. shortName: this.form.shortName,
  1176. forSexId: this.form.forSexId,
  1177. itemTypeId: this.form.itemTypeId,
  1178. price: Number(this.form.price),
  1179. deviceTypeId: this.form.deviceTypeId,
  1180. invoiceItemTypeId: this.form.invoiceItemTypeId,
  1181. isItemResultMerger: this.form.isItemResultMerger,
  1182. isBeforeEat: this.form.isBeforeEat,
  1183. clinicalMeaning: this.form.clinicalMeaning,
  1184. defaultResult: this.form.defaultResult,
  1185. queueTime: this.form.queueTime,
  1186. isDiagnosisFunction: this.form.isDiagnosisFunction,
  1187. diagnosisFunction: this.form.diagnosisFunction,
  1188. isContinueProcess: this.form.isContinueProcess,
  1189. isPictureRotate: this.form.isPictureRotate,
  1190. isCheck: this.form.isCheck,
  1191. isActive: this.form.isActive,
  1192. };
  1193. updateombination(this.form.id, obj).then((res) => {
  1194. this.$message.success("修改成功");
  1195. this.getlist();
  1196. this.dialogVisible = false;
  1197. });
  1198. }
  1199. }
  1200. });
  1201. },
  1202. //新增弹框
  1203. addll() {
  1204. this.dialogVisible = true;
  1205. this.title = 1;
  1206. this.$nextTick(() => {
  1207. this.$refs.refinput.focus();
  1208. });
  1209. //性别
  1210. examinationgender().then((res) => {
  1211. console.log(res);
  1212. this.forSexId = res.data;
  1213. console.log(this.forSexId);
  1214. });
  1215. //项目类别
  1216. projectlist().then((res) => {
  1217. this.itemTypeId = res.data;
  1218. });
  1219. //仪器类别
  1220. instrumentlist().then((res) => {
  1221. this.deviceTypeId = res.data.items;
  1222. });
  1223. //发票项目类别
  1224. invoicetypelist().then((res) => {
  1225. this.invoiceItemTypeId = res.data.items;
  1226. });
  1227. },
  1228. rowick(row) {
  1229. asbitemgetid(row.id).then((res) => {
  1230. this.curRow = { ...res.data };
  1231. this.form = res.data;
  1232. });
  1233. getapi(
  1234. `/api/app/asbitem-detail/asbitem-detail-in-item?AsbitemId=${row.id}`
  1235. ).then((res) => {
  1236. this.rightdata = res.data;
  1237. console.log(res, "右侧");
  1238. let dq = res.data;
  1239. if (dq.length > 0) {
  1240. this.rightdata = [];
  1241. dq.forEach((element) => {
  1242. let bb = { displayName: element.displayName, id: element.id };
  1243. this.rightdata.push(bb);
  1244. });
  1245. }
  1246. });
  1247. },
  1248. getlist() {
  1249. groupsandlist(this.pages).then((res) => {
  1250. this.initTableData = [...res.data.items];
  1251. this.tableData = res.data.items;
  1252. console.log(res);
  1253. });
  1254. },
  1255. },
  1256. };
  1257. </script>
  1258. <style scoped>
  1259. ::v-deep .el-table__header th {
  1260. /* font-size: px; */
  1261. background-color: rgb(245, 245, 245); /* 设置表头背景颜色 */
  1262. color: rgb(113, 113, 113); /* 设置表头文字颜色 */
  1263. }
  1264. ::v-deep .el-table td.el-table__cell,
  1265. .el-table th.el-table__cell.is-leaf {
  1266. padding: 0;
  1267. }
  1268. .mainleftbox {
  1269. width: 200px;
  1270. height: 240px;
  1271. border: 1px solid #ccc;
  1272. margin-left: 6%;
  1273. }
  1274. .Selectbutton {
  1275. margin-left: 3%;
  1276. }
  1277. .mainbox {
  1278. display: flex;
  1279. justify-content: center;
  1280. margin-top: 20px;
  1281. }
  1282. .weixuan {
  1283. text-align: center;
  1284. line-height: 20px;
  1285. background: rgb(185, 203, 235);
  1286. }
  1287. .leftbox {
  1288. width: 200px;
  1289. height: 240px;
  1290. border: 1px solid #ccc;
  1291. }
  1292. .instrumentcategory {
  1293. width: 100%;
  1294. display: flex;
  1295. }
  1296. .box {
  1297. display: flex;
  1298. }
  1299. .confirmcancellation {
  1300. margin-left: 48%;
  1301. }
  1302. .activetext {
  1303. background: rgb(185, 203, 235);
  1304. }
  1305. .weixuan {
  1306. text-align: center;
  1307. line-height: 20px;
  1308. background: rgb(185, 203, 235);
  1309. }
  1310. </style>