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.

2414 lines
78 KiB

3 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
2 years ago
2 years ago
2 years ago
3 years ago
2 years ago
2 years ago
3 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
2 years ago
2 years ago
3 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
2 years ago
2 years ago
3 years ago
2 years ago
2 years ago
3 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
2 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
3 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
2 years ago
3 years ago
3 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
2 years ago
3 years ago
3 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
2 years ago
3 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
2 years ago
3 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
2 years ago
2 years ago
2 years ago
3 years ago
2 years ago
3 years ago
3 years ago
2 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
2 years ago
2 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
2 years ago
3 years ago
2 years ago
2 years ago
3 years ago
2 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
2 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
2 years ago
2 years ago
3 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
3 years ago
2 years ago
3 years ago
2 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
2 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
2 years ago
3 years ago
2 years ago
3 years ago
3 years ago
2 years ago
3 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
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>
  4. <div class="middlebox">
  5. <div class="contenttitle">
  6. 常用设置 /
  7. <span class="contenttitleBold"
  8. >组合项目</span
  9. >
  10. </div>
  11. <div class="seachinput">
  12. <el-select
  13. v-model="department"
  14. placeholder="请选择组合项目"
  15. filterable
  16. :filter-method="remoteMethodes"
  17. default-first-option
  18. @change="quckDepartments"
  19. clearable
  20. size="small"
  21. >
  22. <el-option
  23. v-for="item in quckDepartment"
  24. :key="item.id"
  25. :label="item.displayName"
  26. :value="item.id"
  27. >
  28. </el-option>
  29. </el-select>
  30. </div>
  31. </div>
  32. <div style="display: flex; margin-top: 7px">
  33. <div
  34. :style="
  35. 'width: 208px;overflow: scroll;height:' +
  36. (window.pageHeight < 600 ? 505 : window.pageHeight - 100) +
  37. 'px;background-color: #fff; border-radius: 8px'
  38. "
  39. >
  40. <div style="margin-top: 10px">
  41. <el-tree
  42. :data="itemTypeId"
  43. :props="treeprops"
  44. @node-click="treeclick"
  45. node-key="id"
  46. ref="itemType"
  47. highlight-current
  48. auto-expand-parent
  49. >
  50. <span class="custom-tree-node" slot-scope="{ node, data }">
  51. <div>
  52. <span class="treeicons">
  53. <!-- <i
  54. class="el-icon-document-remove"
  55. v-if="data.parentId == null"
  56. ></i> -->
  57. <img
  58. style="width: 20px; height: 20px; vertical-align: sub"
  59. src="@/assets/images/order.png"
  60. v-if="data.parentId == null"
  61. />
  62. </span>
  63. <span
  64. :class="data.parentId == null ? 'maxtitle' : 'mintitle'"
  65. >{{ node.label }}</span
  66. >
  67. </div>
  68. </span>
  69. </el-tree>
  70. </div>
  71. </div>
  72. <div style="display: block">
  73. <div style="margin-left: 15px; display: flex; flex-direction: column">
  74. <div style="display: flex; margin-bottom: 15px">
  75. <div
  76. :style="
  77. 'width:' +
  78. (window.pageWidth - 200 - 110 - 50 - 14) +
  79. 'px;padding: 15px;background-color: #fff;border-radius: 8px;'
  80. "
  81. >
  82. <el-table
  83. :data="tableData"
  84. style="width: 100%"
  85. row-key="id"
  86. :height="
  87. window.pageHeight < 600
  88. ? 190
  89. : Math.floor((window.pageHeight - 260) / 2)
  90. "
  91. class="el-table__body-wrapper tbody"
  92. @row-click="rowick"
  93. highlight-current-row
  94. :row-style="{ height: '36px' }"
  95. ref="tableData"
  96. >
  97. <el-table-column prop="id" label="编号" width="320">
  98. </el-table-column>
  99. <el-table-column prop="displayName" label="名称" width="">
  100. </el-table-column>
  101. <el-table-column prop="creatorName" label="创建者" width="">
  102. </el-table-column>
  103. <el-table-column
  104. prop="lastModifierName"
  105. label="修改者"
  106. width=""
  107. >
  108. </el-table-column>
  109. <el-table-column
  110. prop="creationTime"
  111. label="创建时间"
  112. width="200"
  113. >
  114. <template slot-scope="scope">
  115. {{ scope.row.creationTime | dateFormat }}
  116. </template>
  117. </el-table-column>
  118. <el-table-column
  119. prop="lastModificationTime"
  120. label="修改时间"
  121. width="200"
  122. >
  123. <template slot-scope="scope">
  124. {{ scope.row.lastModificationTime | dateFormat }}
  125. </template>
  126. </el-table-column>
  127. <el-table-column label="操作" align="center">
  128. <template>
  129. <el-tag
  130. class="move"
  131. style="
  132. cursor: move;
  133. background-color: rgb(245, 245, 245);
  134. border: none;
  135. "
  136. draggable="true"
  137. >
  138. <i
  139. class="el-icon-d-caret"
  140. style="
  141. width: 1rem;
  142. height: 1rem;
  143. color: rgb(113, 113, 113);
  144. "
  145. ></i>
  146. </el-tag>
  147. </template>
  148. </el-table-column>
  149. </el-table>
  150. </div>
  151. </div>
  152. <!-- table页 -->
  153. <div style="display: flex">
  154. <div
  155. :style="
  156. 'width:' +
  157. (window.pageWidth - 200 - 110 - 50 - 14) +
  158. 'px;padding: 15px;background-color: #fff;border-radius: 8px;'
  159. "
  160. >
  161. <el-tabs v-model="activeName">
  162. <el-tab-pane label="项目明细" name="first">
  163. <div class="mainbox">
  164. <div class="" :style="'width:'+Math.floor((window.pageWidth - 200 - 110 - 50 - 14-130)/2) +'px;'
  165. ">
  166. <div>
  167. <span
  168. style="
  169. padding: 5px;
  170. font-size: 14px;
  171. font-weight: 400;
  172. color: #232748;
  173. font-family: NotoSansSC-Regular;
  174. margin-bottom: 10px;
  175. "
  176. >项目类别</span
  177. >
  178. <el-cascader
  179. v-model="values"
  180. :options="itemTypeId"
  181. ref="example"
  182. popper-class="example"
  183. @change="ischangs"
  184. :props="{
  185. value: 'id',
  186. label: 'displayName',
  187. children: 'treeChildren',
  188. checkStrictly: true,
  189. expandTrigger: 'hover',
  190. }"
  191. size="small"
  192. >
  193. </el-cascader>
  194. </div>
  195. <el-table
  196. :data="leftdata"
  197. :height="
  198. window.pageHeight < 600
  199. ? 170
  200. : Math.floor((window.pageHeight - 230) / 2)
  201. "
  202. @row-dblclick="dbClickChoosedAsb"
  203. @selection-change="handleSelectionChange"
  204. @row-click="chooseAsbItem"
  205. highlight-current-row
  206. :row-style="{ height: '28px' }"
  207. >
  208. <el-table-column
  209. type="index"
  210. align="center"
  211. label="序号"
  212. />
  213. <el-table-column
  214. prop="displayName"
  215. label="未选项目"
  216. />
  217. </el-table>
  218. </div>
  219. <div class="Selectbutton">
  220. <div style="">
  221. <el-button
  222. @click="addAbs"
  223. style="width: 100px"
  224. class="commonbutton"
  225. >添加<i class="el-icon-caret-right"></i>
  226. </el-button>
  227. </div>
  228. <div style="margin-top: 18px">
  229. <el-button @click="addall" class="difference"
  230. >全添加<i class="el-icon-caret-right"></i
  231. ><i class="el-icon-caret-right"></i
  232. ></el-button>
  233. </div>
  234. <div style="margin-top: 18px">
  235. <el-button
  236. @click="delAbs"
  237. style="width: 100px"
  238. class="commonbutton"
  239. >移除<i class="el-icon-caret-left"></i>
  240. </el-button>
  241. </div>
  242. <div style="margin-top: 18px">
  243. <el-button @click="allclear" class="difference"
  244. >全移除<i class="el-icon-caret-left"></i
  245. ><i class="el-icon-caret-left"></i>
  246. </el-button>
  247. </div>
  248. </div>
  249. <div class="" :style="'width:'+Math.floor((window.pageWidth - 200 - 110 - 50 - 14-130)/2) +'px;'
  250. ">
  251. <div>
  252. <span
  253. style="
  254. padding: 5px;
  255. font-size: 14px;
  256. font-weight: 400;
  257. color: #232748;
  258. font-family: NotoSansSC-Regular;
  259. margin-bottom: 10px;
  260. "
  261. >搜索选择</span
  262. >
  263. <el-select
  264. value-key="id"
  265. @change="selectitem"
  266. filterable
  267. v-model="flitvalues"
  268. placeholder="请选择"
  269. :filter-method="remoteMethods"
  270. default-first-option
  271. clearable
  272. ref="quickAsbOCX"
  273. size="small"
  274. >
  275. <el-option
  276. v-for="item in filetelists"
  277. :key="item.id"
  278. :label="item.displayName"
  279. :value="item"
  280. >
  281. </el-option>
  282. </el-select>
  283. </div>
  284. <el-table
  285. :data="rightdata"
  286. :height="
  287. window.pageHeight < 600
  288. ? 170
  289. : Math.floor((window.pageHeight - 230) / 2)
  290. "
  291. width="100%"
  292. @row-dblclick="removeAbs"
  293. @selection-change="selecteditems"
  294. @row-click="removeAsbItem"
  295. highlight-current-row
  296. :row-style="{ height: '28px' }"
  297. :summary-method="getSummaries"
  298. show-summary
  299. ref="table"
  300. >
  301. <el-table-column
  302. type="index"
  303. align="center"
  304. label="序号"
  305. />
  306. <el-table-column
  307. label="已选项目"
  308. prop="displayName"
  309. />
  310. </el-table>
  311. </div>
  312. </div>
  313. </el-tab-pane>
  314. <!-- 指引单信息 -->
  315. <el-tab-pane label="指引信息" name="second">
  316. <div style="display: flex; width: 100%">
  317. <div :style="
  318. 'width:' +
  319. (window.pageWidth - 200 - 110 - 50 - 10-110-10) +
  320. 'px;'
  321. ">
  322. <el-form
  323. ref="guidanceinformation"
  324. :rules="guidelinesRules"
  325. :model="formdata"
  326. >
  327. <el-table
  328. :data="formdata.guidanceinformationdata"
  329. style="width: 100%"
  330. highlight-current-row
  331. @row-click="guiderow"
  332. :row-class-name="tableRowClassName"
  333. :height="
  334. window.pageHeight < 600
  335. ? 215
  336. : Math.floor((window.pageHeight - 174) / 2)
  337. "
  338. ref="guidanceinformationdata"
  339. class="guidelines"
  340. border
  341. >
  342. <el-table-column label="体检中心" width="200">
  343. <template slot-scope="scope">
  344. <el-form-item
  345. :prop="
  346. 'guidanceinformationdata.' +
  347. scope.$index +
  348. '.medicalCenterId'
  349. "
  350. :rules="guidelinesRules.medicalCenterId"
  351. >
  352. <el-select
  353. v-model="scope.row.medicalCenterId"
  354. >
  355. <el-option
  356. v-for="item in organizationUnitdata"
  357. :key="item.id"
  358. :label="item.displayName"
  359. :value="item.id"
  360. />
  361. </el-select>
  362. </el-form-item>
  363. </template>
  364. </el-table-column>
  365. <el-table-column label="适用性别" width="200">
  366. <template slot-scope="scope">
  367. <el-form-item
  368. :prop="
  369. 'guidanceinformationdata.' +
  370. scope.$index +
  371. '.forSexId'
  372. "
  373. :rules="guidelinesRules.forSexId"
  374. >
  375. <el-select v-model="scope.row.forSexId">
  376. <el-option
  377. v-for="item in forsexdata"
  378. :key="item.id"
  379. :label="item.displayName"
  380. :value="item.id"
  381. />
  382. </el-select>
  383. </el-form-item>
  384. </template>
  385. </el-table-column>
  386. <el-table-column label="指引信息">
  387. <template slot-scope="scope">
  388. <el-form-item
  389. :prop="
  390. 'guidanceinformationdata.' +
  391. scope.$index +
  392. '.guide'
  393. "
  394. :rules="guidelinesRules.guide"
  395. >
  396. <el-input
  397. v-model="scope.row.guide"
  398. required
  399. />
  400. </el-form-item>
  401. </template>
  402. </el-table-column>
  403. </el-table>
  404. </el-form>
  405. </div>
  406. <div style="margin-left: 15px">
  407. <el-button
  408. type=""
  409. @click="createabulletbox"
  410. style="margin-top: 50px;"
  411. class="commonbutton"
  412. >新增</el-button
  413. >
  414. <div style="margin-top: 10px">
  415. <el-button
  416. type=""
  417. @click="deleteguidelines"
  418. class="commonbutton"
  419. >删除</el-button
  420. >
  421. </div>
  422. <div style="margin-top: 10px;">
  423. <el-button
  424. type=""
  425. @click="saveguidelines"
  426. class="commonbutton"
  427. >保存</el-button
  428. >
  429. </div>
  430. </div>
  431. </div>
  432. <!-- 科室改为体检中心 -->
  433. </el-tab-pane>
  434. </el-tabs>
  435. </div>
  436. </div>
  437. </div>
  438. </div>
  439. <!-- 按钮区域 -->
  440. <div style="margin-left: 10px">
  441. <el-button type="" @click="addll" class="commonbutton"
  442. >新增</el-button
  443. >
  444. <div style="margin-top: 10px">
  445. <el-button type="" @click="editpopup" class="commonbutton"
  446. >编辑</el-button
  447. >
  448. </div>
  449. <div style="margin-top: 10px">
  450. <el-button type="" @click="deleteid" class="commonbutton"
  451. >删除</el-button
  452. >
  453. </div>
  454. <div style="margin-top: 10px">
  455. <el-button type="" @click="topping" class="commonbutton"
  456. >置顶</el-button
  457. >
  458. </div>
  459. <div style="margin-top: 10px">
  460. <el-button type="" @click="setlow" class="commonbutton"
  461. >置底</el-button
  462. >
  463. </div>
  464. <div style="margin-top: 10px">
  465. <el-button
  466. type=""
  467. :disabled="isshow"
  468. @click="assertion"
  469. class="commonbutton"
  470. >排序</el-button
  471. >
  472. </div>
  473. <div style="margin-top: 10px">
  474. <el-button
  475. type=""
  476. :disabled="isshow"
  477. @click="cancellation"
  478. class="commonbutton"
  479. >取消</el-button
  480. >
  481. </div>
  482. <div style="margin-top: 10px">
  483. <el-button
  484. type=""
  485. :disabled="isdislob"
  486. @click="Onsubmit"
  487. class="commonbutton"
  488. >确定项目</el-button
  489. >
  490. </div>
  491. <div style="margin-top: 10px">
  492. <el-button
  493. type=""
  494. :disabled="isdislob"
  495. @click="projectCancellation"
  496. class="commonbutton"
  497. >取消项目</el-button
  498. >
  499. </div>
  500. </div>
  501. </div>
  502. </div>
  503. <!-- 新增或者编辑弹框 -->
  504. <el-dialog
  505. :title="title == 1 ? '新增' : '编辑'"
  506. :visible.sync="dialogVisible"
  507. width="70%"
  508. @close="bindidclose"
  509. :close-on-click-modal="false"
  510. >
  511. <el-form :model="form" :rules="rules" ref="ruleForm" label-width="100px">
  512. <el-row>
  513. <el-col :span="10">
  514. <el-form-item label="项目编号" prop="">
  515. <el-input
  516. v-model="form.id"
  517. :disabled="true"
  518. size="small"
  519. ></el-input>
  520. </el-form-item>
  521. </el-col>
  522. <el-col :span="6">
  523. <el-form-item label="项目类别" prop="itemTypeId">
  524. <!-- <el-select v-model="form.itemTypeId" placeholder="请选择">
  525. <el-option
  526. v-for="item in itemTypeId"
  527. :key="item.id"
  528. :label="item.displayName"
  529. :value="item.id"
  530. >
  531. </el-option>
  532. </el-select> -->
  533. <el-cascader
  534. v-model="form.itemTypeId"
  535. :options="itemTypeId"
  536. popper-class="example"
  537. ref="itemTypeIds"
  538. @change="ischangsItemTypeId"
  539. :props="{
  540. value: 'id',
  541. label: 'displayName',
  542. children: 'treeChildren',
  543. checkStrictly: true,
  544. expandTrigger: 'hover',
  545. }"
  546. size="small"
  547. >
  548. </el-cascader>
  549. </el-form-item>
  550. </el-col>
  551. <el-col :span="8">
  552. <el-form-item label="名称" prop="displayName">
  553. <el-input
  554. v-model="form.displayName"
  555. ref="refinput"
  556. @input="($event) => changeUpdate($event, 'displayName')"
  557. size="small"
  558. ></el-input>
  559. </el-form-item>
  560. </el-col>
  561. <el-col :span="8">
  562. <el-form-item label="简称" prop="">
  563. <el-input
  564. v-model="form.shortName"
  565. @input="($event) => changeUpdate($event, 'shortName')"
  566. size="small"
  567. ></el-input>
  568. </el-form-item>
  569. </el-col>
  570. <el-col :span="8">
  571. <el-form-item label="适用性别" prop="">
  572. <el-select
  573. v-model="form.forSexId"
  574. placeholder="请选择"
  575. size="small"
  576. @change="quckRusetform"
  577. >
  578. <el-option
  579. v-for="item in forSexId"
  580. :key="item.id"
  581. :label="item.displayName"
  582. :value="item.id"
  583. >
  584. </el-option>
  585. </el-select>
  586. </el-form-item>
  587. </el-col>
  588. <el-col :span="8">
  589. <el-form-item label="价格" prop="">
  590. <el-input
  591. v-model="form.price"
  592. type="nember"
  593. @input="($event) => changeUpdate($event, 'price')"
  594. size="small"
  595. ></el-input>
  596. </el-form-item>
  597. </el-col>
  598. <el-col :span="8">
  599. <el-form-item label="仪器类别" prop="">
  600. <el-select
  601. v-model="form.deviceTypeId"
  602. placeholder="请选择"
  603. size="small"
  604. @change="quckRusetform"
  605. >
  606. <el-option
  607. v-for="item in deviceTypeId"
  608. :key="item.id"
  609. :label="item.displayName"
  610. :value="item.id"
  611. >
  612. </el-option>
  613. </el-select>
  614. </el-form-item>
  615. </el-col>
  616. <el-col :span="8">
  617. <el-form-item label="发票类别" prop="invoiceItemTypeId">
  618. <el-select
  619. v-model="form.invoiceItemTypeId"
  620. placeholder="请选择"
  621. size="small"
  622. @change="quckRusetform"
  623. >
  624. <el-option
  625. v-for="item in invoiceItemTypeId"
  626. :key="item.id"
  627. :label="item.displayName"
  628. :value="item.id"
  629. >
  630. </el-option>
  631. </el-select>
  632. </el-form-item>
  633. </el-col>
  634. <el-col :span="4">
  635. <el-form-item label="项目结果合并" prop="" label-width="110px">
  636. <!-- <el-select
  637. v-model="form.isItemResultMerger"
  638. placeholder="请选择"
  639. >
  640. <el-option
  641. v-for="item in isItemResultMerger"
  642. :key="item.value"
  643. :label="item.label"
  644. :value="item.value"
  645. >
  646. </el-option>
  647. </el-select> -->
  648. <el-checkbox
  649. v-model="form.isItemResultMergerBox"
  650. @change="changeBox('isItemResultMerger')"
  651. />
  652. </el-form-item>
  653. </el-col>
  654. <el-col :span="4">
  655. <el-form-item label="餐前项目" prop="">
  656. <!-- <el-select v-model="form.isBeforeEat" placeholder="请选择">
  657. <el-option
  658. v-for="item in isBeforeEat"
  659. :key="item.value"
  660. :label="item.label"
  661. :value="item.value"
  662. >
  663. </el-option>
  664. </el-select> -->
  665. <el-checkbox
  666. v-model="form.isBeforeEatBox"
  667. @change="changeBox('isBeforeEat')"
  668. />
  669. </el-form-item>
  670. </el-col>
  671. <el-col :span="24">
  672. <el-form-item label="临床意义" prop="">
  673. <el-input
  674. v-model="form.clinicalMeaning"
  675. type="textarea"
  676. :autosize="{ minRows: 2, maxRows: 2 }"
  677. @input="($event) => changeUpdate($event, 'clinicalMeaning')"
  678. />
  679. </el-form-item>
  680. </el-col>
  681. <el-col :span="24">
  682. <el-form-item label="默认结果" prop="" class="my-el-form-item">
  683. <!-- <el-input v-model="form.defaultResult"></el-input> -->
  684. <div style="display: flex; justify-content: center">
  685. <el-input
  686. v-model="form.defaultResult"
  687. type="textarea"
  688. :autosize="{ minRows: 1, maxRows: 1 }"
  689. @input="($event) => changeUpdate($event, 'defaultResult')"
  690. />
  691. <el-select
  692. v-model="form.defaultResult"
  693. style="width: 40px"
  694. class="downText"
  695. @change="quckRusetform"
  696. >
  697. <el-option
  698. v-for="item in defaultResult"
  699. :key="item.value"
  700. :label="item.label"
  701. :value="item.label"
  702. >
  703. </el-option>
  704. </el-select>
  705. </div>
  706. </el-form-item>
  707. </el-col>
  708. <el-col :span="4">
  709. <el-form-item label="启用诊断" prop="">
  710. <!-- <el-select
  711. v-model="form.isDiagnosisFunction"
  712. placeholder="请选择"
  713. >
  714. <el-option
  715. v-for="item in isDiagnosisFunction"
  716. :key="item.value"
  717. :label="item.label"
  718. :value="item.value"
  719. >
  720. </el-option>
  721. </el-select> -->
  722. <el-checkbox
  723. v-model="form.isDiagnosisFunctionBox"
  724. @change="changeBox('isDiagnosisFunction')"
  725. />
  726. </el-form-item>
  727. </el-col>
  728. <el-col :span="8">
  729. <el-form-item label="诊断函数" prop="">
  730. <el-input
  731. v-model="form.diagnosisFunction"
  732. :disabled="disableddiagnosisFunction"
  733. size="small"
  734. >
  735. <el-button
  736. slot="append"
  737. icon="el-icon-more"
  738. v-if="form.isDiagnosisFunctionBox"
  739. @click="
  740. (diagnosisFunctionBox = true),
  741. (diagnosisFunctionText = form.diagnosisFunction)
  742. "
  743. size="small"
  744. ></el-button>
  745. </el-input>
  746. </el-form-item>
  747. </el-col>
  748. <el-col :span="4">
  749. <el-form-item label="函数处理完毕" prop="" label-width="110px">
  750. <!-- <el-select
  751. v-model="form.isContinueProcess"
  752. placeholder="请选择"
  753. >
  754. <el-option
  755. v-for="item in isContinueProcess"
  756. :key="item.value"
  757. :label="item.label"
  758. :value="item.value"
  759. >
  760. </el-option>
  761. </el-select> -->
  762. <el-checkbox
  763. v-model="form.isContinueProcessBox"
  764. @change="changeBox('isContinueProcess')"
  765. />
  766. </el-form-item>
  767. </el-col>
  768. <el-col :span="8">
  769. <el-form-item label="候诊时间" prop="">
  770. <el-input
  771. v-model="form.queueTime"
  772. type="nember"
  773. @input="($event) => changeUpdate($event, 'queueTime')"
  774. size="small"
  775. ></el-input>
  776. </el-form-item>
  777. </el-col>
  778. <el-col :span="4">
  779. <el-form-item label="体检报告" prop="" size="small">
  780. <!-- <el-select
  781. v-model="form.isPictureRotate"
  782. placeholder="请选择"
  783. >
  784. <el-option
  785. v-for="item in isPictureRotate"
  786. :key="item.value"
  787. :label="item.label"
  788. :value="item.value"
  789. >
  790. </el-option>
  791. </el-select> -->
  792. <el-checkbox
  793. v-model="form.isPictureRotateBox"
  794. @change="changeBox('isPictureRotate')"
  795. />
  796. </el-form-item>
  797. </el-col>
  798. <el-col :span="4">
  799. <el-form-item label="检查项目" prop="">
  800. <!-- <el-select v-model="form.isCheck" placeholder="请选择">
  801. <el-option
  802. v-for="item in isCheck"
  803. :key="item.value"
  804. :label="item.label"
  805. :value="item.value"
  806. >
  807. </el-option>
  808. </el-select> -->
  809. <el-checkbox
  810. v-model="form.isCheckBox"
  811. @change="changeBox('isCheck')"
  812. />
  813. </el-form-item>
  814. </el-col>
  815. <el-col :span="4">
  816. <el-form-item label="启用" prop="">
  817. <!-- <el-select v-model="form.isActive" placeholder="请选择">
  818. <el-option
  819. v-for="item in isActive"
  820. :key="item.value"
  821. :label="item.label"
  822. :value="item.value"
  823. >
  824. </el-option>
  825. </el-select> -->
  826. <el-checkbox
  827. v-model="form.isActiveBox"
  828. @change="changeBox('isActive')"
  829. />
  830. </el-form-item>
  831. </el-col>
  832. </el-row>
  833. <el-divider></el-divider>
  834. <el-row>
  835. <el-col :span="5">
  836. <el-form-item label="创建者">
  837. <el-input
  838. v-model="form.creatorName"
  839. disabled
  840. size="small"
  841. ></el-input>
  842. </el-form-item>
  843. </el-col>
  844. <el-col :span="7">
  845. <el-form-item label="创建时间" style="margin-left: -5%">
  846. <el-input
  847. :value="form.creationTime | dateFormat"
  848. disabled
  849. style="width: 90%"
  850. size="small"
  851. ></el-input>
  852. </el-form-item>
  853. </el-col>
  854. <el-col :span="5">
  855. <el-form-item label="修改者" style="margin-left: -25%">
  856. <el-input
  857. v-model="form.creatorName"
  858. disabled
  859. size="small"
  860. ></el-input>
  861. </el-form-item>
  862. </el-col>
  863. <el-col :span="7">
  864. <el-form-item label="修改时间" style="margin-left: -5%">
  865. <el-input
  866. :value="form.lastModificationTime | dateFormat"
  867. disabled
  868. style="width: 90%"
  869. size="small"
  870. ></el-input>
  871. </el-form-item>
  872. </el-col>
  873. </el-row>
  874. </el-form>
  875. <span slot="footer" class="dialog-footer">
  876. <el-button @click="editcancellation" class="difference"
  877. > </el-button
  878. >
  879. <el-button type="primary" @click="addoredit" class="commonbutton"
  880. > </el-button
  881. >
  882. </span>
  883. </el-dialog>
  884. <!-- 指引信息新增修改弹框 -->
  885. <el-dialog
  886. :title="guidetitle == 1 ? '指引信息新增' : '指引信息修改'"
  887. :visible.sync="guidetitledialogVisible"
  888. width="50%"
  889. >
  890. <el-row>
  891. <el-form
  892. :model="guideform"
  893. :rules="guiderules"
  894. ref="ruleForms"
  895. label-width="100px"
  896. class="demo-ruleForm"
  897. >
  898. <el-col :span="12">
  899. <el-form-item label="体检中心" prop="medicalCenterId">
  900. <el-select
  901. v-model="guideform.medicalCenterId"
  902. placeholder="请选择"
  903. >
  904. <el-option
  905. v-for="item in organizationUnitdata"
  906. :key="item.id"
  907. :label="item.displayName"
  908. :value="item.id"
  909. >
  910. </el-option>
  911. </el-select>
  912. </el-form-item>
  913. </el-col>
  914. <!-- <el-col :span="12">
  915. <el-form-item label="组合项目" prop="asbitemId">
  916. <el-select v-model="guideform.asbitemId" placeholder="请选择">
  917. <el-option
  918. v-for="item in asbitemdata"
  919. :key="item.id"
  920. :label="item.displayName"
  921. :value="item.id"
  922. >
  923. </el-option>
  924. </el-select>
  925. </el-form-item>
  926. </el-col> -->
  927. <el-col :span="12">
  928. <el-form-item label="适用性别" prop="forSexId">
  929. <el-select v-model="guideform.forSexId" placeholder="请选择">
  930. <el-option
  931. v-for="item in forsexdata"
  932. :key="item.id"
  933. :label="item.displayName"
  934. :value="item.id"
  935. >
  936. </el-option>
  937. </el-select>
  938. </el-form-item>
  939. </el-col>
  940. <el-col :span="24">
  941. <el-form-item label="指引内容" prop="guide">
  942. <el-input
  943. v-model="guideform.guide"
  944. placeholder="请输入内容"
  945. ></el-input>
  946. </el-form-item>
  947. </el-col>
  948. </el-form>
  949. </el-row>
  950. <span slot="footer" class="dialog-footer">
  951. <el-button @click="guidetitledialogVisible = false"> </el-button>
  952. <el-button type="primary" @click="determineguidelines"> </el-button>
  953. </span>
  954. </el-dialog>
  955. <!-- 诊断函数弹框 -->
  956. <el-dialog
  957. title="诊断函数设置"
  958. :visible.sync="diagnosisFunctionBox"
  959. width="50%"
  960. :close-on-click-modal="false"
  961. fullscreen
  962. >
  963. <el-form label-width="110px">
  964. <el-row>
  965. <el-col :span="24">
  966. <el-form-item label="诊断函数">
  967. <el-input
  968. type="textarea"
  969. v-model="diagnosisFunctionText"
  970. :autosize="{ minRows: 29, maxRows: 29 }"
  971. ></el-input>
  972. </el-form-item>
  973. </el-col>
  974. </el-row>
  975. </el-form>
  976. <span slot="footer" class="dialog-footer">
  977. <el-button
  978. @click="(diagnosisFunctionBox = false), (diagnosisFunctionText = '')"
  979. class="difference"
  980. > </el-button
  981. >
  982. <el-button
  983. type="primary"
  984. @click="OnsubmitDiagnosis"
  985. class="commonbutton"
  986. > </el-button
  987. >
  988. </span>
  989. </el-dialog>
  990. </div>
  991. </template>
  992. <script>
  993. import { mapState } from "vuex";
  994. import Sortable from "sortablejs";
  995. import { getapi, postapi, deletapi } from "@/api/api";
  996. import { examinationgender, instrumentlist } from "@/request/systemapi";
  997. import { deepCopy, objCopy } from "../../utlis/proFunc";
  998. import {
  999. getporjectlists,
  1000. groupsandlist,
  1001. projectlist,
  1002. invoicetypelist,
  1003. newcombination,
  1004. asbitemgetid,
  1005. updateombination,
  1006. samplesetlow,
  1007. deletescombinationprojectid,
  1008. combination,
  1009. } from "@/request/commonapi";
  1010. export default {
  1011. data() {
  1012. return {
  1013. guiderules: {
  1014. medicalCenterId: [
  1015. {
  1016. required: true,
  1017. message: "请选择体检单位",
  1018. trigger: "change",
  1019. },
  1020. ],
  1021. asbitemId: [
  1022. {
  1023. required: true,
  1024. message: "请选择组合项目",
  1025. trigger: "change",
  1026. },
  1027. ],
  1028. forSexId: [
  1029. {
  1030. required: true,
  1031. message: "请选择组适用性别",
  1032. trigger: "change",
  1033. },
  1034. ],
  1035. guide: [{ required: true, message: "请输入指引内容", trigger: "blur" }],
  1036. },
  1037. guidetitle: 1,
  1038. guideform: {
  1039. medicalCenterId: "",
  1040. asbitemId: "",
  1041. forSexId: "",
  1042. guide: "",
  1043. }, //指引信息的数据对象
  1044. organizationUnitdata: [], //体检中心
  1045. guidetitledialogVisible: false,
  1046. formdata: {
  1047. guidanceinformationdata: [],
  1048. },
  1049. activeName: "first",
  1050. isdislob: true,
  1051. filetelists: [],
  1052. flitvalues: [],
  1053. num: 0,
  1054. isshow: true,
  1055. values: [],
  1056. projectid: [],
  1057. initprojectid: [],
  1058. rules: {
  1059. displayName: [
  1060. { required: true, message: "请输入名称", trigger: "blur" },
  1061. ],
  1062. shortName: [{ required: true, message: "请输入简称", trigger: "blur" }],
  1063. forSexId: [
  1064. { required: true, message: "请选择适用性别", trigger: "blur" },
  1065. ],
  1066. itemTypeId: [
  1067. { required: true, message: "请选择项目类别", trigger: "blur" },
  1068. ],
  1069. price: [{ required: true, message: "请输入价格", trigger: "blur" }],
  1070. deviceTypeId: [
  1071. { required: true, message: "请选择仪器类别", trigger: "blur" },
  1072. ],
  1073. invoiceItemTypeId: [
  1074. { required: true, message: "请选择发票类别", trigger: "blur" },
  1075. ],
  1076. isItemResultMerger: [
  1077. { required: true, message: "请选择项目结果", trigger: "blur" },
  1078. ],
  1079. isBeforeEat: [
  1080. { required: true, message: "请选择餐前项目", trigger: "change" },
  1081. ],
  1082. clinicalMeaning: [
  1083. { required: true, message: "请输入临床意义", trigger: "blur" },
  1084. ],
  1085. defaultResult: [
  1086. { required: true, message: "请输入默认结果", trigger: "blur" },
  1087. ],
  1088. queueTime: [
  1089. { required: true, message: "请输入候诊时间", trigger: "blur" },
  1090. ],
  1091. isDiagnosisFunction: [
  1092. { required: true, message: "请选择启用诊断函数", trigger: "blur" },
  1093. ],
  1094. diagnosisFunction: [
  1095. { required: true, message: "请输入诊断函数", trigger: "blur" },
  1096. ],
  1097. isContinueProcess: [
  1098. {
  1099. required: true,
  1100. message: "请选择诊断函数处理完毕后继续处理",
  1101. trigger: "blur",
  1102. },
  1103. ],
  1104. isPictureRotate: [
  1105. { required: true, message: "请选择体检报告图片旋", trigger: "blur" },
  1106. ],
  1107. isCheck: [
  1108. { required: true, message: "请选择是检查项目", trigger: "blur" },
  1109. ],
  1110. isActive: [
  1111. { required: true, message: "请选择是否启用", trigger: "blur" },
  1112. ],
  1113. }, //表单校验对象
  1114. form: {
  1115. displayName: "",
  1116. shortName: "",
  1117. forSexId: "A",
  1118. itemTypeId: "",
  1119. price: "0",
  1120. deviceTypeId: null,
  1121. invoiceItemTypeId: "",
  1122. isItemResultMerger: "N",
  1123. isBeforeEat: "N",
  1124. clinicalMeaning: "",
  1125. defaultResult: "未见异常",
  1126. queueTime: "0",
  1127. isDiagnosisFunction: "N",
  1128. diagnosisFunction: "",
  1129. isContinueProcess: "N",
  1130. isPictureRotate: "N",
  1131. isCheck: "N",
  1132. isActive: "Y",
  1133. isActiveBox: true,
  1134. isBeforeEatBox: false,
  1135. isCheckBox: true,
  1136. isContinueProcessBox: false,
  1137. isDiagnosisFunctionBox: false,
  1138. isItemResultMergerBox: false,
  1139. isPictureRotateBox: false,
  1140. },
  1141. forSexId: [], //性别
  1142. itemTypeId: [], //项目类别
  1143. deviceTypeId: [], //仪器类别
  1144. invoiceItemTypeId: [], //发票类别
  1145. isItemResultMerger: [
  1146. {
  1147. value: "Y",
  1148. label: "是",
  1149. },
  1150. {
  1151. value: "N",
  1152. label: "否",
  1153. },
  1154. ], //项目结果合并
  1155. isBeforeEat: [
  1156. {
  1157. value: "Y",
  1158. label: "是",
  1159. },
  1160. {
  1161. value: "N",
  1162. label: "否",
  1163. },
  1164. ], //餐前项目
  1165. isDiagnosisFunction: [
  1166. {
  1167. value: "Y",
  1168. label: "是",
  1169. },
  1170. {
  1171. value: "N",
  1172. label: "否",
  1173. },
  1174. ], //启用诊断函数
  1175. isContinueProcess: [
  1176. {
  1177. value: "Y",
  1178. label: "是",
  1179. },
  1180. {
  1181. value: "N",
  1182. label: "否",
  1183. },
  1184. ], //诊断函数处理完毕
  1185. isContinueProcess: [
  1186. {
  1187. value: "Y",
  1188. label: "是",
  1189. },
  1190. {
  1191. value: "N",
  1192. label: "否",
  1193. },
  1194. ], //诊断函数处理完毕后继续处理
  1195. isPictureRotate: [
  1196. {
  1197. value: "Y",
  1198. label: "是",
  1199. },
  1200. {
  1201. value: "N",
  1202. label: "否",
  1203. },
  1204. ], //体检报告图片旋转
  1205. isCheck: [
  1206. {
  1207. value: "Y",
  1208. label: "是",
  1209. },
  1210. {
  1211. value: "N",
  1212. label: "否",
  1213. },
  1214. ], //是检查项目
  1215. isActive: [
  1216. {
  1217. value: "Y",
  1218. label: "是",
  1219. },
  1220. {
  1221. value: "N",
  1222. label: "否",
  1223. },
  1224. ], //是否启用
  1225. title: 1,
  1226. dialogVisible: false,
  1227. isshow: true,
  1228. tableHeight: window.innerHeight - 180, //表格动态高度
  1229. screenHeight: window.innerHeight, //内容区域高度
  1230. pages: {
  1231. Filter: "",
  1232. SkipCount: 0,
  1233. MaxResultCount: 100,
  1234. Sorting: "displayOrder desc",
  1235. },
  1236. tableData: [],
  1237. initTableData: [],
  1238. leftdata: [],
  1239. ary2: [],
  1240. ary1: [],
  1241. rightobj: {},
  1242. rightdata: [],
  1243. rightobj: {},
  1244. nums: 0,
  1245. itemid: "", //项目id
  1246. curRow: {},
  1247. asbitemdata: [], //组合项目
  1248. forsexdata: [], //适用性别
  1249. department: "",
  1250. quckDepartment: [],
  1251. treeprops: {
  1252. label: "displayName",
  1253. value: "id",
  1254. children: "treeChildren",
  1255. },
  1256. defaultResult: [
  1257. {
  1258. value: "1",
  1259. label: "未见异常",
  1260. },
  1261. {
  1262. value: "2",
  1263. label: "正常",
  1264. },
  1265. {
  1266. value: "3",
  1267. label: "阴性",
  1268. },
  1269. {
  1270. value: "4",
  1271. label: "无",
  1272. },
  1273. {
  1274. value: "5",
  1275. label: "(—)",
  1276. },
  1277. {
  1278. value: "6",
  1279. label: "­-",
  1280. },
  1281. ],
  1282. diagnosisFunctionBox: false,
  1283. diagnosisFunctionText: "",
  1284. disableddiagnosisFunction: true,
  1285. initfiletelists: [],
  1286. initItemTypeId: "",
  1287. guidelinesRules: {
  1288. medicalCenterId: [
  1289. { required: true, message: "请选择体检中心", trigger: "change" },
  1290. ],
  1291. forSexId: [
  1292. { required: true, message: "请选择性别", trigger: "change" },
  1293. ],
  1294. guide: [{ required: true, message: "请输入指引信息", trigger: "blur" }],
  1295. },
  1296. };
  1297. },
  1298. created() {
  1299. // this.getlist();
  1300. this.gitprojectcategory();
  1301. },
  1302. mounted() {
  1303. this.rowDrop();
  1304. this.gitfleslist();
  1305. this.typeid();
  1306. },
  1307. updated() {
  1308. this.$nextTick(() => {
  1309. this.$refs.table.doLayout()
  1310. })
  1311. },
  1312. computed: {
  1313. ...mapState(["window"]),
  1314. },
  1315. methods: {
  1316. removeAsbItem(row) {
  1317. this.ary2 = [row];
  1318. },
  1319. chooseAsbItem(row) {
  1320. this.ary1 = [row];
  1321. },
  1322. changeUpdate(e, k) {
  1323. this.$delete(this.form, k);
  1324. this.$set(this.form, k, e);
  1325. },
  1326. projectCancellation() {
  1327. if (this.form.id == undefined || this.form.id == "") {
  1328. this.$message.warning("请选择组合项目");
  1329. this.isdislob = true;
  1330. } else {
  1331. this.rowick(this.form);
  1332. this.isdislob = true;
  1333. }
  1334. },
  1335. remoteMethods(keyWords) {
  1336. if (keyWords) {
  1337. this.filetelists = [];
  1338. this.initfiletelists.forEach((item) => {
  1339. if (
  1340. item.displayName.toLowerCase().indexOf(keyWords.toLowerCase()) >
  1341. -1 ||
  1342. item.simpleCode.toLowerCase().indexOf(keyWords.toLowerCase()) > -1
  1343. // || item.shortName.toLowerCase().indexOf(keyWords.toLowerCase()) > - 1
  1344. ) {
  1345. this.filetelists.push(item);
  1346. }
  1347. });
  1348. } else {
  1349. this.filetelists = deepCopy(this.initfiletelists);
  1350. }
  1351. },
  1352. remoteMethod(keyWords) {
  1353. if (keyWords) {
  1354. this.projectid = [];
  1355. this.initprojectid.forEach((item) => {
  1356. if (
  1357. item.displayName.toLowerCase().indexOf(keyWords.toLowerCase()) >
  1358. -1 ||
  1359. item.simpleCode.toLowerCase().indexOf(keyWords.toLowerCase()) > -1
  1360. // || item.shortName.toLowerCase().indexOf(keyWords.toLowerCase()) > - 1
  1361. ) {
  1362. this.projectid.push(item);
  1363. }
  1364. });
  1365. } else {
  1366. this.projectid = deepCopy(this.initprojectid);
  1367. }
  1368. },
  1369. OnsubmitDiagnosis() {
  1370. this.form.diagnosisFunction = this.diagnosisFunctionText;
  1371. this.diagnosisFunctionText = "";
  1372. this.diagnosisFunctionBox = false;
  1373. this.$message.success("设置诊断函数成功");
  1374. },
  1375. quckRusetform(e) {
  1376. this.$forceUpdate();
  1377. },
  1378. changeBox(type) {
  1379. //赋值
  1380. if (this.form[type + "Box"]) {
  1381. this.$delete(this.form, type);
  1382. this.$set(this.form, type, "Y");
  1383. } else {
  1384. this.$delete(this.form, type);
  1385. this.$set(this.form, type, "N");
  1386. }
  1387. },
  1388. typeid() {
  1389. projectlist().then((res) => {
  1390. if (res.code != -1) {
  1391. this.itemTypeId = res.data;
  1392. this.itemTypeId = this.formatData(this.itemTypeId);
  1393. }
  1394. });
  1395. },
  1396. formatData(dataList) {
  1397. for (let i = 0; i < dataList.length; i++) {
  1398. if (dataList[i].treeChildren.length < 1) {
  1399. dataList[i].treeChildren = undefined;
  1400. } else {
  1401. this.formatData(dataList[i].treeChildren);
  1402. }
  1403. }
  1404. return dataList;
  1405. },
  1406. treeclick(data) {
  1407. this.initItemTypeId = data.id;
  1408. postapi("/api/app/asbitem/getasbitemlist", { itemTypeId: data.id }).then(
  1409. (res) => {
  1410. if (res.code != -1) {
  1411. this.tableData = res.data;
  1412. // this.initTableData = [...res.data];
  1413. }
  1414. }
  1415. );
  1416. this.curRow = this.$options.data().curRow;
  1417. this.leftdata = this.$options.data().leftdata;
  1418. this.rightdata = this.$options.data().rightdata;
  1419. this.formdata = this.$options.data().formdata;
  1420. this.values = this.$options.data().values;
  1421. this.flitvalues = this.$options.data().flitvalues;
  1422. },
  1423. remoteMethodes(keyWords) {
  1424. if (keyWords) {
  1425. this.quckDepartment = [];
  1426. this.initTableData.forEach((item) => {
  1427. if (
  1428. item.displayName.toLowerCase().indexOf(keyWords.toLowerCase()) >
  1429. -1 ||
  1430. item.simpleCode.toLowerCase().indexOf(keyWords.toLowerCase()) > -1
  1431. // || item.shortName.toLowerCase().indexOf(keyWords.toLowerCase()) > - 1
  1432. ) {
  1433. this.quckDepartment.push(item);
  1434. }
  1435. });
  1436. } else {
  1437. this.quckDepartment = deepCopy(this.initTableData);
  1438. }
  1439. },
  1440. quckDepartments(e) {
  1441. if (e) {
  1442. let currentKey = "";
  1443. this.quckDepartment.forEach((item) => {
  1444. if (e == item.id) {
  1445. currentKey = item.itemTypeId;
  1446. this.initItemTypeId = item.itemTypeId;
  1447. }
  1448. });
  1449. this.$refs["itemType"].setCurrentKey(currentKey);
  1450. let selected = this.$refs["itemType"].getCurrentNode();
  1451. if (
  1452. this.$refs["itemType"].getNode(selected) &&
  1453. this.$refs["itemType"].getNode(selected).parent
  1454. ) {
  1455. this.expandParents(this.$refs["itemType"].getNode(selected).parent);
  1456. }
  1457. // getapi(`/api/app/asbitem/in-item-type/${currentKey}`)
  1458. postapi("/api/app/asbitem/getasbitemlist", {
  1459. itemTypeId: currentKey,
  1460. }).then((res) => {
  1461. if (res.code != -1) {
  1462. this.tableData = res.data;
  1463. this.tableData.forEach((item, index) => {
  1464. if (e == item.id) {
  1465. this.$refs["tableData"].setCurrentRow(item);
  1466. this.rowick(item);
  1467. this.tableScrollToRow(this.$refs.tableData, index);
  1468. this.searchup(item, index)
  1469. }
  1470. });
  1471. }
  1472. });
  1473. } else {
  1474. this.remoteMethodes();
  1475. }
  1476. },
  1477. searchup(data,index) {
  1478. this.$nextTick(()=>{
  1479. if(index>3){
  1480. const targetTop = this.$refs["tableData"].$el.querySelectorAll('.el-table__body tr')[index-1].getBoundingClientRect().top
  1481. const containerTop = this.$refs["tableData"].$el.querySelector('.el-table__body').getBoundingClientRect().top
  1482. const scrollParent = this.$refs["tableData"].$el.querySelector('.el-table__body-wrapper')
  1483. scrollParent.scrollTop = targetTop - containerTop
  1484. }
  1485. })
  1486. },
  1487. expandParents(node) {
  1488. node.expanded = true;
  1489. if (node.parent) {
  1490. this.expandParents(node.parent);
  1491. }
  1492. },
  1493. tableScrollToRow(tableElement, rowIndex) {
  1494. let theTableRows = tableElement.bodyWrapper.querySelectorAll(
  1495. ".el-table__body tbody .el-table__row"
  1496. );
  1497. let scrollTop = 0;
  1498. for (let i = 0; i < theTableRows.length; i++) {
  1499. if (i === rowIndex) {
  1500. break;
  1501. }
  1502. scrollTop += theTableRows[i].offsetHeight;
  1503. }
  1504. tableElement.bodyWrapper.scrollTop = scrollTop;
  1505. },
  1506. guiderow(row) {
  1507. this.guideform = row;
  1508. },
  1509. tableRowClassName({ row, rowIndex }) {
  1510. row.index = rowIndex;
  1511. },
  1512. //指引信息删除
  1513. deleteguidelines() {
  1514. if (this.curRow.id == undefined || this.curRow.id == "") {
  1515. this.$message.warning("请先选择组合项目");
  1516. } else {
  1517. if (
  1518. this.guideform.asbitemId == "" ||
  1519. this.guideform.asbitemId == undefined
  1520. ) {
  1521. this.$message.warning("请选择删除的数据");
  1522. } else {
  1523. this.$confirm("此操作确定后将永久删除该记录, 是否继续?", "提示", {
  1524. confirmButtonText: "是",
  1525. cancelButtonText: "否",
  1526. type: "warning",
  1527. cancelButtonClass:"difference",
  1528. confirmButtonClass:"commonbutton"
  1529. })
  1530. .then(() => {
  1531. this.formdata.guidanceinformationdata.splice(
  1532. this.guideform.index,
  1533. 1
  1534. );
  1535. })
  1536. .catch((err) => {
  1537. if (err == "cancel") {
  1538. this.$message.info("已取消删除");
  1539. }
  1540. });
  1541. }
  1542. }
  1543. },
  1544. //确定新增或者修改指引ruleForm
  1545. determineguidelines() {
  1546. this.$refs.ruleForms.validate((v) => {
  1547. if (v) {
  1548. postapi("/api/app/asbitem-guide", this.guideform).then((res) => {
  1549. if (res.code != -1) {
  1550. this.guidetitledialogVisible = false;
  1551. this.getobtainguidance();
  1552. this.$message.success("创建成功");
  1553. }
  1554. });
  1555. }
  1556. });
  1557. },
  1558. //新增或者编辑需要的api中的id
  1559. publicapi() {
  1560. //获取体检中心
  1561. getapi("/api/app/organization-units/by-code-all").then((res) => {
  1562. if (res.code != -1) {
  1563. this.organizationUnitdata = res.data;
  1564. }
  1565. });
  1566. //获取组合项目
  1567. // getapi("/api/app/asbitem/in-filter").then((res) => {
  1568. // this.asbitemdata = res.data.items;
  1569. // });
  1570. postapi("/api/app/asbitem/getasbitemlist").then((res) => {
  1571. if (res.code != -1) {
  1572. this.asbitemdata = res.data;
  1573. }
  1574. });
  1575. //获取适用性别
  1576. // getapi("/api/app/for-sex").then((res) => {
  1577. // if (res.code != -1) {
  1578. // this.forsexdata = res.data;
  1579. // }
  1580. // });
  1581. },
  1582. //创建弹框
  1583. createabulletbox() {
  1584. // this.guidetitledialogVisible = true;
  1585. // this.guideform = {};
  1586. // this.guidetitle = 1;
  1587. // this.publicapi();
  1588. if (this.curRow.id == undefined || this.curRow.id == "") {
  1589. this.$message.warning("请先选择组合项目");
  1590. } else {
  1591. let peisid = "";
  1592. if (
  1593. window.sessionStorage.getItem("peisid") === "null" ||
  1594. window.sessionStorage.getItem("peisid") === undefined ||
  1595. window.sessionStorage.getItem("peisid") === null
  1596. ) {
  1597. peisid = "";
  1598. } else {
  1599. peisid = window.sessionStorage.getItem("peisid");
  1600. }
  1601. this.formdata.guidanceinformationdata.push({
  1602. medicalCenterId: peisid,
  1603. asbitemId: this.curRow.id,
  1604. forSexId: "A",
  1605. guide: "",
  1606. });
  1607. }
  1608. },
  1609. saveguidelines() {
  1610. this.$refs["guidanceinformation"].validate((valid, fields) => {
  1611. if (!valid) {
  1612. this.$message.warning(fields[Object.keys(fields)[0]][0].message);
  1613. return false;
  1614. }
  1615. if (this.curRow.id == undefined || this.curRow.id == "") {
  1616. this.$message.warning("请先选择组合项目");
  1617. } else {
  1618. let sampleGroupId = this.curRow.id;
  1619. let sdate = [];
  1620. this.formdata.guidanceinformationdata.forEach((element) => {
  1621. sdate.push({
  1622. medicalCenterId: element.medicalCenterId,
  1623. forSexId: element.forSexId,
  1624. guide: element.guide,
  1625. });
  1626. });
  1627. postapi("/api/app/asbitemguide/createasbitemguidemany", {
  1628. asbitemId: sampleGroupId,
  1629. deatils: sdate,
  1630. }).then((res) => {
  1631. if (res.code != -1) {
  1632. this.$message.success("保存成功");
  1633. }
  1634. });
  1635. }
  1636. });
  1637. },
  1638. //获取指引信息guidanceinformationdata
  1639. getobtainguidance(e) {
  1640. if (e != undefined || e != "") {
  1641. getapi(`/api/app/asbitemguide/getlistinasbitemid?AsbitemId=${e}`).then(
  1642. (res) => {
  1643. if (res.data != -1) {
  1644. this.formdata.guidanceinformationdata = [...res.data];
  1645. }
  1646. }
  1647. );
  1648. } else {
  1649. this.$message.warning("请先选择组合项目");
  1650. }
  1651. },
  1652. //获取项目
  1653. gitfleslist() {
  1654. let pages = {
  1655. Filter: "",
  1656. Sorting: "",
  1657. SkipCount: 0,
  1658. MaxResultCount: 100,
  1659. };
  1660. getporjectlists(pages).then((res) => {
  1661. if (res.code != -1) {
  1662. this.filetelists = res.data.items;
  1663. this.initfiletelists = [...res.data.items];
  1664. }
  1665. });
  1666. },
  1667. //搜索选择
  1668. selectitem(v) {
  1669. if (v) {
  1670. if (this.curRow.id == undefined || this.curRow.id == "") {
  1671. this.$message.warning("请先选择组合项目");
  1672. } else {
  1673. this.itemid = v.id;
  1674. if (this.rightdata.length < 1) {
  1675. this.rightdata.push({ displayName: v.displayName, id: v.id });
  1676. this.isdislob = false;
  1677. } else {
  1678. for (let i = 0; i < this.rightdata.length; i++) {
  1679. if (v.id === this.rightdata[i].id) {
  1680. return this.$message.warning("已有该项目");
  1681. }
  1682. }
  1683. this.rightdata.push({ displayName: v.displayName, id: v.id });
  1684. this.isdislob = false;
  1685. }
  1686. this.$nextTick(() => {
  1687. this.$refs["quickAsbOCX"].blur(); //total asbItemId
  1688. this.flitvalues = "";
  1689. this.filetelists = deepCopy(this.initfiletelists);
  1690. this.$refs["quickAsbOCX"].focus(); //total asbItemId
  1691. });
  1692. }
  1693. } else {
  1694. this.remoteMethods();
  1695. }
  1696. },
  1697. Onsubmit() {
  1698. let sampleGroupId = this.form.id;
  1699. let sdate = [];
  1700. // let sss = { itemId: this.itemid, asbitemId: sampleGroupId };
  1701. // sdate.push(sss);
  1702. this.rightdata.forEach((element) => {
  1703. sdate.push({ asbitemId: sampleGroupId, itemId: element.id });
  1704. });
  1705. // this.leftdata.forEach((element) => {
  1706. // sdate.push({ asbitemId: sampleGroupId, itemId: element.id });
  1707. // });
  1708. // this.leftdata.forEach((element) => {
  1709. // let sss = { sampleGroupId: sampleGroupId, asbitemId: element.id };
  1710. // sdate.push(sss);
  1711. // });
  1712. // sdate.push(sss);
  1713. if (sampleGroupId == undefined || sampleGroupId == "") {
  1714. this.$message.warning("请选择组合项目");
  1715. this.isdislob = true;
  1716. } else {
  1717. postapi("/api/app/asbitemdetail/createasbitemdetailmany", {
  1718. asbitemId: sampleGroupId,
  1719. details: sdate,
  1720. }).then((res) => {
  1721. if (res.code != -1) {
  1722. this.isdislob = true;
  1723. this.$message.success("确定成功!");
  1724. }
  1725. });
  1726. }
  1727. // console.log(sdate);
  1728. // if (sampleGroupId == undefined) {
  1729. // this.$message.warning("请选择列表");
  1730. // } else if (this.itemid == "") {
  1731. // this.$message.warning("请选择项目");
  1732. // } else {
  1733. // postapi("/api/app/asbitem-detail/many", sdate).then((res) => {
  1734. // console.log("操作成功");
  1735. // this.isdislob = true;
  1736. // });
  1737. // }
  1738. },
  1739. dbClickChoosedAsb(row, column, event) {
  1740. let index = this.leftdata.findIndex((arr) => arr.id == row.id);
  1741. this.leftdata.splice(index, 1);
  1742. this.rightdata.push(row);
  1743. this.isdislob = false;
  1744. this.ary1 = [];
  1745. },
  1746. handleSelectionChange(val) {
  1747. this.ary1 = val;
  1748. },
  1749. addAbs() {
  1750. if (this.curRow.id == undefined || this.curRow.id == "") {
  1751. this.$message.warning("请先选择组合项目");
  1752. } else {
  1753. if (this.ary1.length < 1) {
  1754. this.$message.warning("请选择要添加的项目");
  1755. } else {
  1756. let temporaryLeft = [];
  1757. temporaryLeft = this.leftdata.filter(
  1758. (item) => !this.ary1.some((ele) => ele.id === item.id)
  1759. );
  1760. this.leftdata = [...temporaryLeft];
  1761. this.ary1.forEach((item) => {
  1762. this.rightdata.push(item);
  1763. });
  1764. this.isdislob = false;
  1765. this.ary1 = [];
  1766. }
  1767. }
  1768. },
  1769. removeAbs(row) {
  1770. let index = this.rightdata.findIndex((arr) => arr.id == row.id);
  1771. this.rightdata.splice(index, 1);
  1772. this.leftdata.push(row);
  1773. this.isdislob = false;
  1774. this.ary2 = [];
  1775. },
  1776. selecteditems(val) {
  1777. this.ary2 = val;
  1778. },
  1779. delAbs() {
  1780. if (this.curRow.id == undefined || this.curRow.id == "") {
  1781. this.$message.warning("请先选择组合项目");
  1782. } else {
  1783. if (this.ary2.length < 1) {
  1784. this.$message.warning("请选择要移除的项目");
  1785. } else {
  1786. let temporaryRight = [];
  1787. temporaryRight = this.rightdata.filter(
  1788. (item) => !this.ary2.some((ele) => ele.id === item.id)
  1789. );
  1790. this.rightdata = [...temporaryRight];
  1791. this.ary2.forEach((item) => {
  1792. this.leftdata.push(item);
  1793. });
  1794. this.isdislob = false;
  1795. this.ary2 = [];
  1796. }
  1797. }
  1798. },
  1799. //右侧双击移动删除
  1800. rightdelite(item, index) {
  1801. this.isdislob = false;
  1802. this.rightdata.splice(index, 1);
  1803. this.leftdata.push(item);
  1804. // this.updatedate();
  1805. },
  1806. //右侧点击选中
  1807. rightindex(item, index) {
  1808. this.nums = index;
  1809. this.leftobj = item;
  1810. // console.log(this.leftobj);
  1811. },
  1812. //左侧添加按钮
  1813. addobj() {
  1814. if (this.leftdata.length > 0) {
  1815. this.leftdata.splice(this.num, 1);
  1816. this.rightdata.push(this.rightobj);
  1817. this.isdislob = false;
  1818. }
  1819. },
  1820. //右移动
  1821. removeright() {
  1822. if (this.rightdata.length > 0) {
  1823. this.rightdata.splice(this.num, 1);
  1824. this.leftdata.push(this.leftobj);
  1825. this.isdislob = false;
  1826. // this.isdislob=false
  1827. this.updatedate();
  1828. }
  1829. },
  1830. //q全移去
  1831. allclear() {
  1832. if (this.curRow.id == undefined || this.curRow.id == "") {
  1833. this.$message.warning("请先选择组合项目");
  1834. } else {
  1835. if (this.rightdata.length > 0) {
  1836. this.rightdata.forEach((item) => {
  1837. this.leftdata.push(item);
  1838. });
  1839. this.rightdata = [];
  1840. this.isdislob = false;
  1841. } else {
  1842. this.$message.warning("没有可移除的项目");
  1843. }
  1844. }
  1845. },
  1846. //全添加
  1847. addall() {
  1848. if (this.curRow.id == undefined || this.curRow.id == "") {
  1849. this.$message.warning("请先选择组合项目");
  1850. } else {
  1851. if (this.leftdata.length > 0) {
  1852. this.leftdata.forEach((item) => {
  1853. this.rightdata.push(item);
  1854. });
  1855. this.leftdata = [];
  1856. this.isdislob = false;
  1857. } else {
  1858. this.$message.warning("没有可添加的项目");
  1859. }
  1860. }
  1861. },
  1862. //左侧双击事件
  1863. shuanji(item, index) {
  1864. this.leftdata.splice(index, 1);
  1865. this.rightdata.push(item);
  1866. this.isdislob = false;
  1867. },
  1868. clickPaixu(item, index) {
  1869. this.rightobj = item;
  1870. this.num = index;
  1871. },
  1872. //获取项目类别 3a0b0b10-719f-5824-6956-8cb70f204013 /api/app/item-type/by-code-all
  1873. gitprojectcategory() {
  1874. getapi("/api/app/item-type/by-code-all").then((res) => {
  1875. if (res.code != -1) {
  1876. this.projectid = res.data;
  1877. this.initprojectid = [...res.data];
  1878. }
  1879. });
  1880. postapi("/api/app/asbitem/getasbitemlist").then((res) => {
  1881. if (res.code != -1) {
  1882. this.initTableData = res.data;
  1883. this.quckDepartment = [...res.data];
  1884. }
  1885. });
  1886. // groupsandlist(this.pages).then((res) => {
  1887. // if(res.code!=-1){
  1888. // this.initTableData = [...res.data.items];
  1889. // this.quckDepartment=res.data.items;
  1890. // initTableData
  1891. // }
  1892. // });
  1893. },
  1894. //ary1 需要追加的数据 ary2目标数组
  1895. updatedate() {
  1896. this.ary1.forEach((item) => {
  1897. let iscz = false;
  1898. this.ary2.forEach((item2) => {
  1899. if (item2.id == item.id) {
  1900. iscz = true;
  1901. }
  1902. });
  1903. if (!iscz) {
  1904. this.ary2.push(item);
  1905. // this.allid.push({ id: item.id });
  1906. }
  1907. });
  1908. },
  1909. ischangsItemTypeId(v) {
  1910. if (v.length > 1) {
  1911. this.form.itemTypeId = this.form.itemTypeId.slice(-1)[0];
  1912. } else {
  1913. this.form.itemTypeId = this.form.itemTypeId[0];
  1914. }
  1915. this.$refs.itemTypeIds.toggleDropDownVisible();
  1916. },
  1917. //项目类别选择
  1918. ischangs(v) {
  1919. if (v) {
  1920. if (this.curRow.id == undefined || this.curRow.id == "") {
  1921. this.$message.warning("请先选择组合项目");
  1922. } else {
  1923. this.$refs.example.toggleDropDownVisible();
  1924. let last = v.slice(-1)[0];
  1925. getapi(`/api/app/item/in-item-type/${last}`).then((res) => {
  1926. if (res.code != -1) {
  1927. let bq = [];
  1928. bq = res.data.filter(
  1929. (item) => !this.rightdata.some((ele) => ele.id === item.id)
  1930. );
  1931. this.leftdata = [...bq];
  1932. }
  1933. });
  1934. }
  1935. } else {
  1936. this.remoteMethod();
  1937. }
  1938. },
  1939. bindidclose() {
  1940. this.form = {};
  1941. },
  1942. rowDrop() {
  1943. this.$nextTick(() => {
  1944. const tbody = document.querySelector(".el-table__body-wrapper tbody");
  1945. const _this = this;
  1946. Sortable.create(tbody, {
  1947. handle: ".move",
  1948. animation: 300,
  1949. onChoose({ oldIndex }) {
  1950. _this.$refs["tableData"].setCurrentRow(_this.tableData[oldIndex]);
  1951. _this.rowick(_this.tableData[oldIndex]);
  1952. },
  1953. onEnd({ newIndex, oldIndex }) {
  1954. _this.isshow = false;
  1955. const currRow = _this.tableData.splice(oldIndex, 1)[0];
  1956. _this.tableData.splice(newIndex, 0, currRow);
  1957. _this.tableData.map((item, index) => {
  1958. if (index == newIndex && index == oldIndex) {
  1959. } else if (index == oldIndex) {
  1960. } else if (index == newIndex) {
  1961. }
  1962. });
  1963. },
  1964. });
  1965. });
  1966. },
  1967. //取消按钮
  1968. cancellation() {
  1969. postapi("/api/app/asbitem/getasbitemlist", { itemTypeId: this.initItemTypeId }).then(
  1970. (res) => {
  1971. if (res.code != -1) {
  1972. this.tableData = res.data;
  1973. this.$message.info("操作取消");
  1974. this.isshow = true;
  1975. }
  1976. }
  1977. );
  1978. },
  1979. //确定排序
  1980. assertion() {
  1981. const result = [];
  1982. this.tableData.forEach((item, index) => {
  1983. // const currentDisplayOrder = this.initTableData[index].displayOrder;
  1984. // if (item.displayOrder != currentDisplayOrder) {
  1985. result.push({ id: item.id, displayOrder: index+1 });
  1986. // }
  1987. });
  1988. combination({ itemList: result }).then((res) => {
  1989. if (res.code != -1) {
  1990. this.$message.success("操作成功");
  1991. this.isshow = true;
  1992. }
  1993. // this.getlist();
  1994. });
  1995. },
  1996. //置底
  1997. setlow() {
  1998. this.form = { ...this.curRow };
  1999. if (this.form.id == undefined) {
  2000. this.$message.warning("请选择操作的数据");
  2001. } else {
  2002. samplesetlow(this.form.id, 2).then((res) => {
  2003. if (res.code != -1) {
  2004. this.getItemIdList();
  2005. this.$message.success("操作成功");
  2006. }
  2007. });
  2008. }
  2009. },
  2010. //置顶
  2011. topping() {
  2012. this.form = { ...this.curRow };
  2013. if (this.form.id == undefined) {
  2014. this.$message.warning("请选择操作的数据");
  2015. } else {
  2016. samplesetlow(this.form.id, 1).then((res) => {
  2017. if (res.code != -1) {
  2018. this.getItemIdList();
  2019. this.$message.success("操作成功");
  2020. }
  2021. });
  2022. }
  2023. },
  2024. //删除
  2025. deleteid() {
  2026. this.form = { ...this.curRow };
  2027. if (this.form.id == undefined) {
  2028. this.$message.warning("请选择操作的数据");
  2029. } else {
  2030. this.$confirm("是否确认删除, 是否继续?", "提示", {
  2031. confirmButtonText: "确定",
  2032. cancelButtonText: "取消",
  2033. type: "warning",
  2034. cancelButtonClass:"difference",
  2035. confirmButtonClass:"commonbutton"
  2036. }).then(() => {
  2037. deletescombinationprojectid(this.form.id).then((res) => {
  2038. if (res.code != -1) {
  2039. this.getItemIdList();
  2040. Object.assign(this.$data.form, this.$options.data().form);
  2041. this.curRow = this.$options.data().curRow;
  2042. this.$message.success("删除成功");
  2043. }
  2044. });
  2045. });
  2046. // deletescombinationprojectid(this.form.id).then((res) => {
  2047. // console.log("删除成功");
  2048. // this.getlist();
  2049. // });
  2050. }
  2051. },
  2052. //编辑弹框
  2053. editpopup() {
  2054. this.form = { ...this.curRow };
  2055. if (this.form.id == undefined) {
  2056. this.$message.warning("请点击选择操作的数据");
  2057. } else {
  2058. this.form.price = Number(this.form.price);
  2059. this.title = 2;
  2060. this.dialogVisible = true;
  2061. if (this.$refs.ruleForm !== undefined) {
  2062. this.$refs.ruleForm.resetFields();
  2063. }
  2064. asbitemgetid(this.form.id).then((res) => {
  2065. if (res.code != -1) {
  2066. this.form = res.data;
  2067. if (res.data.isItemResultMerger == "Y") {
  2068. this.form.isItemResultMergerBox = true;
  2069. } else {
  2070. this.form.isItemResultMergerBox = false;
  2071. }
  2072. if (res.data.isBeforeEat == "Y") {
  2073. this.form.isBeforeEatBox = true;
  2074. } else {
  2075. this.form.isBeforeEatBox = false;
  2076. }
  2077. if (res.data.isDiagnosisFunction == "Y") {
  2078. this.form.isDiagnosisFunctionBox = true;
  2079. } else {
  2080. this.form.isDiagnosisFunctionBox = false;
  2081. }
  2082. if (res.data.isContinueProcess == "Y") {
  2083. this.form.isContinueProcessBox = true;
  2084. } else {
  2085. this.form.isContinueProcessBox = false;
  2086. }
  2087. if (res.data.isPictureRotate == "Y") {
  2088. this.form.isPictureRotateBox = true;
  2089. } else {
  2090. this.form.isPictureRotateBox = false;
  2091. }
  2092. if (res.data.isCheck == "Y") {
  2093. this.form.isCheckBox = true;
  2094. } else {
  2095. this.form.isCheckBox = false;
  2096. }
  2097. if (res.data.isActive == "Y") {
  2098. this.form.isActiveBox = true;
  2099. } else {
  2100. this.form.isActiveBox = false;
  2101. }
  2102. }
  2103. });
  2104. //性别
  2105. // examinationgender().then((res) => {
  2106. // this.forSexId = res.data;
  2107. // });
  2108. //适用性别
  2109. getapi("/api/app/for-sex").then((res) => {
  2110. if(res.code!=-1){
  2111. this.forSexId = res.data;
  2112. }
  2113. });
  2114. //项目类别
  2115. // projectlist().then((res) => {
  2116. // this.itemTypeId = res.data;
  2117. // });
  2118. //仪器类别
  2119. instrumentlist().then((res) => {
  2120. if (res.code != -1) {
  2121. this.deviceTypeId = res.data.items;
  2122. }
  2123. });
  2124. //发票项目类别
  2125. invoicetypelist().then((res) => {
  2126. if (res.code != -1) {
  2127. this.invoiceItemTypeId = res.data.items;
  2128. }
  2129. });
  2130. }
  2131. },
  2132. editcancellation() {
  2133. this.dialogVisible = false;
  2134. // this.$refs.itemTypeIds.toggleDropDownVisible();
  2135. },
  2136. //确定新增或者编辑
  2137. addoredit() {
  2138. this.$refs.ruleForm.validate((v) => {
  2139. if (v) {
  2140. if (this.title == 1) {
  2141. let obj = {
  2142. displayName: this.form.displayName,
  2143. shortName: this.form.shortName,
  2144. forSexId: this.form.forSexId,
  2145. itemTypeId: this.form.itemTypeId,
  2146. price: Number(this.form.price),
  2147. deviceTypeId: this.form.deviceTypeId,
  2148. invoiceItemTypeId: this.form.invoiceItemTypeId,
  2149. isItemResultMerger: this.form.isItemResultMerger,
  2150. isBeforeEat: this.form.isBeforeEat,
  2151. clinicalMeaning: this.form.clinicalMeaning,
  2152. defaultResult: this.form.defaultResult,
  2153. queueTime: this.form.queueTime,
  2154. isDiagnosisFunction: this.form.isDiagnosisFunction,
  2155. diagnosisFunction: this.form.diagnosisFunction,
  2156. isContinueProcess: this.form.isContinueProcess,
  2157. isPictureRotate: this.form.isPictureRotate,
  2158. isCheck: this.form.isCheck,
  2159. isActive: this.form.isActive,
  2160. };
  2161. newcombination(obj).then((res) => {
  2162. if (res.code != -1) {
  2163. this.getItemIdList();
  2164. this.dialogVisible = false;
  2165. this.$nextTick(() => {
  2166. this.$refs["tableData"].setCurrentRow(res.data);
  2167. this.rowick(res.data);
  2168. });
  2169. this.$message.success("新增成功");
  2170. // this.$refs.itemTypeIds.toggleDropDownVisible();
  2171. }
  2172. });
  2173. } else if (this.title == 2) {
  2174. let obj = {
  2175. displayName: this.form.displayName,
  2176. shortName: this.form.shortName,
  2177. forSexId: this.form.forSexId,
  2178. itemTypeId: this.form.itemTypeId,
  2179. price: Number(this.form.price),
  2180. deviceTypeId: this.form.deviceTypeId,
  2181. invoiceItemTypeId: this.form.invoiceItemTypeId,
  2182. isItemResultMerger: this.form.isItemResultMerger,
  2183. isBeforeEat: this.form.isBeforeEat,
  2184. clinicalMeaning: this.form.clinicalMeaning,
  2185. defaultResult: this.form.defaultResult,
  2186. queueTime: this.form.queueTime,
  2187. isDiagnosisFunction: this.form.isDiagnosisFunction,
  2188. diagnosisFunction: this.form.diagnosisFunction,
  2189. isContinueProcess: this.form.isContinueProcess,
  2190. isPictureRotate: this.form.isPictureRotate,
  2191. isCheck: this.form.isCheck,
  2192. isActive: this.form.isActive,
  2193. };
  2194. updateombination(this.form.id, obj).then((res) => {
  2195. if (res.code != -1) {
  2196. this.tableData.forEach((item, index) => {
  2197. if (res.data.id == item.id) {
  2198. this.$set(this.tableData, index, res.data);
  2199. }
  2200. });
  2201. this.dialogVisible = false;
  2202. this.$nextTick(() => {
  2203. this.rowick(res.data);
  2204. });
  2205. this.$message.success("修改成功");
  2206. // this.$refs.itemTypeIds.toggleDropDownVisible();
  2207. }
  2208. });
  2209. }
  2210. }
  2211. });
  2212. },
  2213. getItemIdList() {
  2214. postapi("/api/app/asbitem/getasbitemlist", {
  2215. itemTypeId: this.initItemTypeId,
  2216. }).then((res) => {
  2217. if (res.code != -1) {
  2218. this.tableData = res.data;
  2219. }
  2220. });
  2221. },
  2222. //新增弹框
  2223. addll() {
  2224. if (this.initItemTypeId == undefined || this.initItemTypeId == "") {
  2225. this.$message.warning("请选择项目类别");
  2226. } else {
  2227. this.dialogVisible = true;
  2228. this.title = 1;
  2229. if (this.$refs.ruleForm !== undefined) {
  2230. this.$refs.ruleForm.resetFields();
  2231. }
  2232. Object.assign(this.$data.form, this.$options.data().form);
  2233. this.form.itemTypeId = this.initItemTypeId;
  2234. this.$nextTick(() => {
  2235. this.$refs.refinput.focus();
  2236. });
  2237. //性别
  2238. // examinationgender().then((res) => {
  2239. // if (res.code != -1) {
  2240. // this.forSexId = res.data;
  2241. // }
  2242. // });
  2243. getapi("/api/app/for-sex").then((res) => {
  2244. if(res.code!=-1){
  2245. this.forSexId = res.data;
  2246. }
  2247. });
  2248. // //项目类别
  2249. // projectlist().then((res) => {
  2250. // this.itemTypeId = res.data;
  2251. // });
  2252. //仪器类别
  2253. instrumentlist().then((res) => {
  2254. if (res.code != -1) {
  2255. this.deviceTypeId = res.data.items;
  2256. }
  2257. });
  2258. //发票项目类别
  2259. invoicetypelist().then((res) => {
  2260. if (res.code != -1) {
  2261. this.invoiceItemTypeId = res.data.items;
  2262. }
  2263. });
  2264. }
  2265. },
  2266. rowick(row) {
  2267. this.curRow = { ...row };
  2268. this.form = { ...row };
  2269. // asbitemgetid(row.id).then((res) => {
  2270. // this.curRow = { ...res.data };
  2271. // this.form = res.data;
  2272. // });
  2273. this.values = row.itemTypeId;
  2274. getapi(
  2275. `/api/app/asbitem-detail/asbitem-detail-in-item?AsbitemId=${row.id}`
  2276. ).then((res) => {
  2277. if (res.code != -1) {
  2278. this.rightdata = [...res.data];
  2279. getapi(`/api/app/item/in-item-type/${this.values}`).then((res) => {
  2280. // this.leftdata = [...res.data];
  2281. if (res.code != -1) {
  2282. let bq = [];
  2283. bq = res.data.filter(
  2284. (item) => !this.rightdata.some((ele) => ele.id === item.id)
  2285. );
  2286. this.leftdata = [...bq];
  2287. }
  2288. });
  2289. }
  2290. });
  2291. this.getobtainguidance(this.curRow.id);
  2292. this.publicapi();
  2293. },
  2294. getSummaries(param){
  2295. const { columns, data } = param;
  2296. const sums = [];
  2297. columns.forEach((column, index) => {
  2298. if (index === 0) {
  2299. sums[index] = '合计';
  2300. return;
  2301. }
  2302. if(index === 1){
  2303. sums[index] = data.length+'个';
  2304. return;
  2305. }
  2306. });
  2307. return sums;
  2308. },
  2309. getlist() {
  2310. groupsandlist(this.pages).then((res) => {
  2311. if (res.code != -1) {
  2312. this.initTableData = [...res.data.items];
  2313. this.tableData = [...res.data.items];
  2314. this.quckDepartment = [...res.data.items];
  2315. }
  2316. });
  2317. },
  2318. },
  2319. };
  2320. </script>
  2321. <style scoped>
  2322. @import "../../assets/css/global_button.css";
  2323. @import "../../assets/css/global_dialog.css";
  2324. @import "../../assets/css/global_table.css";
  2325. @import "../../assets/css/global_form.css";
  2326. @import "../../assets/css/global_input.css";
  2327. @import "../../assets/css/global.css";
  2328. .mainleftbox {
  2329. flex: 1;
  2330. }
  2331. .Selectbutton {
  2332. margin: 0 20px;
  2333. display: flex;
  2334. flex-direction: column;
  2335. justify-content: center;
  2336. align-items: center;
  2337. }
  2338. .mainbox {
  2339. display: flex;
  2340. justify-content: center;
  2341. margin-top: 5px;
  2342. }
  2343. .box {
  2344. display: flex;
  2345. flex-direction: column;
  2346. }
  2347. /* form表单每一项的下边距 */
  2348. :deep .el-form-item {
  2349. margin-bottom: 14px;
  2350. }
  2351. /* 去掉input textarea的手动扩张样式 */
  2352. :deep(.el-textarea__inner) {
  2353. resize: none;
  2354. }
  2355. /* el-dialog的头部样式 */
  2356. :deep .el-dialog__header {
  2357. padding: 11px 20px 11px;
  2358. }
  2359. /* el-dialog的主体样式 */
  2360. :deep .el-dialog__body {
  2361. padding: 0px 20px 0px;
  2362. }
  2363. /* el-divider样式 */
  2364. :deep .el-divider--horizontal {
  2365. margin: 0px 0 12px;
  2366. }
  2367. /* el-dialog的底部样式 */
  2368. :deep .el-dialog__footer {
  2369. padding: 0px 20px 14px;
  2370. }
  2371. /* 默认结果后面下拉框样式 */
  2372. :deep .downText .el-input--suffix .el-input__inner {
  2373. width: 0;
  2374. height: 100%;
  2375. padding: 0 19px;
  2376. }
  2377. /* 默认结果后面下拉框图标样式 */
  2378. :deep .downText .el-input--suffix .el-input__suffix {
  2379. right: 12px;
  2380. }
  2381. /* 默认结果后面下拉框 */
  2382. :deep .downText {
  2383. display: flex !important;
  2384. }
  2385. /* 诊断函数后面按钮样式 */
  2386. :deep .el-input-group__append {
  2387. padding: 0 11px;
  2388. }
  2389. /* 默认结果整体样式 */
  2390. .my-el-form-item :deep .el-form-item__content {
  2391. line-height: 0 !important;
  2392. }
  2393. .my-el-form-item :deep .el-input__icon {
  2394. line-height: 0 !important;
  2395. }
  2396. /* 指引信息 */
  2397. .guidelines :deep .el-form-item {
  2398. margin-bottom: 0;
  2399. }
  2400. .seachinput {
  2401. width: 250px;
  2402. margin-right: 110px;
  2403. }
  2404. :deep .seachinput .el-select {
  2405. width: 100%;
  2406. }
  2407. .layeredleftright {
  2408. width: 95%;
  2409. display: flex;
  2410. flex-direction: column;
  2411. }
  2412. </style>