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.

2578 lines
83 KiB

2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
  1. <template>
  2. <div class="box">
  3. <div style="width: 95%">
  4. <el-card
  5. style="width: 100%; border-radius: 15px"
  6. class="elcard"
  7. >
  8. <div class="publiccss">项目设置</div>
  9. <div style="display: flex;margin-top:15px;">
  10. <div style="width: 15%;">
  11. <div>
  12. <el-select v-model="department" placeholder="请选择项目类别" filterable :filter-method="remoteMethodes" default-first-option @change="quckDepartments" clearable>
  13. <el-option
  14. v-for="item in quckDepartment"
  15. :key="item.id"
  16. :label="item.displayName"
  17. :value="item.id"
  18. >
  19. </el-option>
  20. </el-select>
  21. </div>
  22. <div :style="'margin-top: 10px;overflow: scroll;border: 1px solid;height:'+ (window.pageHeight < 600 ? 410 : window.pageHeight - 210) + 'px;'">
  23. <el-tree
  24. :data="itemTypeId"
  25. :props="treeprops"
  26. @node-click="treeclick"
  27. node-key="id"
  28. ref="itemType"
  29. highlight-current
  30. auto-expand-parent
  31. ></el-tree>
  32. </div>
  33. </div>
  34. <div style="width: 85%;margin-left:5px;">
  35. <el-table
  36. :data="tableData"
  37. style="width: 100%"
  38. row-key="id"
  39. :height="window.pageHeight < 600 ? 185 : window.pageHeight - 160"
  40. class="el-table__body-wrapper tbody"
  41. highlight-current-row
  42. @row-click="rowick"
  43. ref="tableData"
  44. border
  45. >
  46. <el-table-column prop="id" label="编号" width="300">
  47. </el-table-column>
  48. <el-table-column prop="displayName" label="名称" width="">
  49. </el-table-column>
  50. <el-table-column prop="creatorName" label="创建者" width="">
  51. </el-table-column>
  52. <el-table-column prop="creationTime" label="创建时间" width="200">
  53. <template slot-scope="scope">
  54. {{ scope.row.creationTime | dateFormat }}
  55. </template>
  56. </el-table-column>
  57. <el-table-column prop="lastModifierName" label="修改者" width="">
  58. </el-table-column>
  59. <el-table-column
  60. prop="lastModificationTime"
  61. label="修改时间"
  62. width="200"
  63. >
  64. <template slot-scope="scope">
  65. {{ scope.row.lastModificationTime | dateFormat }}
  66. </template>
  67. </el-table-column>
  68. <el-table-column
  69. label="结果类别"
  70. prop="resultTemplateTypeFlag"
  71. ></el-table-column>
  72. <el-table-column label="操作">
  73. <template>
  74. <el-tag
  75. class="move"
  76. style="
  77. cursor: move;
  78. margin-left: 15px;
  79. background-color: rgb(245, 245, 245);
  80. border: none;
  81. "
  82. draggable="true"
  83. >
  84. <i
  85. class="el-icon-d-caret"
  86. style="
  87. width: 1rem;
  88. height: 1rem;
  89. color: rgb(113, 113, 113);
  90. "
  91. ></i>
  92. </el-tag>
  93. </template>
  94. </el-table-column>
  95. </el-table>
  96. </div>
  97. </div>
  98. </el-card>
  99. </div>
  100. <el-dialog
  101. :title="title == 1 ? '新增' : '编辑'"
  102. :visible.sync="dialogVisible"
  103. width="70%"
  104. :close-on-click-modal="false"
  105. >
  106. <el-form ref="form" :model="form" label-width="110px" :rules="rules">
  107. <el-row>
  108. <el-col :span="10">
  109. <el-form-item label="项目编号" prop="">
  110. <el-input v-model="form.id" :disabled="true"></el-input>
  111. </el-form-item>
  112. </el-col>
  113. <el-col :span="6">
  114. <el-form-item label="项目类别" prop="itemTypeId">
  115. <!-- <el-cascader
  116. v-model="form.itemTypeId"
  117. :options="itemTypeId"
  118. :props="props"
  119. :show-all-levels="false"
  120. >
  121. </el-cascader> -->
  122. <el-cascader
  123. v-model="form.itemTypeId"
  124. :options="itemTypeId"
  125. @change="onchange"
  126. :props="{
  127. value: 'id',
  128. label: 'displayName',
  129. children: 'treeChildren'
  130. }"
  131. ></el-cascader>
  132. <!-- <el-select
  133. v-model="form.itemTypeId"
  134. placeholder="请选择"
  135. style="width: 100%"
  136. >
  137. <el-option
  138. v-for="item in itemTypeId"
  139. :key="item.id"
  140. :label="item.displayName"
  141. :value="item.id"
  142. >
  143. </el-option>
  144. </el-select> -->
  145. </el-form-item>
  146. </el-col>
  147. <el-col :span="8">
  148. <el-form-item label="名称" prop="displayName">
  149. <el-input v-model="form.displayName" ref="refinput"></el-input>
  150. </el-form-item>
  151. </el-col>
  152. <el-col :span="8">
  153. <el-form-item label="英文缩写" prop="">
  154. <el-input v-model="form.englishShortName"></el-input>
  155. </el-form-item>
  156. </el-col>
  157. <el-col :span="6">
  158. <el-form-item label="价格" prop="">
  159. <el-input v-model="form.price"></el-input>
  160. </el-form-item>
  161. </el-col>
  162. <!-- <el-col :span="8">
  163. <el-form-item label="价表项目编码" prop="">
  164. <el-select
  165. v-model="form.priceItemId"
  166. placeholder="请选择"
  167. style="width: 100%"
  168. >
  169. <el-option
  170. v-for="item in priceItemId"
  171. :key="item.id"
  172. :label="item.displayName"
  173. :value="item.id"
  174. >
  175. </el-option>
  176. </el-select>
  177. </el-form-item>
  178. </el-col> -->
  179. <el-col :span="6">
  180. <el-form-item label="单位" prop="">
  181. <el-select
  182. v-model="form.unitId"
  183. placeholder="请选择"
  184. style="width: 100%"
  185. filterable
  186. >
  187. <el-option
  188. v-for="item in unitId"
  189. :key="item.id"
  190. :label="item.displayName"
  191. :value="item.id"
  192. >
  193. </el-option>
  194. </el-select>
  195. <!-- <el-autocomplete
  196. class="inline-input"
  197. v-model="unitIdName"
  198. :fetch-suggestions="querySearch"
  199. value-key="displayName"
  200. placeholder="请输入内容"
  201. @select="handleSelect"
  202. >
  203. </el-autocomplete> -->
  204. </el-form-item>
  205. </el-col>
  206. <el-col :span="4">
  207. <el-form-item label="生成小结" prop="">
  208. <el-checkbox v-model="isProduceSummaryBox" @change="changeBox('isProduceSummary')" />
  209. </el-form-item>
  210. </el-col>
  211. <el-col :span="8">
  212. <el-form-item label="参考范围类型" prop="">
  213. <el-select
  214. v-model="form.referenceRangeTypeFlag"
  215. placeholder="请选择"
  216. style="width: 100%"
  217. >
  218. <el-option
  219. v-for="item in referenceRangeTypeFlag"
  220. :key="item.value"
  221. :label="item.label"
  222. :value="item.value"
  223. >
  224. </el-option>
  225. </el-select>
  226. <!-- <el-input v-model="form.referenceRangeTypeFlag"></el-input> -->
  227. </el-form-item>
  228. </el-col>
  229. <el-col :span="4">
  230. <el-form-item label="名称进入小结" prop="">
  231. <el-checkbox v-model="isNameIntoSummaryBox" @change="changeBox('isNameIntoSummary')" />
  232. </el-form-item>
  233. </el-col>
  234. <el-col :span="4">
  235. <el-form-item label="启用诊断函数" prop="">
  236. <el-checkbox v-model="isDiagnosisFunctionBox" @change="changeBox('isDiagnosisFunction')" />
  237. </el-form-item>
  238. </el-col>
  239. <el-col :span="8">
  240. <el-form-item label="诊断函数" prop="">
  241. <el-input
  242. v-model="form.diagnosisFunction"
  243. :disabled="disableddiagnosisFunction"
  244. >
  245. <el-button slot="append" icon="el-icon-more" v-if="isDiagnosisFunctionBox" @click="diagnosisFunctionBox=true,diagnosisFunctionText=form.diagnosisFunction"></el-button>
  246. </el-input>
  247. </el-form-item>
  248. </el-col>
  249. <el-col :span="24">
  250. <el-row>
  251. <el-form-item label="默认结果" prop="">
  252. <div style="display: flex;justify-content: center;">
  253. <el-input v-model="form.defaultResult" type="textarea" :autosize="{ minRows: 2, maxRows: 5}"/>
  254. <el-select
  255. v-model="form.defaultResult"
  256. style="width: 40px;"
  257. class="downText"
  258. >
  259. <el-option
  260. v-for="item in defaultResult"
  261. :key="item.value"
  262. :label="item.label"
  263. :value="item.label"
  264. >
  265. </el-option>
  266. </el-select>
  267. </div>
  268. </el-form-item>
  269. </el-row>
  270. </el-col>
  271. <el-col :span="3">
  272. <el-form-item label="是计算项目" prop="">
  273. <el-checkbox v-model="isCalculationItemBox" @change="changeBox('isCalculationItem')" />
  274. </el-form-item>
  275. </el-col>
  276. <el-col :span="8">
  277. <el-form-item label="计算函数" prop="">
  278. <el-input v-model="form.calculationFunction" :disabled="true">
  279. <el-button slot="append" icon="el-icon-more" v-if="isCalculationItemBox" @click="calculationFunctionBox=true,calculationFunctionText=form.calculationFunction"></el-button>
  280. </el-input>
  281. </el-form-item>
  282. </el-col>
  283. <el-col :span="6">
  284. <el-form-item label="输入结果校验" prop="">
  285. <el-input v-model="form.inputCheck"></el-input>
  286. </el-form-item>
  287. </el-col>
  288. <el-col :span="3">
  289. <el-form-item label="继续处理" prop="">
  290. <el-checkbox v-model="isContinueProcessBox" @change="changeBox('isContinueProcess')" />
  291. </el-form-item>
  292. </el-col>
  293. <!-- <el-col :span="8">
  294. <el-form-item label="项目结果模板" prop="resultTemplateTypeFlag">
  295. <el-input v-model="form.resultTemplateTypeFlag"
  296. >resulttemp</el-input
  297. >
  298. <el-select
  299. v-model="form.resultTemplateTypeFlag"
  300. placeholder="请选择"
  301. style="width: 100%"
  302. >
  303. <el-option
  304. v-for="item in resulttemp"
  305. :key="item.id"
  306. :label="item.result"
  307. :value="item.id"
  308. >
  309. </el-option>
  310. </el-select>
  311. </el-form-item>
  312. </el-col> -->
  313. <el-col :span="3">
  314. <el-form-item label="启用" prop="">
  315. <el-checkbox v-model="isActiveBox" @change="changeBox('isActive')" />
  316. </el-form-item>
  317. </el-col>
  318. </el-row>
  319. <!-- -->
  320. <el-divider></el-divider>
  321. <el-row>
  322. <el-col :span="5">
  323. <el-form-item label="创建者">
  324. <el-input v-model="form.creatorName" disabled></el-input>
  325. </el-form-item>
  326. </el-col>
  327. <el-col :span="7">
  328. <el-form-item label="创建时间" style="margin-left: -5%">
  329. <el-input
  330. :value="form.creationTime | dateFormat"
  331. disabled
  332. style="width: 90%"
  333. ></el-input>
  334. </el-form-item>
  335. </el-col>
  336. <el-col :span="5">
  337. <el-form-item label="修改者" style="margin-left: -25%">
  338. <el-input v-model="form.creatorName" disabled></el-input>
  339. </el-form-item>
  340. </el-col>
  341. <el-col :span="7">
  342. <el-form-item label="修改时间" style="margin-left: -5%">
  343. <el-input
  344. :value="form.lastModificationTime | dateFormat"
  345. disabled
  346. style="width: 90%"
  347. ></el-input>
  348. </el-form-item>
  349. </el-col>
  350. </el-row>
  351. </el-form>
  352. <span slot="footer" class="dialog-footer">
  353. <el-button @click="dialogVisible = false"> </el-button>
  354. <el-button type="primary" @click="Onsubmit"> </el-button>
  355. </span>
  356. </el-dialog>
  357. <!-- 按钮区域 -->
  358. <div style="margin-left: 10px; margin-top: 4%">
  359. <el-button type="" @click="add" class="commonbutton">新增</el-button>
  360. <div>
  361. <el-button
  362. type=""
  363. @click="editpopup"
  364. class="commonbutton"
  365. >编辑</el-button
  366. >
  367. </div>
  368. <div>
  369. <el-button type="" @click="delsrts" class="commonbutton"
  370. >删除</el-button
  371. >
  372. </div>
  373. <div>
  374. <el-button type="" @click="topping" class="commonbutton"
  375. >置顶</el-button
  376. >
  377. </div>
  378. <div>
  379. <el-button type="" @click="toppings" class="commonbutton"
  380. >置底</el-button
  381. >
  382. </div>
  383. <div>
  384. <el-button
  385. type=""
  386. :disabled="isshow"
  387. @click="assertion"
  388. class="commonbutton"
  389. >排序</el-button
  390. >
  391. </div>
  392. <div>
  393. <el-button
  394. type=""
  395. :disabled="isshow"
  396. @click="cancellation"
  397. class="commonbutton"
  398. >取消</el-button
  399. >
  400. </div>
  401. <div>
  402. <el-button
  403. type=""
  404. size=""
  405. @click="resulttemplate"
  406. class="commonbutton"
  407. >结果模板</el-button
  408. >
  409. </div>
  410. <div>
  411. <el-button
  412. type=""
  413. size=""
  414. @click="referencerange"
  415. class="commonbutton"
  416. >参考范围</el-button
  417. >
  418. </div>
  419. </div>
  420. <!-- 结果模板弹框 -->
  421. <el-dialog
  422. title="结果模板"
  423. :visible.sync="rurestdialogVisible"
  424. width="80%"
  425. :close-on-click-modal="false"
  426. >
  427. <div style="display: flex">
  428. <div style="width: 90%">
  429. <el-table
  430. border=""
  431. :data="reusttableData"
  432. @row-click="reustclick"
  433. row-key="id"
  434. highlight-current-row
  435. style="width: 100%"
  436. :height="window.pageHeight < 600 ? 280 : window.pageHeight - 320"
  437. ref="reusttableData"
  438. class="el-table__body-wrappers tbodys"
  439. >
  440. <!-- <el-table-column label="编号" prop="id"></el-table-column>
  441. <el-table-column label="项目编号" prop="itemId"></el-table-column> -->
  442. <el-table-column label="结果" prop="result" width="300"></el-table-column>
  443. <el-table-column label="诊断" width="200">
  444. <template slot-scope="scope">
  445. {{getChangeDiagnosis(scope.row.diagnosisId)}}
  446. </template>
  447. </el-table-column>
  448. <el-table-column label="小结前加名称" width="120">
  449. <template slot-scope="scope">
  450. <el-checkbox v-model="scope.row.isNameIntoSummary" true-label="Y" false-label="N" disabled/>
  451. </template>
  452. </el-table-column>
  453. <el-table-column label="结果状态" width="100">
  454. <template slot-scope="scope">
  455. {{getChangeResult(scope.row.resultStatusId)}}
  456. </template>
  457. </el-table-column>
  458. <el-table-column label="结果进入小结" width="120">
  459. <template slot-scope="scope">
  460. <el-checkbox v-model="scope.row.isResultIntoSummary" true-label="Y" false-label="N" disabled/>
  461. </template>
  462. </el-table-column>
  463. <el-table-column label="操作">
  464. <template>
  465. <el-tag
  466. class="moves"
  467. style="
  468. cursor: move;
  469. margin-left: 15px;
  470. background-color: rgb(245, 245, 245);
  471. border: none;
  472. "
  473. draggable="true"
  474. >
  475. <i
  476. class="el-icon-d-caret"
  477. style="
  478. width: 1rem;
  479. height: 1rem;
  480. color: rgb(113, 113, 113);
  481. "
  482. ></i>
  483. </el-tag>
  484. </template>
  485. </el-table-column>
  486. <el-table-column label="创建者" width="100">
  487. <template slot-scope="scope">
  488. {{ scope.row.creatorName}}
  489. </template>
  490. </el-table-column>
  491. <el-table-column label="创建时间" width="200">
  492. <template slot-scope="scope">
  493. {{ scope.row.creationTime | dateFormat }}
  494. </template>
  495. </el-table-column>
  496. <el-table-column label="修改者" width="100">
  497. <template slot-scope="scope">
  498. {{ scope.row.lastModifierName}}
  499. </template>
  500. </el-table-column>
  501. <el-table-column label="修改时间" width="200">
  502. <template slot-scope="scope">
  503. {{ scope.row.lastModificationTime | dateFormat }}
  504. </template>
  505. </el-table-column>
  506. </el-table>
  507. </div>
  508. <div style="margin-top: 5px; margin-left: 15px;width:10%;">
  509. <el-button type="" @click="increase" style="width:100%;">添加</el-button>
  510. <div style="margin-top: 5px">
  511. <el-button type="" @click="resultediting" style="width:100%;">编辑</el-button>
  512. </div>
  513. <div style="margin-top: 5px">
  514. <el-button type="" @click="delemtdelite" style="width:100%;">删除</el-button>
  515. </div>
  516. <div style="margin-top: 5px">
  517. <el-button type="" @click="resulttopping" style="width:100%;">置顶</el-button>
  518. </div>
  519. <div style="margin-top: 5px">
  520. <el-button type="" @click="resulttoppings" style="width:100%;">置底</el-button>
  521. </div>
  522. <div style="margin-top: 5px">
  523. <el-button
  524. type=""
  525. :disabled="isshows"
  526. @click="assertions"
  527. style="width:100%;"
  528. >排序</el-button>
  529. </div>
  530. <div style="margin-top: 5px">
  531. <el-button
  532. type=""
  533. :disabled="isshows"
  534. @click="resultcancellation"
  535. style="width:100%;"
  536. >取消</el-button>
  537. </div>
  538. <!-- <div style="margin-top: 5px">
  539. <el-button type="primary" @click="templatecategory"
  540. >模板类别</el-button
  541. >
  542. </div> -->
  543. <div style="margin-top: 5px;margin-bottom:14px;">
  544. <el-button type="" @click="diagnosticmatching" style="width:100%;">诊断匹配</el-button
  545. >
  546. </div>
  547. </div>
  548. </div>
  549. <el-divider></el-divider>
  550. <span slot="footer" class="dialog-footer">
  551. <el-button @click="rurestdialogVisible = false,rusetform={},curRows={}"> </el-button>
  552. <el-button type="primary" @click="rurestdialogVisible = false,rusetform={},curRows={}"
  553. > </el-button
  554. >
  555. </span>
  556. </el-dialog>
  557. <!-- 结果模板添加或者修改弹框 -->
  558. <el-dialog
  559. :title="ruesttiele == 1 ? '新增' : '修改'"
  560. :visible.sync="ruesttieledialogVisible"
  561. width="80%"
  562. :close-on-click-modal="false"
  563. >
  564. <el-form :model="rusetform" ref="rusetform" label-width="100px" :rules="rusetformcheck">
  565. <el-row>
  566. <!-- <el-col :span="8">
  567. <el-form-item label="项目">
  568. <el-select v-model="rusetform.itemId" placeholder="请选择">
  569. <el-option
  570. v-for="item in itemId"
  571. :key="item.id"
  572. :label="item.displayName"
  573. :value="item.id"
  574. >
  575. </el-option>
  576. </el-select>
  577. </el-form-item>
  578. </el-col> -->
  579. <el-col :span="8">
  580. <el-form-item label="结果" prop="result">
  581. <el-input v-model="rusetform.result" ref="ruseInput" @change="changeUpdate($event)"></el-input>
  582. </el-form-item>
  583. </el-col>
  584. <el-col :span="8">
  585. <el-form-item label="诊断编号">
  586. <el-select v-model="rusetform.diagnosisId" placeholder="请选择" filterable :filter-method="remoteMethod" default-first-option clearable @change="quckRusetform">
  587. <el-option
  588. v-for="item in quickAsb"
  589. :key="item.id"
  590. :label="item.displayName"
  591. :value="item.id"
  592. >
  593. </el-option>
  594. </el-select>
  595. </el-form-item>
  596. </el-col>
  597. <el-col :span="4">
  598. <el-form-item label="小结前加名称">
  599. <el-checkbox v-model="rusetform.isNameIntoSummary" true-label="Y" false-label="N"/>
  600. </el-form-item>
  601. </el-col>
  602. <el-col :span="4">
  603. <el-form-item label="结果进入小结">
  604. <el-checkbox v-model="rusetform.isResultIntoSummary" true-label="Y" false-label="N" />
  605. </el-form-item>
  606. </el-col>
  607. <el-col :span="9">
  608. <el-form-item label="结果状态" prop="resultStatusId">
  609. <el-select
  610. v-model="rusetform.resultStatusId"
  611. placeholder="请选择"
  612. filterable
  613. >
  614. <el-option
  615. v-for="item in resultStatusId"
  616. :key="item.id"
  617. :label="item.displayName"
  618. :value="item.id"
  619. >
  620. </el-option>
  621. </el-select>
  622. </el-form-item>
  623. </el-col>
  624. </el-row>
  625. </el-form>
  626. <el-divider></el-divider>
  627. <span slot="footer" class="dialog-footer">
  628. <el-button @click="ruesttieledialogVisible = false"> </el-button>
  629. <el-button type="primary" @click="rusteronsubmit"> </el-button>
  630. </span>
  631. </el-dialog>
  632. <!-- 参考范围弹框 -->
  633. <el-dialog
  634. title="参考范围"
  635. :visible.sync="referencerangedialogVisible"
  636. width="80%"
  637. :close-on-click-modal="false"
  638. >
  639. <el-row>
  640. <el-col :span="8">
  641. <span>参考范围类型</span>
  642. <el-select
  643. v-model="referencerangevalue"
  644. filterable
  645. placeholder="请选择"
  646. @change="selecttype"
  647. >
  648. <el-option
  649. v-for="item in referencerangedata"
  650. :key="item.value"
  651. :label="item.label"
  652. :value="item.value"
  653. >
  654. </el-option>
  655. </el-select>
  656. </el-col>
  657. </el-row>
  658. <!-- //无参考范围 2223456-->
  659. <el-card
  660. v-if="referencerangevalue == 0"
  661. style="margin-top: 20px"
  662. >无参考范围</el-card>
  663. <!-- 数字型参考范围 -->
  664. <div style="display: flex" v-if="referencerangevalue == 1">
  665. <ReferenceRange :itemId="form.id" ReferenceRangeTypeFlag="1" />
  666. </div>
  667. <!-- 字符型参考范围 -->
  668. <div v-if="referencerangevalue == 2">
  669. <div style="margin: 20px 0; display: flex">
  670. <div style="width: 100%">
  671. <el-input
  672. type="textarea"
  673. placeholder="请输入内容"
  674. v-model="fssubdex"
  675. maxlength="300"
  676. show-word-limit
  677. style="height: 50px"
  678. >
  679. </el-input>
  680. </div>
  681. <!-- <div style="margin-top: 5px; margin-left: 15px;width:10%;">
  682. <el-button type="primary" @click="addfssubdex" style="width:100%;">新增</el-button>
  683. </div> -->
  684. </div>
  685. </div>
  686. <!-- 性激素参考范围 -->
  687. <div v-if="referencerangevalue == 2"></div>
  688. <el-divider></el-divider>
  689. <span
  690. slot="footer"
  691. class="dialog-footer"
  692. >
  693. <el-button @click="referencerangedialogVisible = false,referencerangevalue='0'"
  694. > </el-button
  695. >
  696. <el-button type="primary" @click="determinetype"> </el-button>
  697. </span>
  698. </el-dialog>
  699. <!-- 项目结果模板弹框 -->
  700. <el-dialog
  701. title="结果模板"
  702. :visible.sync="projectdialogVisible"
  703. width="80%"
  704. :close-on-click-modal="false"
  705. >
  706. <div style="display: flex">
  707. <div style="width: 95%">
  708. <el-table :data="projectdata">
  709. <el-table-column label="编号" prop="id"> </el-table-column>
  710. <el-table-column label="结果" prop="result"> </el-table-column>
  711. <el-table-column label="修改者" prop="lastModifierName">
  712. </el-table-column>
  713. <el-table-column label="修改时间" prop="lastModificationTime">
  714. <template slot-scope="scope">
  715. {{ scope.row.lastModificationTime | dateFormat }}
  716. </template>
  717. </el-table-column>
  718. </el-table>
  719. </div>
  720. <!-- 结果模板 -->
  721. <div style="margin-left: 10px; margin-top: 5%">
  722. <el-button type="primary" @click="resultaddition">添加</el-button>
  723. </div>
  724. </div>
  725. <span slot="footer" class="dialog-footer">
  726. <el-button @click="projectdialogVisible = false"> </el-button>
  727. <el-button type="primary" @click="projectdialogVisible = false"
  728. > </el-button
  729. >
  730. </span>
  731. </el-dialog>
  732. <!--诊断匹配弹框-->
  733. <el-dialog
  734. title="诊断匹配"
  735. :visible.sync="diagnosdialogVisible"
  736. width="80%"
  737. :close-on-click-modal="false"
  738. >
  739. <div style="display: flex">
  740. <div style="width: 95%">
  741. <el-table :data="diagnosticdata" :height="window.pageHeight < 600 ? 280 : window.pageHeight - 320" border highlight-current-row @row-click="diagnosick" row-key="id" ref="diagnosticdata" class="el-table__body-wrapperes tbodyes">
  742. <el-table-column label="结果" prop="result"></el-table-column>
  743. <el-table-column label="诊断" width="200">
  744. <template slot-scope="scope">
  745. {{getChangeDiagnosies(scope.row.diagnosisId)}}
  746. </template>
  747. </el-table-column>
  748. <el-table-column label="创建者" width="100">
  749. <template slot-scope="scope">
  750. {{ scope.row.creatorName}}
  751. </template>
  752. </el-table-column>
  753. <el-table-column label="创建时间" width="200">
  754. <template slot-scope="scope">
  755. {{ scope.row.creationTime | dateFormat }}
  756. </template>
  757. </el-table-column>
  758. <el-table-column label="修改者" width="100">
  759. <template slot-scope="scope">
  760. {{ scope.row.lastModifierName}}
  761. </template>
  762. </el-table-column>
  763. <el-table-column label="修改时间" width="200">
  764. <template slot-scope="scope">
  765. {{ scope.row.lastModificationTime | dateFormat }}
  766. </template>
  767. </el-table-column>
  768. <el-table-column label="操作">
  769. <template>
  770. <el-tag
  771. class="movess"
  772. style="
  773. cursor: move;
  774. margin-left: 15px;
  775. background-color: rgb(245, 245, 245);
  776. border: none;
  777. "
  778. draggable="true"
  779. >
  780. <i
  781. class="el-icon-d-caret"
  782. style="
  783. width: 1rem;
  784. height: 1rem;
  785. color: rgb(113, 113, 113);
  786. "
  787. ></i>
  788. </el-tag>
  789. </template>
  790. </el-table-column>
  791. </el-table>
  792. </div>
  793. <div style="margin-top: 5px; margin-left: 15px;width:10%;">
  794. <el-button type="" @click="adddiagnosis" style="width:100%;">增加</el-button>
  795. <div style="margin-top: 5px">
  796. <el-button type="" @click="editDiagnosis" style="width:100%;">编辑</el-button>
  797. </div>
  798. <div style="margin-top: 5px">
  799. <el-button type="" @click="deleteDiagnosis" style="width:100%;">删除</el-button>
  800. </div>
  801. <div style="margin-top: 5px">
  802. <el-button type="" @click="diagnosistopping" style="width:100%;">置顶</el-button>
  803. </div>
  804. <div style="margin-top: 5px">
  805. <el-button type="" @click="diagnosistoppings" style="width:100%;">置底</el-button>
  806. </div>
  807. <div style="margin-top: 5px">
  808. <el-button
  809. type=""
  810. :disabled="isshowes"
  811. @click="assertiones"
  812. style="width:100%;"
  813. >排序</el-button>
  814. </div>
  815. <div style="margin-top: 5px">
  816. <el-button
  817. type=""
  818. :disabled="isshowes"
  819. @click="diagnosiscancellation"
  820. style="width:100%;"
  821. >取消</el-button>
  822. </div>
  823. </div>
  824. </div>
  825. <el-divider></el-divider>
  826. <span slot="footer" class="dialog-footer">
  827. <el-button @click="diagnosdialogVisible = false,editdigoisceditingform={},curRowes={}"> </el-button>
  828. <el-button type="primary" @click="diagnosdialogVisible = false,editdigoisceditingform={},curRowes={}"
  829. > </el-button
  830. >
  831. </span>
  832. </el-dialog>
  833. <!-- 增加诊断弹框 -->
  834. <el-dialog
  835. :title="diagnostiele == 1 ? '新增' : '修改'"
  836. :visible.sync="diagnosticediting"
  837. width="80%"
  838. :close-on-click-modal="false"
  839. >
  840. <el-form :model="editdigoisceditingform" ref="editdigoisceditingform" label-width="100px" :rules="editdigoisceditingformcheck">
  841. <el-row>
  842. <el-col :span="8">
  843. <el-form-item label="结果" prop="result">
  844. <el-input v-model="editdigoisceditingform.result" ref="editdiInput" @change="changeUpdates($event)"></el-input>
  845. </el-form-item>
  846. </el-col>
  847. <el-col :span="8">
  848. <el-form-item label="诊断编号" prop="diagnosisId">
  849. <el-select v-model="editdigoisceditingform.diagnosisId" placeholder="请选择" filterable :filter-method="remoteMethodess" default-first-option clearable @change="quckEditdigoisce">
  850. <el-option
  851. v-for="item in quckeDitd"
  852. :key="item.id"
  853. :label="item.displayName"
  854. :value="item.id"
  855. >
  856. </el-option>
  857. </el-select>
  858. </el-form-item>
  859. </el-col>
  860. </el-row>
  861. </el-form>
  862. <el-divider></el-divider>
  863. <span slot="footer" class="dialog-footer">
  864. <el-button @click="diagnosticediting = false"> </el-button>
  865. <el-button type="primary" @click="diagnosticsadd"> </el-button>
  866. </span>
  867. </el-dialog>
  868. <!--诊断设置弹框 -->
  869. <el-dialog
  870. title="诊断建议设置"
  871. :visible.sync="diagnostisbox"
  872. width="80%"
  873. :close-on-click-modal="false"
  874. >
  875. <div style="display: flex">
  876. <div style="width: 95%">
  877. <el-card>
  878. <el-row>
  879. <el-col :span="8">
  880. <el-select v-model="value" placeholder="请选择">
  881. <el-option
  882. v-for="item in itemTypeId"
  883. :key="item.id"
  884. :label="item.displayName"
  885. :value="item.id"
  886. >
  887. </el-option>
  888. </el-select>
  889. </el-col>
  890. <el-col :span="8"> 2122 </el-col>
  891. </el-row>
  892. <!-- table部分 -->
  893. <el-row> </el-row>
  894. </el-card>
  895. </div>
  896. </div>
  897. <span slot="footer" class="dialog-footer">
  898. <el-button @click="diagnostisbox = false"> </el-button>
  899. <el-button type="primary" @click="diagnostisbox = false"
  900. > </el-button
  901. >
  902. </span>
  903. </el-dialog>
  904. <!-- 诊断函数弹框 -->
  905. <el-dialog
  906. title="诊断函数设置"
  907. :visible.sync="diagnosisFunctionBox"
  908. width="50%"
  909. :close-on-click-modal="false"
  910. >
  911. <el-form label-width="110px">
  912. <el-row>
  913. <el-col :span="24">
  914. <el-form-item label="诊断函数">
  915. <el-input type="textarea" v-model="diagnosisFunctionText" :autosize="{ minRows: 12, maxRows: 12}"></el-input>
  916. </el-form-item>
  917. </el-col>
  918. </el-row>
  919. </el-form>
  920. <span slot="footer" class="dialog-footer">
  921. <el-button @click="diagnosisFunctionBox = false,diagnosisFunctionText=''"> </el-button>
  922. <el-button type="primary" @click="OnsubmitDiagnosis"> </el-button>
  923. </span>
  924. </el-dialog>
  925. <!-- 计算函数弹框 -->
  926. <el-dialog
  927. title="计算函数设置"
  928. :visible.sync="calculationFunctionBox"
  929. width="50%"
  930. :close-on-click-modal="false"
  931. >
  932. <el-form label-width="110px">
  933. <el-row>
  934. <el-col :span="24">
  935. <el-form-item label="诊断函数">
  936. <el-input type="textarea" v-model="calculationFunctionText" :autosize="{ minRows: 12, maxRows: 12}"></el-input>
  937. </el-form-item>
  938. </el-col>
  939. </el-row>
  940. </el-form>
  941. <span slot="footer" class="dialog-footer">
  942. <el-button @click="calculationFunctionBox = false,calculationFunctionText=''"> </el-button>
  943. <el-button type="primary" @click="OnsubmitCalculation"> </el-button>
  944. </span>
  945. </el-dialog>
  946. </div>
  947. </template>
  948. <script>
  949. import { yzstr } from "@/utlis/validate";
  950. import {
  951. getporjectlists,
  952. projectlist,
  953. addproject,
  954. priceitemlist,
  955. posjrctid,
  956. projectedit,
  957. projectdeleft,
  958. projttitem,
  959. projectdreog,
  960. } from "@/request/commonapi";
  961. import { unitlist } from "@/request/systemapi";
  962. import Sortable from "sortablejs";
  963. import { getapi, postapi, putapi, deletapi } from "@/api/api";
  964. import { deepCopy } from "../../utlis/proFunc";
  965. import ReferenceRange from "../../components/itemSet/ReferenceRange.vue";
  966. import { mapState, mapActions } from "vuex";
  967. export default {
  968. components: {
  969. ReferenceRange,
  970. },
  971. data() {
  972. return {
  973. value: "",
  974. diagnostisbox: false, //诊断设置弹框的方法
  975. // tabelform: {
  976. // ageLowerLimit: "input无法输入",
  977. // },
  978. sexname: [],
  979. sexid: [],
  980. treeprops: {
  981. label: "displayName",
  982. value: "id",
  983. children: "treeChildren",
  984. }, //左侧树形结构需要的数据
  985. editdigoisceditingform: {
  986. itemId: "",
  987. result: "",
  988. diagnosisId: ""
  989. }, //诊断编辑需要绑定的对象诊断所需要的编辑
  990. diagnosticediting: false, //诊断编辑
  991. diagnosdialogVisible: false, //匹配诊断
  992. diagnosticdata: [], //匹配诊断
  993. initdiagnosticdata:[],
  994. projectdata: [], //结果模板
  995. projectdialogVisible: false,
  996. itemId: [], //项目id
  997. diagnosisId: [], //诊断
  998. rusetform: {
  999. itemId: "",
  1000. result: "",
  1001. diagnosisId: null,
  1002. isNameIntoSummary: "N",
  1003. isResultIntoSummary: "Y",
  1004. resultStatusId: "01",
  1005. simpleCode: "",
  1006. }, //项目结果模板需要的数据
  1007. resultStatusId: [], //结果状态
  1008. isNameIntoSummary: [
  1009. {
  1010. value: "Y",
  1011. label: "是",
  1012. },
  1013. {
  1014. value: "N",
  1015. label: "否",
  1016. },
  1017. ], //小结名称
  1018. isResultIntoSummary: [
  1019. {
  1020. value: "Y",
  1021. label: "是",
  1022. },
  1023. {
  1024. value: "N",
  1025. label: "否",
  1026. },
  1027. ], //进入小结
  1028. ruesttiele: 1,
  1029. ruesttieledialogVisible: false,
  1030. referencerangedata: [
  1031. {
  1032. value: "0",
  1033. label: "无参考范围",
  1034. },
  1035. {
  1036. value: "1",
  1037. label: "数字型参考范围",
  1038. },
  1039. {
  1040. value: "2",
  1041. label: "字符型参考范围",
  1042. },
  1043. {
  1044. value: "3",
  1045. label: "性激素参考范围",
  1046. },
  1047. ], //参考范围下拉框
  1048. referencerangevalue: "0",
  1049. referencerangedialogVisible: false, //参考范围弹框
  1050. Selectvalue: "",
  1051. Selectacategory: [],
  1052. rurestdialogVisible: false,
  1053. isshow: true,
  1054. reusttableData: [],
  1055. initReusttableData:[],
  1056. tableData: [],
  1057. initTableData: [],
  1058. pages: {
  1059. Filter: "",
  1060. Sorting: "",
  1061. SkipCount: 0,
  1062. MaxResultCount: 100,
  1063. },
  1064. title: 1,
  1065. isProduceSummaryBox: true,
  1066. isNameIntoSummaryBox:true,
  1067. isDiagnosisFunctionBox:false,
  1068. isCalculationItemBox:false,
  1069. isContinueProcessBox:false,
  1070. isActiveBox:true,
  1071. // unitIdName:"",
  1072. diagnosisFunctionBox:false,
  1073. calculationFunctionBox:false,
  1074. form: {
  1075. displayName: "",
  1076. englishShortName: "",
  1077. itemTypeId: "",
  1078. price: "0",
  1079. priceItemId: null,
  1080. unitId: null,
  1081. defaultResult: "未见异常",
  1082. referenceRangeTypeFlag: "0",
  1083. isProduceSummary: "",
  1084. isNameIntoSummary: "",
  1085. isDiagnosisFunction: "",
  1086. diagnosisFunction: "",
  1087. isCalculationItem: "",
  1088. calculationFunction: "",
  1089. isContinueProcess: "",
  1090. resultTemplateTypeFlag: null,
  1091. inputCheck: "",
  1092. isActive: ""
  1093. },
  1094. referenceRangeTypeFlag: [
  1095. {
  1096. value: "0",
  1097. label: "无参考范围",
  1098. },
  1099. {
  1100. value: "1",
  1101. label: "数字型参考范围",
  1102. },
  1103. {
  1104. value: "2",
  1105. label: "字符型参考范围",
  1106. },
  1107. {
  1108. value: "3",
  1109. label: "性激素参考范围",
  1110. },
  1111. ],
  1112. isProduceSummary: [
  1113. {
  1114. value: "Y",
  1115. label: "是",
  1116. },
  1117. {
  1118. value: "N",
  1119. label: "否",
  1120. },
  1121. ], //生成小结
  1122. isNameIntoSummary: [
  1123. {
  1124. value: "Y",
  1125. label: "是",
  1126. },
  1127. {
  1128. value: "N",
  1129. label: "否",
  1130. },
  1131. ], //名称进入小结
  1132. isDiagnosisFunction: [
  1133. {
  1134. value: "Y",
  1135. label: "是",
  1136. },
  1137. {
  1138. value: "N",
  1139. label: "否",
  1140. },
  1141. ], //启用诊断函数
  1142. isCalculationItem: [
  1143. {
  1144. value: "Y",
  1145. label: "是",
  1146. },
  1147. {
  1148. value: "N",
  1149. label: "否",
  1150. },
  1151. ], //是计算项目
  1152. isContinueProcess: [
  1153. {
  1154. value: "Y",
  1155. label: "是",
  1156. },
  1157. {
  1158. value: "N",
  1159. label: "否",
  1160. },
  1161. ], //是继续处理
  1162. inputCheck: [
  1163. {
  1164. value: "Y",
  1165. label: "是",
  1166. },
  1167. {
  1168. value: "N",
  1169. label: "否",
  1170. },
  1171. ], //输入结果校验公式
  1172. isActive: [
  1173. {
  1174. value: "Y",
  1175. label: "是",
  1176. },
  1177. {
  1178. value: "N",
  1179. label: "否",
  1180. },
  1181. ], //启用
  1182. dialogVisible: false,
  1183. rules: {
  1184. displayName: [
  1185. { required: true, message: "请输入名称", trigger: "blur" },
  1186. ],
  1187. englishShortName: [
  1188. { required: true, message: "请输入英文缩写", trigger: "blur" },
  1189. ],
  1190. itemTypeId: [
  1191. { required: true, message: "请输入项目类别", trigger: "blur" },
  1192. ],
  1193. price: [{ required: true, message: "请输入价格", trigger: "blur" }],
  1194. priceItemId: [
  1195. { required: true, message: "请输入价表项目编码", trigger: "blur" },
  1196. ],
  1197. unitId: [{ required: true, message: "请输入单位", trigger: "blur" }],
  1198. defaultResult: [
  1199. { required: true, message: "请输入默认结果", trigger: "blur" },
  1200. ],
  1201. referenceRangeTypeFlag: [
  1202. { required: true, message: "请输入参考范围类别", trigger: "blur" },
  1203. ],
  1204. isProduceSummary: [
  1205. { required: true, message: "请选择是生成小结", trigger: "blur" },
  1206. ],
  1207. isNameIntoSummary: [
  1208. { required: true, message: "请输择称进入小结", trigger: "blur" },
  1209. ],
  1210. isDiagnosisFunction: [
  1211. { required: true, message: "请选择启用诊断函数", trigger: "blur" },
  1212. ],
  1213. diagnosisFunction: [
  1214. { required: true, message: "请输入诊断函数", trigger: "blur" },
  1215. ],
  1216. isCalculationItem: [
  1217. { required: true, message: "请选择计算项目", trigger: "blur" },
  1218. ],
  1219. calculationFunction: [
  1220. { required: true, message: "请输入计算函数", trigger: "blur" },
  1221. ],
  1222. isContinueProcess: [
  1223. { required: true, message: "请选择继续处理", trigger: "blur" },
  1224. ],
  1225. resultTemplateTypeFlag: [
  1226. {
  1227. required: true,
  1228. message: "请输入结果模板类别标志",
  1229. trigger: "blur",
  1230. },
  1231. ],
  1232. inputCheck: [
  1233. { required: true, message: "请选择结果校验公式", trigger: "blur" },
  1234. ],
  1235. isActive: [{ required: true, message: "请选择启用", trigger: "blur" }],
  1236. },
  1237. rusetformcheck:{
  1238. result: [
  1239. { required: true, message: "请输入名称", trigger: "blur" },
  1240. ],
  1241. resultStatusId: [
  1242. { required: true, message: "请选择结果状态", trigger: "blur" },
  1243. ]
  1244. },
  1245. editdigoisceditingformcheck:{
  1246. result: [
  1247. { required: true, message: "请输入名称", trigger: "blur" },
  1248. ],
  1249. diagnosisId: [
  1250. { required: true, message: "请选择诊断编号", trigger: "blur" },
  1251. ]
  1252. },
  1253. unitId: [], //单位Id
  1254. priceItemId: [], //价格id1
  1255. result: [], //结果
  1256. forSexId: [], //性别
  1257. itemTypeId: [], //项目类别
  1258. diagnosisLevelId: [], //诊断级别
  1259. isIll: [
  1260. {
  1261. value: "Y",
  1262. label: "是",
  1263. },
  1264. {
  1265. value: "N",
  1266. label: "否",
  1267. },
  1268. ], //是疾病
  1269. isSummaryTemplate: [
  1270. {
  1271. value: "Y",
  1272. label: "是",
  1273. },
  1274. {
  1275. value: "N",
  1276. label: "否",
  1277. },
  1278. ], //总监模板
  1279. props: {
  1280. label: "displayName",
  1281. value: "id",
  1282. children: "treeChildren",
  1283. }, //左侧树形结构
  1284. newssdate: [
  1285. {
  1286. id: "1",
  1287. name: "",
  1288. },
  1289. {
  1290. id: "2",
  1291. name: "",
  1292. },
  1293. ],
  1294. defaultResult: [
  1295. {
  1296. value: "1",
  1297. label: "未见异常",
  1298. },
  1299. {
  1300. value: "2",
  1301. label: "正常",
  1302. },
  1303. {
  1304. value: "3",
  1305. label: "阴性",
  1306. },
  1307. {
  1308. value: "4",
  1309. label: "无",
  1310. },
  1311. {
  1312. value: "5",
  1313. label: "(—)",
  1314. },
  1315. {
  1316. value: "6",
  1317. label: "­-",
  1318. },
  1319. ], //默认结果
  1320. ssdate: [],
  1321. fssubdex: "",
  1322. resultitemtype: [], //项目类别
  1323. scopediagnostic: [], //诊断范围下拉框
  1324. reference: [], //参考范围
  1325. resulttemp: [], // 结果模板
  1326. disableddiagnosisFunction: true,
  1327. curRow: {},
  1328. diagnosisFunctionText:"",
  1329. calculationFunctionText:"",
  1330. quickAsb:[],
  1331. quckDepartment:[],
  1332. department:"",
  1333. quckeDitd:[],
  1334. editdigoisceDiagnosisId:"",
  1335. diagnostiele:1,
  1336. curRows:{},
  1337. curRowes:{},
  1338. fssubdexDete:"",
  1339. isshows:true,
  1340. isshowes:true,
  1341. initItemTypeId:""
  1342. };
  1343. },
  1344. created() {
  1345. // this.getlist();
  1346. this.getmedicalconclusionlist();
  1347. },
  1348. mounted() {
  1349. this.rowDrop();
  1350. this.typeid();
  1351. },
  1352. computed: {
  1353. ...mapState(["window"]),
  1354. },
  1355. methods: {
  1356. //启用诊断函数
  1357. enablediagnostics(v) {
  1358. if (v == "N") {
  1359. this.disableddiagnosisFunction = true;
  1360. } else {
  1361. this.disableddiagnosisFunction = false;
  1362. }
  1363. },
  1364. // addfssubdex(){
  1365. // if(this.fssubdex){
  1366. // let obj = {
  1367. // itemId: this.form.id,
  1368. // referenceRangeValue: this.fssubdex,
  1369. // referenceRangeTypeFlag: this.referencerangevalue,
  1370. // };
  1371. // postapi("/api/app/reference-range/text", obj).then((res) => {
  1372. // if(res.code!=-1){
  1373. // this.$message.success("新增成功");
  1374. // this.fssubdex = "";
  1375. // }
  1376. // });
  1377. // }else{
  1378. // this.$message.warning("内容不能为空");
  1379. // }
  1380. // },
  1381. //参考范围确定类型
  1382. determinetype() {
  1383. this.referencerangedialogVisible = false;
  1384. if(this.referencerangevalue == 2){
  1385. if(this.fssubdex){
  1386. if(!this.fssubdexDete){
  1387. let obj = {
  1388. itemId: this.form.id,
  1389. referenceRangeValue: this.fssubdex,
  1390. referenceRangeTypeFlag: this.referencerangevalue,
  1391. };
  1392. postapi("/api/app/reference-range/text", obj).then((res) => {
  1393. if(res.code!=-1){
  1394. this.$message.success("新增成功");
  1395. this.fssubdex = "";
  1396. this.curRow.referenceRangeTypeFlag=this.referencerangevalue
  1397. }
  1398. });
  1399. }else{
  1400. let obj = {
  1401. itemId: this.form.id,
  1402. referenceRangeValue: this.fssubdex,
  1403. referenceRangeTypeFlag: this.referencerangevalue,
  1404. };
  1405. putapi(`/api/app/reference-range/${this.fssubdexDete.id}/text`, obj).then((res) => {
  1406. if(res.code!=-1){
  1407. this.$message.success("修改成功");
  1408. this.fssubdex = "";
  1409. this.curRow.referenceRangeTypeFlag=this.referencerangevalue
  1410. }
  1411. });
  1412. }
  1413. }else{
  1414. this.$message.warning("内容不能为空");
  1415. }
  1416. }else{
  1417. postapi("/api/app/item/updateitemreferencerangetypeflag", {
  1418. itemId:this.form.id,
  1419. referenceRangeTypeFlag:this.referencerangevalue
  1420. }).then((res) => {
  1421. if(res.code!=-1){
  1422. this.curRow.referenceRangeTypeFlag=this.referencerangevalue
  1423. }
  1424. });
  1425. }
  1426. },
  1427. async blurInput(id, name, value) {
  1428. var isdate = false; //是否存在
  1429. for (var i = 0; i < this.newssdate.length; i++) {
  1430. if (this.newssdate[i].id == id) {
  1431. isdate = true;
  1432. this.newssdate[i][name] = value;
  1433. }
  1434. }
  1435. if (!isdate) {
  1436. for (var j = 0; j < this.ssdate.length; j++) {
  1437. if (this.ssdate[j].id == id) {
  1438. this.newssdate.push(this.ssdate[j]);
  1439. }
  1440. }
  1441. }
  1442. //
  1443. },
  1444. treeclick(data) {
  1445. this.initItemTypeId=data.id
  1446. getapi(`/api/app/item/in-item-type/${data.id}`).then((res) => {
  1447. this.tableData = res.data;
  1448. this.initTableData=[...res.data]
  1449. // this.getlist();
  1450. });
  1451. },
  1452. typeid() {
  1453. projectlist().then((res) => {
  1454. this.itemTypeId = res.data;
  1455. this.itemTypeId=this.formatData(this.itemTypeId)
  1456. });
  1457. },
  1458. formatData(dataList){
  1459. for(let i=0;i<dataList.length;i++){
  1460. if(dataList[i].treeChildren.length<1){
  1461. dataList[i].treeChildren=undefined
  1462. }else{
  1463. this.formatData(dataList[i].treeChildren)
  1464. }
  1465. }
  1466. return dataList
  1467. },
  1468. //诊断新增获取数据
  1469. diagnosticsadd() {
  1470. this.$refs.editdigoisceditingform.validate((v) => {
  1471. if (v) {
  1472. if(this.diagnostiele==1){
  1473. postapi("/api/app/item-result-match", this.editdigoisceditingform).then((res) => {
  1474. if(res.code!=-1){
  1475. this.$message.success("添加成功");
  1476. this.diagnosticediting = false;
  1477. this.putDiagnosis()
  1478. }
  1479. });
  1480. }else if(this.diagnostiele==2){
  1481. putapi(
  1482. `/api/app/item-result-match/${this.editdigoisceditingform.id}`,{
  1483. itemId:this.editdigoisceditingform.itemId,
  1484. result:this.editdigoisceditingform.result,
  1485. diagnosisId:this.editdigoisceditingform.diagnosisId
  1486. }
  1487. ).then((res) => {
  1488. if(res.code!=-1){
  1489. this.$message.success("修改成功");
  1490. this.diagnosticediting = false;
  1491. this.putDiagnosis()
  1492. }
  1493. });
  1494. }
  1495. }
  1496. });
  1497. },
  1498. diagnosick(row){
  1499. getapi(`/api/app/item-result-match/${row.id}`).then((res) => {
  1500. this.curRowes = res.data;
  1501. });
  1502. },
  1503. editDiagnosis(){
  1504. this.editdigoisceditingform={ ...this.curRowes }
  1505. if (this.editdigoisceditingform.id == undefined) {
  1506. this.$message.warning("请选择操作的数据");
  1507. }else{
  1508. this.diagnostiele=2
  1509. this.diagnosticediting = true
  1510. if (this.$refs.editdigoisceditingform !== undefined){
  1511. this.$refs.editdigoisceditingform.resetFields()
  1512. }
  1513. this.diageoisaddId();
  1514. }
  1515. },
  1516. deleteDiagnosis(){
  1517. this.editdigoisceditingform={ ...this.curRowes }
  1518. if (this.editdigoisceditingform.id == undefined) {
  1519. this.$message.warning("请选择操作的数据");
  1520. }else{
  1521. this.$confirm("是否确认删除,是否继续?", "提示", {
  1522. confirmButtonText: "确定",
  1523. cancelButtonText: "取消",
  1524. type: "warning",
  1525. })
  1526. .then(() => {
  1527. deletapi(`/api/app/item-result-match/${this.editdigoisceditingform.id}`).then(
  1528. (res) => {
  1529. if(res.code!=-1){
  1530. this.$message.success("删除成功");
  1531. Object.assign(this.$data.editdigoisceditingform, this.$options.data().editdigoisceditingform)
  1532. this.curRowes={}
  1533. this.putDiagnosis()
  1534. }
  1535. }
  1536. );
  1537. })
  1538. .catch(() => {});
  1539. }
  1540. },
  1541. putDiagnosis(){
  1542. postapi(`/api/app/itemresultmatch/getlistinitmeid`,{itemId:this.form.id}).then(
  1543. (res) => {
  1544. this.diagnosticdata = res.data;
  1545. this.initdiagnosticdata=[...res.data]
  1546. }
  1547. );
  1548. },
  1549. //增加诊断需要的Id
  1550. diageoisaddId() {
  1551. postapi("/api/app/diagnosis/getlistinsuggestion").then((res) => {
  1552. this.editdigoisceDiagnosisId = res.data;
  1553. this.quckeDitd=res.data;
  1554. });
  1555. },
  1556. // 增加诊断弹框
  1557. adddiagnosis() {
  1558. this.diageoisaddId();
  1559. this.diagnostiele=1
  1560. this.diagnosticediting = true;
  1561. if (this.$refs.editdigoisceditingform !== undefined){
  1562. this.$refs.editdigoisceditingform.resetFields()
  1563. }
  1564. this.$nextTick(() => {
  1565. this.$refs.editdiInput.focus();
  1566. });
  1567. Object.assign(this.$data.editdigoisceditingform, this.$options.data().editdigoisceditingform)
  1568. this.editdigoisceditingform.itemId = this.form.id;
  1569. },
  1570. //诊断匹配弹框获取诊断数据
  1571. //改成直接跳转到诊断页面
  1572. diagnosticmatching() {
  1573. this.form = { ...this.curRow };
  1574. this.diagnosdialogVisible = true;
  1575. this.putDiagnosis()
  1576. this.diageoisaddId()
  1577. this.$nextTick(()=>{
  1578. this.rowDropes()
  1579. })
  1580. },
  1581. quckEditdigoisce(e){
  1582. if(!e){
  1583. this.remoteMethodess()
  1584. }
  1585. },
  1586. changeUpdate(e){
  1587. this.$delete(this.rusetform,'result')
  1588. this.$set(this.rusetform,'result',e)
  1589. },
  1590. changeUpdates(e){
  1591. this.$delete(this.editdigoisceditingform,'result')
  1592. this.$set(this.editdigoisceditingform,'result',e)
  1593. },
  1594. //结果模板添加
  1595. resultaddition() {},
  1596. //模板类别弹框
  1597. // templatecategory() {
  1598. // getapi("/api/app/item-result-template").then((res) => {
  1599. // this.projectdata = res.data.items;
  1600. // console.log(res);
  1601. // });
  1602. // this.projectdialogVisible = true;
  1603. // },
  1604. //项目模板置底
  1605. bottoming() {
  1606. if (this.rusetform.id == undefined) {
  1607. this.$message.warning("请选择操作的数据");
  1608. } else {
  1609. putapi(
  1610. `/api/app/itemresulttemplate/updatemanysort?id=${this.rusetform.id}&SortType=2`
  1611. ).then((res) => {
  1612. this.$message.success("操作成功");
  1613. this.resultlist();
  1614. });
  1615. }
  1616. },
  1617. //项目模板置顶
  1618. toppingqq() {
  1619. if (this.rusetform.id == undefined) {
  1620. this.$message.warning("请选择操作的数据");
  1621. } else {
  1622. putapi(
  1623. `/api/app/itemresulttemplate/updatemanysort?id=${this.rusetform.id}&SortType=1`
  1624. ).then((res) => {
  1625. this.$message.success("操作成功");
  1626. this.resultlist();
  1627. });
  1628. }
  1629. },
  1630. //结果模板删除
  1631. delemtdelite() {
  1632. this.rusetform = { ...this.curRows };
  1633. if (this.rusetform.id == undefined) {
  1634. this.$message.warning("请选择操作的数据");
  1635. } else {
  1636. this.$confirm("是否确认删除,是否继续?", "提示", {
  1637. confirmButtonText: "确定",
  1638. cancelButtonText: "取消",
  1639. type: "warning",
  1640. })
  1641. .then(() => {
  1642. deletapi(`/api/app/item-result-template/${this.rusetform.id}`).then(
  1643. (res) => {
  1644. if(res.code!=-1){
  1645. this.$message.success("删除成功");
  1646. Object.assign(this.$data.rusetform, this.$options.data().rusetform)
  1647. this.curRows={}
  1648. this.resultlist();
  1649. }
  1650. }
  1651. );
  1652. })
  1653. .catch(() => {});
  1654. }
  1655. },
  1656. reustclick(row) {
  1657. // this.rusetform = row;
  1658. getapi(`/api/app/item-result-template/${row.id}`).then((res) => {
  1659. this.curRows = res.data;
  1660. });
  1661. },
  1662. //项目结果模板新增弹框
  1663. resultediting() {
  1664. this.rusetform = { ...this.curRows };
  1665. if (this.rusetform.id == undefined) {
  1666. this.$message.warning("请选择操作的数据");
  1667. } else {
  1668. this.addoredit();
  1669. this.ruesttiele = 2;
  1670. this.ruesttieledialogVisible = true;
  1671. if (this.$refs.rusetform !== undefined){
  1672. this.$refs.rusetform.resetFields()
  1673. }
  1674. }
  1675. },
  1676. //结果模板新增或者修改
  1677. rusteronsubmit() {
  1678. this.$refs.rusetform.validate((v) => {
  1679. if (v) {
  1680. if (this.ruesttiele == 1) {
  1681. if(this.rusetform.diagnosisId==""){
  1682. this.rusetform.diagnosisId=null
  1683. }
  1684. postapi(`/api/app/item-result-template`, this.rusetform).then((res) => {
  1685. if(res.code!=-1){
  1686. this.$message.success("新增成功");
  1687. this.ruesttieledialogVisible = false;
  1688. this.resultlist();
  1689. }
  1690. });
  1691. } else if (this.ruesttiele == 2) {
  1692. if(this.rusetform.diagnosisId==""){
  1693. this.rusetform.diagnosisId=null
  1694. }
  1695. putapi(
  1696. `/api/app/item-result-template/${this.rusetform.id}`,
  1697. this.rusetform
  1698. ).then((res) => {
  1699. if(res.code!=-1){
  1700. this.$message.success("修改成功");
  1701. this.ruesttieledialogVisible = false;
  1702. this.resultlist();
  1703. }
  1704. });
  1705. }
  1706. }
  1707. });
  1708. },
  1709. //诊断设置弹框新增
  1710. diagnosticsettings() {
  1711. // this.diagnostisbox = true;
  1712. // console.log("1");
  1713. this.$router.push({ path: "/diagnosis" });
  1714. },
  1715. digitaladdion() {
  1716. // this.referencerangedata.push({
  1717. // gender: "全部",
  1718. // agewise: "200",
  1719. // underage: "下",
  1720. // onreference: "0",
  1721. // underreference: "上",
  1722. // });
  1723. },
  1724. //参考范围下拉选择
  1725. selecttype(v) {
  1726. this.referencerangevalue = v;
  1727. if(v=="2"){
  1728. getapi(`/api/app/reference-range/in-type/${this.form.id}?ReferenceRangeTypeFlag=${this.referencerangevalue}`).then((res) => {
  1729. if(res.code!=-1){
  1730. if(res.data[0]){
  1731. this.fssubdex=res.data[0].referenceRangeValue
  1732. }else{
  1733. this.fssubdex=""
  1734. }
  1735. this.fssubdexDete=res.data[0]
  1736. }
  1737. });
  1738. }
  1739. },
  1740. //参考范围
  1741. referencerange() {
  1742. this.form = { ...this.curRow };
  1743. if (this.form.id == undefined) {
  1744. this.$message.warning("请选择操作的数据");
  1745. } else {
  1746. this.referencerangevalue=this.form.referenceRangeTypeFlag
  1747. this.referencerangedialogVisible = true;
  1748. if(this.referencerangevalue=="2"){
  1749. getapi(`/api/app/reference-range/in-type/${this.form.id}?ReferenceRangeTypeFlag=${this.form.referenceRangeTypeFlag}`).then((res) => {
  1750. if(res.code!=-1){
  1751. if(res.data[0]){
  1752. this.fssubdex=res.data[0].referenceRangeValue
  1753. }else{
  1754. this.fssubdex=""
  1755. }
  1756. this.fssubdexDete=res.data[0]
  1757. }
  1758. });
  1759. }
  1760. }
  1761. },
  1762. //结果模板添加或者修改需要的列
  1763. addoredit() {
  1764. getapi("/api/app/item/in-filter").then((res) => {
  1765. this.itemId = res.data.items;
  1766. });
  1767. postapi("/api/app/diagnosis/getlistinsuggestion").then((res) => {
  1768. this.diagnosisId = res.data;
  1769. this.quickAsb=res.data;
  1770. });
  1771. },
  1772. //结果模板添加
  1773. increase() {
  1774. this.addoredit();
  1775. this.ruesttiele = 1;
  1776. this.ruesttieledialogVisible = true;
  1777. if (this.$refs.rusetform !== undefined){
  1778. this.$refs.rusetform.resetFields()
  1779. }
  1780. this.$nextTick(() => {
  1781. this.$refs.ruseInput.focus();
  1782. });
  1783. Object.assign(this.$data.rusetform, this.$options.data().rusetform)
  1784. this.rusetform.itemId = this.form.id;
  1785. },
  1786. quckRusetform(e){
  1787. if(!e){
  1788. this.remoteMethod()
  1789. }
  1790. },
  1791. //获取项目类别列表
  1792. getmedicalconclusionlist() {
  1793. getporjectlists(this.pages).then((res) => {
  1794. this.initTableData = [...res.data.items];
  1795. this.quckDepartment=res.data.items;
  1796. });
  1797. },
  1798. onchange(id) {
  1799. // this.form.customerOrgId = id;
  1800. // console.log(id);
  1801. // this.form.customerOrgId=this.form.customerOrgId[0]
  1802. if(this.form.itemTypeId){
  1803. this.form.itemTypeId.forEach((item) => {
  1804. // console.log(item);
  1805. this.form.itemTypeId = item;
  1806. });
  1807. }
  1808. },
  1809. gettypelist(listdata) {
  1810. listdata.forEach((items) => {
  1811. if (items.treeChildren.length > 0) {
  1812. this.gettypelist(items.treeChildren);
  1813. } else {
  1814. items.treeChildren = undefined;
  1815. }
  1816. });
  1817. },
  1818. isselctvalue(v) {
  1819. this.pages.TypeId = v;
  1820. this.getlist();
  1821. },
  1822. handleSelect(item) {
  1823. this.pages.Filter = item.displayName;
  1824. this.item = item;
  1825. this.formid = item.id;
  1826. //console.log(item);
  1827. // quersmedicalid(item.id).then((res) => {
  1828. // console.log(res);
  1829. // this.form = res.data;
  1830. // });
  1831. },
  1832. getlistM(rowsid) {
  1833. getporjectlists(this.pages).then((res) => {
  1834. this.initTableData = [...res.data.items];
  1835. this.tableData = res.data.items;
  1836. this.quckDepartment=res.data.items;
  1837. if (rowsid != null && rowsid != "") {
  1838. var row = this.tableData.filter((item) => item.id == rowsid);
  1839. this.$refs.tableData.setCurrentRow(row[0]);
  1840. getapi(`/api/app/item/${rowsid}`).then((res) => {
  1841. this.form = res.data;
  1842. });
  1843. }
  1844. });
  1845. },
  1846. selsearch(id, typeid) {
  1847. this.Selectvalue = typeid;
  1848. this.pages.TypeId = typeid;
  1849. this.getlistM(id);
  1850. },
  1851. createFilter(queryString) {
  1852. return (tableData) => {
  1853. return (
  1854. tableData.displayName
  1855. .toLowerCase()
  1856. .indexOf(queryString.toLowerCase()) != -1
  1857. );
  1858. };
  1859. },
  1860. querySearch(queryString, cb) {
  1861. var tableData = this.tableData;
  1862. var tableDatas = queryString
  1863. ? tableData.filter(this.createFilter(queryString))
  1864. : tableData;
  1865. // 调用 callback 返回建议列表的数据
  1866. cb(tableDatas);
  1867. },
  1868. resultlist() {
  1869. getapi(`/api/app/item-result-template/in-item-id/${this.form.id}`).then(
  1870. (res) => {
  1871. this.reusttableData = res.data
  1872. this.initReusttableData=[...res.data]
  1873. }
  1874. );
  1875. },
  1876. resulttemplate() {
  1877. let that=this
  1878. this.form = { ...this.curRow };
  1879. if (this.form.id == undefined) {
  1880. this.$message.warning("请选择操作的数据");
  1881. } else {
  1882. this.rurestdialogVisible = true;
  1883. getapi(`/api/app/item-result-template/in-item-id/${this.form.id}`).then(
  1884. (res) => {
  1885. this.reusttableData = res.data
  1886. this.initReusttableData=[...res.data]
  1887. this.$nextTick(()=>{
  1888. that.rowDrops()
  1889. })
  1890. }
  1891. );
  1892. getapi("/api/app/result-status").then((res) => {
  1893. this.resultStatusId = res.data.items;
  1894. });
  1895. postapi("/api/app/diagnosis/getlistinsuggestion").then((res) => {
  1896. this.diagnosisId = res.data;
  1897. this.quickAsb=res.data;
  1898. });
  1899. // // 获取项目类别
  1900. // getapi("/api/app/item-type/by-code-all").then((res) => {
  1901. // this.resultitemtype = res.data;
  1902. // });
  1903. }
  1904. },
  1905. remoteMethod(keyWords) {
  1906. if (keyWords) {
  1907. this.quickAsb = [];
  1908. this.diagnosisId.forEach(item => {
  1909. if (item.displayName.toLowerCase().indexOf(keyWords.toLowerCase()) > - 1
  1910. || item.simpleCode.toLowerCase().indexOf(keyWords.toLowerCase()) > - 1
  1911. // || item.shortName.toLowerCase().indexOf(keyWords.toLowerCase()) > - 1
  1912. ) {
  1913. this.quickAsb.push(item);
  1914. }
  1915. });
  1916. } else {
  1917. this.quickAsb = deepCopy(this.diagnosisId);
  1918. }
  1919. },
  1920. remoteMethodes(keyWords) {
  1921. if (keyWords) {
  1922. this.quckDepartment = [];
  1923. this.initTableData.forEach(item => {
  1924. if (item.displayName.toLowerCase().indexOf(keyWords.toLowerCase()) > - 1
  1925. || item.simpleCode.toLowerCase().indexOf(keyWords.toLowerCase()) > - 1
  1926. // || item.shortName.toLowerCase().indexOf(keyWords.toLowerCase()) > - 1
  1927. ) {
  1928. this.quckDepartment.push(item);
  1929. }
  1930. });
  1931. } else {
  1932. this.quckDepartment = deepCopy(this.initTableData);
  1933. }
  1934. },
  1935. remoteMethodess(keyWords){
  1936. if (keyWords) {
  1937. this.quckeDitd = [];
  1938. this.editdigoisceDiagnosisId.forEach(item => {
  1939. if (item.displayName.toLowerCase().indexOf(keyWords.toLowerCase()) > - 1
  1940. || item.simpleCode.toLowerCase().indexOf(keyWords.toLowerCase()) > - 1
  1941. // || item.shortName.toLowerCase().indexOf(keyWords.toLowerCase()) > - 1
  1942. ) {
  1943. this.quckeDitd.push(item);
  1944. }
  1945. });
  1946. } else {
  1947. this.quckeDitd = deepCopy(this.editdigoisceDiagnosisId);
  1948. }
  1949. },
  1950. quckDepartments(e){
  1951. if(e){
  1952. let currentKey=""
  1953. this.quckDepartment.forEach(item=>{
  1954. if(e==item.id){
  1955. currentKey=item.itemTypeId
  1956. this.initItemTypeId=item.itemTypeId
  1957. }
  1958. })
  1959. this.$refs['itemType'].setCurrentKey(currentKey)
  1960. let selected = this.$refs['itemType'].getCurrentNode();
  1961. if (this.$refs['itemType'].getNode(selected) && this.$refs['itemType'].getNode(selected).parent) {
  1962. this.expandParents(this.$refs['itemType'].getNode(selected).parent);
  1963. }
  1964. getapi(`/api/app/item/in-item-type/${currentKey}`).then((res) => {
  1965. this.tableData = res.data;
  1966. this.tableData.forEach((item,index)=>{
  1967. if(e==item.id){
  1968. this.$refs['tableData'].setCurrentRow(item);
  1969. this.rowick(item)
  1970. this.tableScrollToRow(this.$refs.tableData, index)
  1971. }
  1972. })
  1973. });
  1974. }else{
  1975. this.remoteMethodes()
  1976. }
  1977. },
  1978. expandParents(node) {
  1979. node.expanded = true;
  1980. if (node.parent) {
  1981. this.expandParents(node.parent);
  1982. }
  1983. },
  1984. getChangeDiagnosis(e){
  1985. for (var i = 0; i < this.diagnosisId.length; i++) {
  1986. if (this.diagnosisId[i].id == e) { //dictValue,dictLabel保持和上面定义一致
  1987. return this.diagnosisId[i].displayName;
  1988. }
  1989. }
  1990. },
  1991. getChangeResult(e){
  1992. for (var i = 0; i < this.resultStatusId.length; i++) {
  1993. if (this.resultStatusId[i].id == e) { //dictValue,dictLabel保持和上面定义一致
  1994. return this.resultStatusId[i].displayName;
  1995. }
  1996. }
  1997. },
  1998. getChangeDiagnosies(e){
  1999. for (var i = 0; i < this.editdigoisceDiagnosisId.length; i++) {
  2000. if (this.editdigoisceDiagnosisId[i].id == e) { //dictValue,dictLabel保持和上面定义一致
  2001. return this.editdigoisceDiagnosisId[i].displayName;
  2002. }
  2003. }
  2004. },
  2005. tableScrollToRow(tableElement, rowIndex){
  2006. let theTableRows = tableElement.bodyWrapper.querySelectorAll('.el-table__body tbody .el-table__row')
  2007. let scrollTop = 0
  2008. for (let i = 0; i < theTableRows.length; i++) {
  2009. if (i === rowIndex) {
  2010. break
  2011. }
  2012. scrollTop += theTableRows[i].offsetHeight
  2013. }
  2014. tableElement.bodyWrapper.scrollTop = scrollTop
  2015. },
  2016. //取消排序
  2017. cancellation() {
  2018. this.$message.info("取消操作");
  2019. this.isshow = true;
  2020. this.tableData=this.initTableData
  2021. },
  2022. //确定拖拽
  2023. assertion() {
  2024. let result = [];
  2025. this.tableData.forEach((item, index) => {
  2026. // index 从0开始的, displayOrder从大到小排
  2027. // let currentDisplayOrder = this.tableData.length -1
  2028. let currentDisplayOrder = this.initTableData[index].displayOrder;
  2029. if (item.displayOrder != currentDisplayOrder) {
  2030. // 如果它的displayOrder和它当前所在的位置不同代表挪动过位置
  2031. result.push({ id: item.id, displayOrder: currentDisplayOrder });
  2032. }
  2033. });
  2034. projectdreog({ itemList: result }).then((res) => {
  2035. if(res.code!=-1){
  2036. this.$message.success("操作成功");
  2037. this.isshow = true;
  2038. }
  2039. // this.getlist();
  2040. });
  2041. },
  2042. //初始化
  2043. rowDrop() {
  2044. this.$nextTick(() => {
  2045. let tbody = document.querySelector(".el-table__body-wrapper tbody");
  2046. let _this = this;
  2047. Sortable.create(tbody, {
  2048. handle: ".move",
  2049. animation: 300,
  2050. onChoose({oldIndex}){
  2051. _this.$refs['tableData'].setCurrentRow(_this.tableData[oldIndex]);
  2052. _this.rowick(_this.tableData[oldIndex])
  2053. },
  2054. onEnd({ newIndex, oldIndex }) {
  2055. _this.isshow = false;
  2056. let currRow = _this.tableData.splice(oldIndex, 1)[0];
  2057. _this.tableData.splice(newIndex, 0, currRow);
  2058. _this.tableData.map((item, index) => {
  2059. if (index == newIndex && index == oldIndex) {
  2060. // console.log(item, "新数据");
  2061. } else if (index == oldIndex) {
  2062. } else if (index == newIndex) {
  2063. }
  2064. });
  2065. console.log(_this.tableData.map((item) => item.displayOrder));
  2066. console.log(_this.initTableData.map((item) => item.displayOrder));
  2067. },
  2068. });
  2069. });
  2070. },
  2071. //项目模板确定拖拽
  2072. assertions() {
  2073. let result = [];
  2074. this.reusttableData.forEach((item, index) => {
  2075. // index 从0开始的, displayOrder从大到小排
  2076. // let currentDisplayOrder = this.tableData.length -1
  2077. let currentDisplayOrder = this.initReusttableData[index].displayOrder;
  2078. if (item.displayOrder != currentDisplayOrder) {
  2079. // 如果它的displayOrder和它当前所在的位置不同代表挪动过位置
  2080. result.push({ id: item.id, displayOrder: currentDisplayOrder });
  2081. }
  2082. });
  2083. putapi("/api/app/itemresulttemplate/updatesortmany",{ itemList: result }).then((res) => {
  2084. if(res.code!=-1){
  2085. this.$message.success("操作成功");
  2086. this.isshows = true;
  2087. }
  2088. // this.getlist();
  2089. });
  2090. },
  2091. //结果模板初始化
  2092. rowDrops() {
  2093. this.$nextTick(() => {
  2094. let tbody = document.querySelector(".el-table__body-wrappers tbody");
  2095. let _this = this;
  2096. Sortable.create(tbody, {
  2097. handle: ".moves",
  2098. animation: 300,
  2099. onChoose({oldIndex}){
  2100. _this.$refs['reusttableData'].setCurrentRow(_this.reusttableData[oldIndex]);
  2101. _this.reustclick(_this.reusttableData[oldIndex])
  2102. },
  2103. onEnd({ newIndex, oldIndex }) {
  2104. _this.isshows = false;
  2105. let currRow = _this.reusttableData.splice(oldIndex, 1)[0];
  2106. _this.reusttableData.splice(newIndex, 0, currRow);
  2107. _this.reusttableData.map((item, index) => {
  2108. if (index == newIndex && index == oldIndex) {
  2109. // console.log(item, "新数据");
  2110. } else if (index == oldIndex) {
  2111. } else if (index == newIndex) {
  2112. }
  2113. });
  2114. },
  2115. });
  2116. });
  2117. },
  2118. //结果模板取消
  2119. resultcancellation(){
  2120. this.$message.info("取消操作");
  2121. this.isshows = true;
  2122. this.reusttableData=this.initReusttableData
  2123. },
  2124. //结果模板置顶
  2125. resulttopping(){
  2126. this.rusetform = { ...this.curRows };
  2127. if (this.rusetform.id == undefined) {
  2128. this.$message.warning("请点击选择操作的数据");
  2129. } else {
  2130. putapi(
  2131. `/api/app/itemresulttemplate/updatemanysort?id=${this.rusetform.id}&SortType=1`
  2132. ).then((res) => {
  2133. if(res.code!=-1){
  2134. this.$message.success("操作成功");
  2135. this.resultlist();
  2136. }
  2137. });
  2138. }
  2139. },
  2140. //结果模板置底
  2141. resulttoppings(){
  2142. this.rusetform = { ...this.curRows };
  2143. if (this.rusetform.id == undefined) {
  2144. this.$message.success("请点击选择操作的数据");
  2145. } else {
  2146. putapi(
  2147. `/api/app/itemresulttemplate/updatemanysort?id=${this.rusetform.id}&SortType=2`
  2148. ).then((res) => {
  2149. if(res.code!=-1){
  2150. this.$message.success("操作成功");
  2151. this.resultlist();
  2152. }
  2153. });
  2154. }
  2155. },
  2156. //诊断匹配确定拖拽
  2157. assertiones() {
  2158. let result = [];
  2159. this.diagnosticdata.forEach((item, index) => {
  2160. // index 从0开始的, displayOrder从大到小排
  2161. // let currentDisplayOrder = this.tableData.length -1
  2162. let currentDisplayOrder = this.initdiagnosticdata[index].displayOrder;
  2163. if (item.displayOrder != currentDisplayOrder) {
  2164. // 如果它的displayOrder和它当前所在的位置不同代表挪动过位置
  2165. result.push({ id: item.id, displayOrder: currentDisplayOrder });
  2166. }
  2167. });
  2168. putapi("/api/app/itemresultmatch/updatesortmany",{ itemList: result }).then((res) => {
  2169. if(res.code!=-1){
  2170. this.$message.success("操作成功");
  2171. this.isshowes = true;
  2172. }
  2173. // this.getlist();
  2174. });
  2175. },
  2176. //诊断匹配初始化
  2177. rowDropes() {
  2178. this.$nextTick(() => {
  2179. let tbody = document.querySelector(".el-table__body-wrapperes tbody");
  2180. let _this = this;
  2181. Sortable.create(tbody, {
  2182. handle: ".movess",
  2183. animation: 300,
  2184. onChoose({oldIndex}){
  2185. _this.$refs['diagnosticdata'].setCurrentRow(_this.diagnosticdata[oldIndex]);
  2186. _this.diagnosick(_this.diagnosticdata[oldIndex])
  2187. },
  2188. onEnd({ newIndex, oldIndex }) {
  2189. _this.isshowes = false;
  2190. let currRow = _this.diagnosticdata.splice(oldIndex, 1)[0];
  2191. _this.diagnosticdata.splice(newIndex, 0, currRow);
  2192. _this.diagnosticdata.map((item, index) => {
  2193. if (index == newIndex && index == oldIndex) {
  2194. // console.log(item, "新数据");
  2195. } else if (index == oldIndex) {
  2196. } else if (index == newIndex) {
  2197. }
  2198. });
  2199. },
  2200. });
  2201. });
  2202. },
  2203. //诊断匹配置顶
  2204. diagnosistopping(){
  2205. this.editdigoisceditingform={ ...this.curRowes }
  2206. if (this.editdigoisceditingform.id == undefined) {
  2207. this.$message.warning("请点击选择操作的数据");
  2208. } else {
  2209. putapi(
  2210. `/api/app/itemresultmatch/updatesortmany?id=${this.editdigoisceditingform.id}&SortType=1`
  2211. ).then((res) => {
  2212. if(res.code!=-1){
  2213. this.$message.success("操作成功");
  2214. this.resultlist();
  2215. }
  2216. });
  2217. }
  2218. },
  2219. //诊断匹配置底
  2220. diagnosistoppings(){
  2221. this.editdigoisceditingform={ ...this.curRowes }
  2222. if (this.editdigoisceditingform.id == undefined) {
  2223. this.$message.warning("请点击选择操作的数据");
  2224. } else {
  2225. putapi(
  2226. `/api/app/itemresultmatch/updatesortmany?id=${this.editdigoisceditingform.id}&SortType=2`
  2227. ).then((res) => {
  2228. if(res.code!=-1){
  2229. this.$message.success("操作成功");
  2230. this.resultlist();
  2231. }
  2232. });
  2233. }
  2234. },
  2235. //诊断匹配取消
  2236. diagnosiscancellation(){
  2237. this.$message.info("取消操作");
  2238. this.isshowes = true;
  2239. this.diagnosticdata=this.initdiagnosticdata
  2240. },
  2241. //置低
  2242. toppings() {
  2243. this.form = { ...this.curRow };
  2244. if (this.form.id == undefined) {
  2245. this.$message.success("请点击选择操作的数据");
  2246. } else {
  2247. projttitem(this.form.id, 2).then((res) => {
  2248. if(res.code!=-1){
  2249. this.$message.success("操作成功");
  2250. this.getItemTypeIdList();
  2251. }
  2252. });
  2253. }
  2254. },
  2255. //置顶
  2256. topping() {
  2257. this.form = { ...this.curRow };
  2258. if (this.form.id == undefined) {
  2259. this.$message.warning("请点击选择操作的数据");
  2260. } else {
  2261. projttitem(this.form.id, 1).then((res) => {
  2262. if(res.code!=-1){
  2263. this.$message.success("操作成功");
  2264. this.getItemTypeIdList();
  2265. }
  2266. });
  2267. }
  2268. },
  2269. //删除
  2270. delsrts() {
  2271. this.form = { ...this.curRow };
  2272. if (this.form.id == undefined) {
  2273. this.$message.warning("请选择删除的数据");
  2274. } else {
  2275. this.$confirm("是否确认删除,是否继续?", "提示", {
  2276. confirmButtonText: "确定",
  2277. cancelButtonText: "取消",
  2278. type: "warning",
  2279. })
  2280. .then(() => {
  2281. projectdeleft(this.form.id).then((res) => {
  2282. this.$message.success("删除成功");
  2283. this.getItemTypeIdList();
  2284. Object.assign(this.$data.form, this.$options.data().form)
  2285. this.curRow=this.$options.data().curRow
  2286. });
  2287. })
  2288. .catch(() => {});
  2289. }
  2290. },
  2291. //点击列表通过id查询
  2292. rowick(row) {
  2293. posjrctid(row.id).then((res) => {
  2294. this.curRow = { ...res.data };
  2295. // console.log(res);
  2296. // this.form = res.data;
  2297. });
  2298. },
  2299. //编辑弹框
  2300. editpopup() {
  2301. this.form = { ...this.curRow };
  2302. console.log(this.form)
  2303. if (this.form.id == undefined) {
  2304. this.$message.warning("请选择操作的数据");
  2305. } else {
  2306. this.form.price = Number(this.form.price);
  2307. this.addorgropdata();
  2308. this.title = 2;
  2309. this.dialogVisible = true;
  2310. if (this.$refs.form !== undefined){
  2311. this.$refs.form.resetFields()
  2312. }
  2313. posjrctid(this.form.id).then((res) => {
  2314. if(res.code!=-1){
  2315. this.form = res.data;
  2316. if (res.data.isProduceSummary == 'Y') {
  2317. this.isProduceSummaryBox = true;
  2318. } else {
  2319. this.isProduceSummaryBox = false;
  2320. }
  2321. if (res.data.isNameIntoSummary == 'Y') {
  2322. this.isNameIntoSummaryBox = true;
  2323. } else {
  2324. this.isNameIntoSummaryBox = false;
  2325. }
  2326. if (res.data.isDiagnosisFunction == 'Y') {
  2327. this.isDiagnosisFunctionBox = true;
  2328. } else {
  2329. this.isDiagnosisFunctionBox = false;
  2330. }
  2331. if (res.data.isCalculationItem == 'Y') {
  2332. this.isCalculationItemBox = true;
  2333. } else {
  2334. this.isCalculationItemBox = false;
  2335. }
  2336. if (res.data.isContinueProcess == 'Y') {
  2337. this.isContinueProcessBox = true;
  2338. } else {
  2339. this.isContinueProcessBox = false;
  2340. }
  2341. if (res.data.isActive == 'Y') {
  2342. this.isActiveBox = true;
  2343. } else {
  2344. this.isActiveBox = false;
  2345. }
  2346. }
  2347. });
  2348. }
  2349. },
  2350. //编辑弹框勾选重新赋值
  2351. changeBox(type) {
  2352. //赋值
  2353. if(this[type+'Box']){
  2354. this.form[type] = 'Y';
  2355. }else{
  2356. this.form[type] = 'N';
  2357. }
  2358. },
  2359. // querySearch(queryString, cb) {
  2360. // var restaurants = this.unitId;
  2361. // var results = queryString ? restaurants.filter(this.createFilter(queryString)) : restaurants;
  2362. // // 调用 callback 返回建议列表的数据
  2363. // cb(results);
  2364. // },
  2365. // createFilter(queryString) {
  2366. // return (restaurant) => {
  2367. // return (restaurant.displayName.toLowerCase().indexOf(queryString.toLowerCase()) === 0);
  2368. // };
  2369. // },
  2370. // handleSelect(item) {
  2371. // this.form.unitId=item.id
  2372. // },
  2373. OnsubmitDiagnosis(){
  2374. this.form.diagnosisFunction=this.diagnosisFunctionText
  2375. this.diagnosisFunctionText=''
  2376. this.diagnosisFunctionBox=false
  2377. this.$message.success("设置诊断函数成功");
  2378. },
  2379. OnsubmitCalculation(){
  2380. this.form.calculationFunction=this.calculationFunctionText
  2381. this.calculationFunctionText=''
  2382. this.calculationFunctionBox=false
  2383. this.$message.success("设置计算函数成功");
  2384. },
  2385. //确定新增或者编辑
  2386. Onsubmit() {
  2387. this.$refs.form.validate((v) => {
  2388. if (v) {
  2389. if (this.title == 1) {
  2390. this.form.price = Number(this.form.price);
  2391. addproject(this.form).then((res) => {
  2392. if (res.code == 1) {
  2393. this.$message.success("新增成功");
  2394. this.getItemTypeIdList();
  2395. this.dialogVisible = false;
  2396. this.$nextTick(()=>{
  2397. this.$refs['tableData'].setCurrentRow(res.data);
  2398. this.rowick(res.data)
  2399. })
  2400. }
  2401. });
  2402. } else if (this.title == 2) {
  2403. projectedit(this.form.id, this.form).then((res) => {
  2404. this.$message.success("修改成功");
  2405. this.tableData.forEach((item,index)=>{
  2406. if(res.data.id==item.id){
  2407. this.$set(this.tableData,index,res.data)
  2408. }
  2409. })
  2410. this.curRow={...res.data}
  2411. this.dialogVisible = false;
  2412. });
  2413. }
  2414. }
  2415. });
  2416. // addproject(this.form)
  2417. },
  2418. //新增弹框
  2419. add() {
  2420. if(this.initItemTypeId==undefined || this.initItemTypeId==""){
  2421. this.$message.warning('请选择项目类别')
  2422. }else{
  2423. this.form.price = Number(this.form.price);
  2424. // this.form={}
  2425. this.title = 1;
  2426. this.dialogVisible = true;
  2427. if (this.$refs.form !== undefined){
  2428. this.$refs.form.resetFields()
  2429. }
  2430. Object.assign(this.$data.form, this.$options.data().form)
  2431. this.isProduceSummaryBox=true
  2432. this.isNameIntoSummaryBox=true
  2433. this.isDiagnosisFunctionBox=false
  2434. this.isCalculationItemBox=false
  2435. this.isContinueProcessBox=false
  2436. this.isActiveBox=true
  2437. let isBox=["isProduceSummary","isNameIntoSummary","isActive"];
  2438. isBox.forEach(item=>{
  2439. this.form[item] = 'Y';
  2440. })
  2441. let isNotBox=["isDiagnosisFunction","isCalculationItem","isContinueProcess"]
  2442. isNotBox.forEach(item=>{
  2443. this.form[item] = 'N';
  2444. })
  2445. this.form.itemTypeId=this.initItemTypeId
  2446. // this.unitIdName=""
  2447. this.$nextTick(() => {
  2448. this.$refs.refinput.focus();
  2449. });
  2450. this.addorgropdata();
  2451. }
  2452. },
  2453. //新增或者编辑弹框需要的下拉框接口数据
  2454. addorgropdata() {
  2455. //获取项目id
  2456. // projectlist().then((res) => {
  2457. // this.itemTypeId = res.data;
  2458. // this.tcdate(this.itemTypeId);
  2459. // });
  2460. //获取单位
  2461. unitlist().then((res) => {
  2462. this.unitId = res.data.items;
  2463. });
  2464. //获取价格Id
  2465. priceitemlist().then((res) => {
  2466. this.priceItemId = res.data.items;
  2467. });
  2468. //参考范围
  2469. // getapi("/api/app/reference-range").then((res) => {
  2470. // this.reference = res.data.items;
  2471. // });
  2472. //结果模板
  2473. getapi("/api/app/item-result-template").then((res) => {
  2474. this.resulttemp = res.data.items;
  2475. });
  2476. },
  2477. getlist() {
  2478. this.getlistM();
  2479. // getporjectlists(this.pages).then((res) => {
  2480. // this.initTableData = [...res.data.items];
  2481. // this.tableData = res.data.items;
  2482. // });
  2483. },
  2484. getItemTypeIdList(){
  2485. getapi(`/api/app/item/in-item-type/${this.initItemTypeId}`).then((res) => {
  2486. if(res.code!=-1){
  2487. this.tableData = res.data;
  2488. }
  2489. });
  2490. },
  2491. tcdate(date) {
  2492. for (var i = 0; i < date.length; i++) {
  2493. if (date[i].treeChildren.length == 0) {
  2494. date[i].treeChildren = undefined;
  2495. } else {
  2496. this.tcdate(date[i].treeChildren);
  2497. }
  2498. }
  2499. },
  2500. ///
  2501. },
  2502. };
  2503. </script>
  2504. <style scoped>
  2505. @import "../../assets/css/global_button.css";
  2506. @import "../../assets/css/global_dialog.css";
  2507. @import "../../assets/css/global_table.css";
  2508. @import "../../assets/css/global_form.css";
  2509. @import "../../assets/css/global_input.css";
  2510. @import "../../assets/css/global.css";
  2511. .commonbutton {
  2512. width:100px;
  2513. margin-bottom: 10px
  2514. }
  2515. ::v-deep .el-table__header th {
  2516. /* font-size: px; */
  2517. background-color: rgb(245, 245, 245); /* 设置表头背景颜色 */
  2518. color: rgb(113, 113, 113); /* 设置表头文字颜色 */
  2519. }
  2520. .box {
  2521. display: flex;
  2522. width: 100%;
  2523. }
  2524. :deep(.el-textarea__inner){
  2525. resize: none;
  2526. }
  2527. :deep .el-dialog__header {
  2528. padding: 14px 20px 14px;
  2529. }
  2530. :deep .el-dialog__body {
  2531. padding: 0px 20px 0px;
  2532. }
  2533. :deep .el-form-item {
  2534. margin-bottom: 14px;
  2535. }
  2536. :deep .el-divider--horizontal {
  2537. margin: 0px 0 14px;
  2538. }
  2539. :deep .el-dialog__footer {
  2540. padding: 0px 20px 14px;
  2541. }
  2542. :deep .downText .el-input--suffix .el-input__inner {
  2543. width: 0;
  2544. height: 100%;
  2545. padding: 0 19px;
  2546. }
  2547. :deep .downText .el-input--suffix .el-input__suffix {
  2548. right: 12px;
  2549. }
  2550. :deep .downText{
  2551. display: flex!important;
  2552. }
  2553. :deep .el-input-group__append {
  2554. padding: 0 11px;
  2555. }
  2556. </style>
  2557. <style lang="scss">
  2558. .chosen td{
  2559. background-color: blue!important;
  2560. color: #fff;
  2561. }
  2562. //checkBox自定义禁用样式
  2563. .el-checkbox__input.is-disabled.is-checked .el-checkbox__inner {
  2564. background-color: #409EFF !important;
  2565. border-color: #409EFF !important;
  2566. }
  2567. .el-checkbox__input.is-disabled.is-checked .el-checkbox__inner::after {
  2568. border-color: #fff !important;
  2569. }
  2570. </style>