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.

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